Opened 17 years ago

Closed 17 years ago

Last modified 11 years ago

#13322 closed defect (fixed)

python25 fails to build on Mac OS X 10.3 Panther

Reported by: ebgssth@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.5.2
Keywords: python restfp savefp Cc: mww@…, nox@…, rhwood@…
Port:

Description

port install python25 failed on OS X 10.3 with the following errors.

$ sudo port install python25
--->  Fetching python25
--->  Verifying checksum(s) for python25
--->  Extracting python25
--->  Applying patches to python25
--->  Configuring python25
--->  Building python25 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python25/work/Python-2.5.1" && make all " returned error 2
Command output: Modules/posixmodule.c:24: warning: ignoring #pragma weak fstatvfs
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE  -c ./Modules/errnomodule.c -o Modules/errnomodule.o
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE  -c ./Modules/pwdmodule.c -o Modules/pwdmodule.o
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE  -c ./Modules/_sre.c -o Modules/_sre.o
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE  -c ./Modules/_codecsmodule.c -o Modules/_codecsmodule.o
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE  -c ./Modules/zipimport.c -o Modules/zipimport.o
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE  -c ./Modules/symtablemodule.c -o Modules/symtablemodule.o
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE  -c ./Modules/xxsubtype.c -o Modules/xxsubtype.o
gcc -c -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes  -I. -I./Include -I/opt/local/include  -DPy_BUILD_CORE -DSVNVERSION=\"`LC_ALL=C svnversion .`\" -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
rm -f libpython2.5.a
ar cr libpython2.5.a Modules/getbuildinfo.o
ar cr libpython2.5.a Modules/_typesmodule.o
ar cr libpython2.5.a Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/tokenizer.o
ar cr libpython2.5.a Objects/abstract.o Objects/boolobject.o Objects/bufferobject.o Objects/cellobject.o Objects/classobject.o Objects/cobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/intobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/methodobject.o Objects/moduleobject.o Objects/object.o Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/stringobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o Objects/unicodeobject.o Objects/unicodectype.o
ar cr libpython2.5.a Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getmtime.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mystrtoul.o Python/mysnprintf.o Python/pyarena.o Python/pyfpe.o Python/pystate.o Python/pythonrun.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o Python/getopt.o Python/pystrtod.o Python/dynload_shlib.o Python/mactoolboxglue.o Python/thread.o
ar cr libpython2.5.a Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o 
ar cr libpython2.5.a Modules/threadmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  Modules/_sre.o  Modules/_codecsmodule.o  Modules/zipimport.o  Modules/symtablemodule.o  Modules/xxsubtype.o
ranlib libpython2.5.a
libtool -o libpython2.5.dylib -dynamic  \
        -all_load libpython2.5.a -single_module \
        -install_name /opt/local/lib/libpython2.5.dylib \
        -compatibility_version 2.5 \
        -current_version 2.5 -lSystem  -L/opt/local/lib
ld: for architecture ppc
ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
restFP
saveFP
libtool: internal link edit command failed
make: *** [libpython2.5.dylib] Error 1

Error: Status 1 encountered during processing.

A month or two ago, I could compile python25 without any problems, so I suppose this issue is caused by recent changes.

Change History (23)

comment:1 Changed 17 years ago by ebgssth@…

Doing svn up -r29340 fixed this problem. So changeset:29606 should be involved with this bug.

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 17 years ago by ebgssth@…

This patch fixes my problem. But I doubt this is right way of fixing this.

Index: Portfile
===================================================================
--- Portfile    (revision 31158)
+++ Portfile    (working copy)
@@ -63,6 +63,8 @@
 platform darwin 7 {
        # there is no SystemStubs on 10.3
        post-patch { reinplace "s|-lSystemStubs||g" ${worksrcpath}/Makefile.pre.in }
+       # To avoid GCC incompatibility issue. See http://nxg.me.uk/note/2004/restFP/
+       configure.ldflags-append "-lcc_dynamic"
 }
 
 platform darwin 8 {

comment:3 Changed 17 years ago by nox@…

Cc: nox@… added
Summary: Cannot build python25 on OS X 10.3python25 fails to build on Mac OS X 10.3 Panther

comment:4 Changed 17 years ago by yaseppochi (Stephen J. Turnbull)

This also fails for me, the same way, on Mac OS X 10.4 Tiger.

The proposed patch doesn't work on Tiger, GCC can't build executables, and fails in the configure step.

comment:5 Changed 17 years ago by ebgssth@…

I couldn't reproduce this on Tiger.

comment:6 Changed 17 years ago by paulbeard@…

Does dropping back to gcc-3.3 make any difference? I realize it's not cross-platform but it looks like the OP was on PPC hardware anyway.

--- Portfile    2007-11-19 12:21:26.000000000 -0800
+++ /tmp/Portfile       2007-11-22 13:58:08.000000000 -0800
@@ -67,8 +67,8 @@
 }

 platform darwin 8 {
-       configure.compiler      gcc-4.0
-       configure.args-append   --with-cxx=/usr/bin/g++-4.0
+       configure.compiler      gcc-3.3
+       configure.args-append   --with-cxx=/usr/bin/g++-3.3
 }

 platform darwin 9 {


comment:7 Changed 17 years ago by yaseppochi (Stephen J. Turnbull)

I'm the MeToo, not the OP, and yes, I'm on the PPC platform.

Using gcc-3.3 did fix the saveFP/restFP problem, but I've still got a missing definition for _environ. *sigh*

comment:8 Changed 17 years ago by rhwood@…

ticket:13377 is related to this one, if not a duplicate.

comment:9 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-dev@… to mww@…

I closed #13377 as a duplicate of this one.

comment:10 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: rhwood@… added

comment:11 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

python25 2.5.1_3+darwin_8 builds ok for me on 10.4.11 Intel with Xcode 2.4.1 and MacPorts 1.6.0-rc1. Maybe this is a PowerPC-only problem.

comment:12 Changed 17 years ago by ebgssth@…

python25 @2.5.1_3+darwin_7 works for me on 10.3.9 PPC after applying the patch I submitted. On 10.4.11 intel, python25 just works without any patches.

BTW, the subject of this ticket should be adjusted to help users find this ticket easily.

comment:13 Changed 17 years ago by ebgssth@…

OSX and the restFP/saveFP problem: http://nxg.me.uk/note/2004/restFP/

comment:14 Changed 17 years ago by mww@…

Keywords: python restfp savefp added
Resolution: fixed
Status: newclosed

fixed in #31460 - Python 2.5 does not compile on 10.4/ppc when optimization is not (at least?) -O3

I suppose that some old cruft only gets removed if the optimization is aggressive enough... hmmm...

comment:15 Changed 17 years ago by paulbeard@…

Optimization was the issue? That seems . . . . odd.

comment:16 Changed 17 years ago by yves@…

This is duplicate with ticket:13389

The real problem is using libtool instead of gcc as link command.

Now why that happens with those flags ... serious voodoo stuff

comment:17 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Has duplicate #13389.

comment:18 Changed 17 years ago by ebgssth@…

Resolution: fixed
Status: closedreopened

Reopened this ticket because the problem remains on 10.3. Please commit the patch above and the problem will go away.

comment:19 Changed 17 years ago by yaseppochi (Stephen J. Turnbull)

BTW the problem finding _environ I reported on 2007-11-23 17:45:37 was a PEBKAC. I'd randomly commented out a couple of patches in hopes of finding the breakage and forgot to restore the Modules/posixmodule.c patch.

comment:20 Changed 17 years ago by ebgssth@…

Any update on this?

comment:21 Changed 17 years ago by mww@…

Resolution: fixed
Status: reopenedclosed

o.k. - commited

comment:22 in reply to:  21 Changed 17 years ago by crkrenn@…

Replying to mww@macports.org:

o.k. - commited

Build and install worked for me too.

Thanks!

-Chris

comment:23 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.