[New-bugs-announce] [issue36718] Python 2.7 compilation fails on AMD64 Ubuntu Shared 2.7 buildbot with: relocation R_X86_64_PC32 against symbol ... can not be used ...

STINNER Victor report at bugs.python.org
Thu Apr 25 09:32:03 EDT 2019


New submission from STINNER Victor <vstinner at redhat.com>:

https://buildbot.python.org/all/#/builders/139/builds/251

Example:

building 'time' extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Include -I/srv/buildbot/buildarea/2.7.bolen-ubuntu/build -c /srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Modules/timemodule.c -o build/temp.linux-x86_64-2.7-pydebug/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Modules/timemodule.o
gcc -pthread -shared build/temp.linux-x86_64-2.7-pydebug/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Modules/timemodule.o -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -L. -lm -lpython2.7 -o build/lib.linux-x86_64-2.7-pydebug/time.so
/usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_tmpnam':
/srv/buildbot/Python-2.7.16/./Modules/posixmodule.c:7648: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/local/lib/libpython2.7.a(posixmodule.o): In function `posix_tempnam':
/srv/buildbot/Python-2.7.16/./Modules/posixmodule.c:7595: warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/bin/ld: /usr/local/lib/libpython2.7.a(ceval.o): relocation R_X86_64_PC32 against symbol `PyFunction_Type' 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

It seems to be a regression caused by my change, commit f4edd39017a211d4544570a1e2ac2110ef8e51b4, PR 12875 for bpo-28552.

----------
components: Build
messages: 340840
nosy: vstinner
priority: normal
severity: normal
status: open
title: Python 2.7 compilation fails on AMD64 Ubuntu Shared 2.7 buildbot with: relocation R_X86_64_PC32 against symbol ... can not be used ...
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36718>
_______________________________________


More information about the New-bugs-announce mailing list