Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678062 - sys-devel/gcc-8.2.0: dev-lang/python-3 fails to link on ppc-macos using -O1 or higher
Summary: sys-devel/gcc-8.2.0: dev-lang/python-3 fails to link on ppc-macos using -O1 o...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-15 12:56 UTC by Fabian Groffen
Modified: 2019-02-19 12:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2019-02-15 12:56:58 UTC
powerpc-apple-darwin9-ar rc libpython3.6m.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o
/Volumes/Scratch/Gentoo/Leopard/usr/powerpc-apple-darwin9/binutils-bin/3.2.6/ranlib: file: libpython3.6m.a(dynamic_annotations.o) has no symbols
/Volumes/Scratch/Gentoo/Leopard/usr/powerpc-apple-darwin9/binutils-bin/3.2.6/ranlib: file: libpython3.6m.a(pymath.o) has no symbols
powerpc-apple-darwin9-ar rc libpython3.6m.a Modules/_threadmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  Modules/_functoolsmodule.o  Modules/_operator.o  Modules/_collectionsmodule.o  Modules/itertoolsmodule.o  Modules/atexitmodule.o  Modules/signalmodule.o  Modules/_stat.o  Modules/timemodule.o  Modules/_localemodule.o  Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o  Modules/zipimport.o  Modules/faulthandler.o  Modules/_tracemalloc.o Modules/hashtable.o  Modules/symtablemodule.o  Modules/xxsubtype.o
/Volumes/Scratch/Gentoo/Leopard/usr/powerpc-apple-darwin9/binutils-bin/3.2.6/ranlib: file: libpython3.6m.a(dynamic_annotations.o) has no symbols
/Volumes/Scratch/Gentoo/Leopard/usr/powerpc-apple-darwin9/binutils-bin/3.2.6/ranlib: file: libpython3.6m.a(pymath.o) has no symbols
powerpc-apple-darwin9-ranlib libpython3.6m.a
ld: absolute addressing (perhaps -mdynamic-no-pic) used in __Py_dg_infinity from Python/dtoa.o not allowed in slidable image. Use '-read_only_relocs suppress' to enable text relocs
collect2: error: ld returned 1 exit status
make: *** [Makefile:634: libpython3.6m.dylib] Error 1
make: *** Waiting for unfinished jobs....
powerpc-apple-darwin9-ranlib: file: libpython3.6m.a(dynamic_annotations.o) has no symbols
Comment 1 Michael Haubenwallner (RETIRED) gentoo-dev 2019-02-15 18:32:54 UTC
Does the --without-pymalloc make a difference here?
Comment 2 Fabian Groffen gentoo-dev 2019-02-17 10:43:03 UTC
pymalloc setting is unrelated to the failure

the problem likely is related to missing -fPIC
Comment 3 Fabian Groffen gentoo-dev 2019-02-17 14:38:02 UTC
this has nothing to do with 3.6.6, 3.6.5 fails the same way, so must be compiler/linker combination, but oddly enough a bootstrap succeed using this combination.
Comment 4 Fabian Groffen gentoo-dev 2019-02-17 14:58:55 UTC
gcc-8 produces faulty code, bootstrap never used gcc-8 to compile python.
Comment 5 Fabian Groffen gentoo-dev 2019-02-19 07:56:14 UTC
Python/dtoa.c somehow gets miscompiled using -O1, only using -O0 it finally links fine.  This behaviour is only visible with GCC-8.2.0 and seems similar to previously observed optimisation differences.
Comment 6 Larry the Git Cow gentoo-dev 2019-02-19 12:00:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=3794dac765e7e6237413b376b74c5f34833bff18

commit 3794dac765e7e6237413b376b74c5f34833bff18
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-02-19 11:58:11 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-02-19 12:00:09 +0000

    dev-lang/python: fix build on ppc-macos using >=gcc-8
    
    Closes: https://bugs.gentoo.org/678062
    Package-Manager: Portage-2.3.55.1-prefix, Repoman-2.3.12
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 dev-lang/python/python-3.6.6.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)