systemtap build breaks on s390.

Srinivasa DS srinivasa@in.ibm.com
Mon Jun 2 19:26:00 GMT 2008


Frank Ch. Eigler wrote:
> Srinivasa DS <srinivasa@in.ibm.com> writes:
> 
>> I tried building latest systemtap-20080524 snapshot with CXXFLAGS="-g
>> -fprofile-arcs -ftest-coverage" on x86_64 system(problem not seen on
>> ppc systems), but build failed with below error message.
>>
>> Steps
>> =======
>> 1)./configure --with-elfutils=/home/systemtap/btils/elfutils-0.131/
>> CC='gcc -m64' CXX='g++ -m64'
>> 2)make CXXFLAGS="-g -fprofile-arcs -ftest-coverage"
> 
> This collection of flags conflicts with the default --enable-pie.

I have found new problem with these flags on s390 (inverse behviour 
compared to x86_64). Here if I build systemtap *without* CXXFLAGS="-g 
-fprofile-arcs -ftest-coverage", build fails with following error message.

g++ -m64 -Wall -Werror -g -fpie   -pie -Wl,-z,relro -Wl,-z,now -pie 
-Wl,-z,relro -Wl,-z,now -Llib-elfutils -Wl,-rpath-link,lib-elfutils 
-Wl,--enable-new-dtags,-rpath,/usr/local/lib/systemtap  -o stap 
stap-main.o stap-parse.o stap-staptree.o stap-elaborate.o 
stap-translate.o stap-tapsets.o stap-buildrun.o stap-loc2c.o stap-hash.o 
stap-mdfour.o stap-cache.o stap-util.o stap-coveragedb.o -ldw -lebl 
-lsqlite3
stap-main.o: In function `__static_initialization_and_destruction_0':
/usr/lib/gcc/s390x-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iostream:76: 
relocation truncated to fit: R_390_GOT12 against symbol `__dso_handle' 
defined in .data.rel.ro section in 
/usr/lib/gcc/s390x-redhat-linux/4.1.2/crtbeginS.o
stap-main.o: In function `printscript':
/home/sources/src/main.cxx:169: relocation truncated to fit: R_390_GOT12 
against symbol `std::basic_ostream<char, std::char_traits<char> >& 
std::endl<char, std::char_traits<char> >(std::basic_ostream<char, 
std::char_traits<char> >&)@@GLIBCXX_3.4' defined in .text section in 
/usr/lib/gcc/s390x-redhat-linux/4.1.2/libstdc++.so
/home/sources/src/main.cxx:177: relocation truncated to fit: R_390_GOT12 
against symbol `std::basic_ostream<char, std::char_traits<char> >& 
std::endl<char, std::char_traits<char> >(std::basic_ostream<char, 
std::char_traits<char> >&)@@GLIBCXX_3.4' defined in .text section in 
/usr/lib/gcc/s390x-redhat-linux/4.1.2/libstdc++.so
=======================================================

But If we use CXXFLAGS="-g -fprofile-arcs -ftest-coverage", systemtap 
builds cleanly but execution of stap gives segmentation fault(bug is 
filed in bugzilla, bug#6520).

Systemtap builds cleany if we disable pie(--disable-pie), But Iam 
looking for a way to build systemtap with -fpie option on s390(like on 
any other architecture systems)

Thanks
  Srinivasa DS




More information about the Systemtap mailing list