https://bugs.kde.org/show_bug.cgi?id=377066

            Bug ID: 377066
           Summary: Some Valgrind unit tests fail to compile on Ubuntu
                    16.10 with PIE enabled by default
           Product: valgrind
           Version: 3.13 SVN
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: jsew...@acm.org
          Reporter: iv...@ivosh.net
  Target Milestone: ---

Ubuntu 16.10 on amd64 comes with gcc 6.2 with PIE (position independent
executable) enabled by default. See Ubuntu wiki [1] for more details.

Because of this, the following unit tests fail to compile:
Making check in memcheck
Making check in .
Making check in tests
Making check in .
Making check in amd64
/usr/bin/ld: fxsave-amd64.o: relocation R_X86_64_32S against symbol `vecZ' can
not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: shr_edx.o: relocation R_X86_64_32S against undefined symbol `data'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Making check in linux
Making check in amd64-linux
/usr/bin/ld: defcfaexpr.o: relocation R_X86_64_32 against `.text' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: defcfaexpr.o: relocation R_X86_64_PC32 against symbol
`malloc@@GLIBC_2.2.5' can not be used when making a shared object; recompile
with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Making check in none
Making check in .
Making check in tests
Making check in .
Making check in amd64
/usr/bin/ld: cmpxchg.o: relocation R_X86_64_32S against undefined symbol `rax'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: sbbmisc.o: relocation R_X86_64_32S against undefined symbol `in_b'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: fcmovnu.o: relocation R_X86_64_32S against undefined symbol `zzz'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: fxtract-fxtract.o: relocation R_X86_64_32S against undefined
symbol `arg' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: looper.o: relocation R_X86_64_32S against symbol `arg' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: jrcxz.o: relocation R_X86_64_32S against undefined symbol `arg64'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: shrld.o: relocation R_X86_64_32S against undefined symbol `data'
can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Making check in exp-bbv
Making check in .
Making check in tests
Making check in .
Making all in .
Making all in amd64-linux
Making check in amd64-linux
/usr/bin/ld: rep_prefix.o: relocation R_X86_64_32S against `.bss' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: fldcw_check.o: relocation R_X86_64_32S against `.data' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: complex_rep.o: relocation R_X86_64_32S against `.bss' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: clone_test.o: relocation R_X86_64_32S against `.bss' can not be
used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/usr/bin/ld: ll.o: relocation R_X86_64_32 against `.data' can not be used when
making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

A workaround is to pass CFLAGS="-no-pie" to configure.
However this needs to be fixed.


[1] https://wiki.ubuntu.com/SecurityTeam/PIE

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to