Opened 19 years ago

Closed 19 years ago

#3174 closed defect (fixed)

py-scipy fails to build due to broken g77 dependency

Reported by: Kai.Puolamaki@… Owned by: erickt@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: tom@…, Daniel.hartmanstorfer@…
Port:

Description

py-scipy depends on, among others, g77 port.

However, g77 port fails to build and won't be fixed, see bug 3066, http://bugzilla.opendarwin.org/show_bug.cgi?id=3066

Quoting from 3066:

Resolution: WONTFIX


the g77 port is basically obsolete and should be removed. Try using the gcc34 or gcc4 ports instead as they both include fortran compilers.

Attachments (4)

Portfile (842 bytes) - added by erickt@… 19 years ago.
fixed portfile
Portfile.2 (909 bytes) - added by erickt@… 19 years ago.
fixeder portfile
Portfile.3 (1.1 KB) - added by erickt@… 19 years ago.
fixeder portfile with gcc40 variant
py-scipy.tgz (1.4 KB) - added by erickt@… 19 years ago.
fixed to compile with gcc34 working

Download all attachments as: .zip

Change History (17)

comment:1 Changed 19 years ago by jmpp@…

Owner: changed from darwinports-bugs@… to erickt@…

comment:2 Changed 19 years ago by mww@…

Cc: Daniel.hartmanstorfer@… added

comment:3 Changed 19 years ago by mww@…

* Bug 3201 has been marked as a duplicate of this bug. *

Changed 19 years ago by erickt@…

Attachment: Portfile added

fixed portfile

comment:4 Changed 19 years ago by erickt@…

Resolution: fixed
Status: newclosed

comment:5 Changed 19 years ago by Kai.Puolamaki@…

Resolution: fixed
Status: closedreopened

I replaced the py-scipy portfile. However, it didn't work for me. :( The build failed due to missing g2c library.

x35:~ kaip$ uname -a Darwin x35.local 8.1.0 Darwin Kernel Version 8.1.0: Tue May 10 18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power Macintosh powerpc x35:~ kaip$ port version Version: 1.001 x35:~ kaip$ sudo port install py-scipy ---> Fetching gcc34 ---> Verifying checksum(s) for gcc34 ---> Extracting gcc34 ---> Applying patches to gcc34 ---> Configuring gcc34 ---> Building gcc34 with target bootstrap-lean ---> Staging gcc34 into destroot ---> Packaging tgz archive for gcc34 3.4.3_7+darwin_8 ---> Installing gcc34 3.4.3_7+darwin_8 ---> Activating gcc34 3.4.3_7+darwin_8 ---> Cleaning gcc34 ---> Fetching py-scipy ---> Verifying checksum(s) for py-scipy ---> Extracting py-scipy ---> Applying patches to py-scipy ---> Configuring py-scipy ---> Building py-scipy with target build Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_python_py-scipy/ work/SciPy_complete-0.3.2" && LDFLAGS="-L/opt/local/lib" CFLAGS="-I/opt/local/include/python2.4" /opt/local/bin/python2.4 setup.py build config_fc --f77exec g77-dp-3.4" returned error 1 Command output: Lib/cluster/src/vq_wrap.cpp: At global scope: Lib/cluster/src/vq_wrap.cpp:147: warning: 'void* SWIG_TypeQuery(const char*)' defined but not used Lib/cluster/src/vq_wrap.cpp:301: warning: 'void SWIG_addvarlink(PyObject*, char*, PyObject* (*)(), int (*)(PyObject*))' defined but not used Lib/cluster/src/vq_wrap.cpp:315: warning: 'int SWIG_ConvertPtr(PyObject*, void, swig_type_info*, int)' defined but not used Lib/cluster/src/vq_wrap.cpp:516: warning: 'PyObject* l_output_helper(PyObject*, PyObject*)' defined but not used c++ -bundle -undefined dynamic_lookup -L/opt/local/lib -I/opt/local/include/python2.4 build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/cluster/src/vq_wrap.o -Lbuild/temp.darwin-8.1.0- Power_Macintosh-2.4 -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/cluster/_vq.so building 'scipy.fftpack._fftpack' extension compiling C sources gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno- common -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/opt/local/include/ python2.4' creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build/src creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib/fftpack creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src compile options: '-Ibuild/src -I/Library/Frameworks/Python.framework/Versions/2.4/include/ python2.4 -c' gcc: build/src/fortranobject.c build/src/fortranobject.c: In function 'fortran_doc': build/src/fortranobject.c:123: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' gcc: Lib/fftpack/src/zfftnd.c Lib/fftpack/src/zfftnd.c:35: warning: 'destroy_zfftnd_caches' defined but not used gcc: Lib/fftpack/src/zfft.c gcc: Lib/fftpack/src/zrfft.c gcc: build/src/Lib/fftpack/_fftpackmodule.c gcc: Lib/fftpack/src/drfft.c gcc -bundle -flat_namespace -undefined suppress -L/opt/local/lib build/temp.darwin-8.1.0- Power_Macintosh-2.4/build/src/Lib/fftpack/_fftpackmodule.o build/temp.darwin-8.1.0- Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/drfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zrfft.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/temp.darwin-8.1.0- Power_Macintosh-2.4/build/src/fortranobject.o -L/opt/local/lib/gcc-3.4/gcc/powerpc-apple- darwin8.1.0/3.4.3 -Lbuild/temp.darwin-8.1.0-Power_Macintosh-2.4 -ldfftpack -lg2c -lcc_dynamic -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so /usr/bin/ld: can't locate file for: -lg2c collect2: ld returned 1 exit status /usr/bin/ld: can't locate file for: -lg2c collect2: ld returned 1 exit status error: Command "gcc -bundle -flat_namespace -undefined suppress -L/opt/local/lib build/ temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib/fftpack/_fftpackmodule.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/temp.darwin-8.1.0- Power_Macintosh-2.4/Lib/fftpack/src/drfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/zrfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/fortranobject.o -L/opt/local/lib/gcc-3.4/gcc/ powerpc-apple-darwin8.1.0/3.4.3 -Lbuild/temp.darwin-8.1.0-Power_Macintosh-2.4 -ldfftpack -lg2c - lcc_dynamic -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so" failed with exit status 1

Changed 19 years ago by erickt@…

Attachment: Portfile.2 added

fixeder portfile

comment:6 Changed 19 years ago by erickt@…

attachments.isobsolete: 01

Changed 19 years ago by erickt@…

Attachment: Portfile.3 added

fixeder portfile with gcc40 variant

comment:7 Changed 19 years ago by erickt@…

attachments.isobsolete: 01

comment:8 Changed 19 years ago by Kai.Puolamaki@…

Thanks. The new Portfile (attachment 2524) does not work. :(

After correcting the following typos from attachment 2524

lb/gcc3.4 -> lib/gcc-3.4 lb/gcc4.0 -> lib/gcc-4.0 include/gcc3.4 -> include/gcc-3.4 include/gcc4.0 -> include/gcc-4.0

py-scipy port compile stops with

x35:~ kaip$ sudo port install py-scipy ---> Fetching py-scipy ---> Verifying checksum(s) for py-scipy ---> Extracting py-scipy ---> Applying patches to py-scipy ---> Configuring py-scipy ---> Building py-scipy with target build Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_python_py-scipy/ work/SciPy_complete-0.3.2" && LDFLAGS="-L/opt/local/lib -L/opt/local/lib/gcc-3.4" CFLAGS="-I/opt/ local/include/python2.4 -I{prefix}/include -I{prefix}/include/gcc-3.4" /opt/local/bin/python2.4 setup.py build config_fc --f77exec g77-dp-3.4" returned error 1 Command output: Lib/cluster/src/vq_wrap.cpp: At global scope: Lib/cluster/src/vq_wrap.cpp:147: warning: 'void* SWIG_TypeQuery(const char*)' defined but not used Lib/cluster/src/vq_wrap.cpp:301: warning: 'void SWIG_addvarlink(PyObject*, char*, PyObject* (*)(), int (*)(PyObject*))' defined but not used Lib/cluster/src/vq_wrap.cpp:315: warning: 'int SWIG_ConvertPtr(PyObject*, void, swig_type_info*, int)' defined but not used Lib/cluster/src/vq_wrap.cpp:516: warning: 'PyObject* l_output_helper(PyObject*, PyObject*)' defined but not used c++ -bundle -undefined dynamic_lookup -L/opt/local/lib -L/opt/local/lib/gcc-3.4 -I/opt/local/ include/python2.4 -I{prefix}/include -I{prefix}/include/gcc-3.4 build/temp.darwin-8.1.0- Power_Macintosh-2.4/Lib/cluster/src/vq_wrap.o -Lbuild/temp.darwin-8.1.0-Power_Macintosh-2.4 -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/cluster/_vq.so building 'scipy.fftpack._fftpack' extension compiling C sources gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno- common -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I/opt/local/include/ python2.4 -I{prefix}/include -I{prefix}/include/gcc-3.4' creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build/src creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib/fftpack creating build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src compile options: '-Ibuild/src -I/Library/Frameworks/Python.framework/Versions/2.4/include/ python2.4 -c' gcc: build/src/fortranobject.c build/src/fortranobject.c: In function 'fortran_doc': build/src/fortranobject.c:123: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' gcc: Lib/fftpack/src/zfftnd.c Lib/fftpack/src/zfftnd.c:35: warning: 'destroy_zfftnd_caches' defined but not used gcc: Lib/fftpack/src/zfft.c gcc: Lib/fftpack/src/zrfft.c gcc: build/src/Lib/fftpack/_fftpackmodule.c gcc: Lib/fftpack/src/drfft.c gcc -bundle -flat_namespace -undefined suppress -L/opt/local/lib -L/opt/local/lib/gcc-3.4 build/ temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib/fftpack/_fftpackmodule.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/temp.darwin-8.1.0- Power_Macintosh-2.4/Lib/fftpack/src/drfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/zrfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/fortranobject.o -L/opt/local/lib/gcc-3.4/gcc/ powerpc-apple-darwin8.1.0/3.4.3 -Lbuild/temp.darwin-8.1.0-Power_Macintosh-2.4 -ldfftpack -lg2c - lcc_dynamic -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status /usr/bin/ld: can't locate file for: -lcc_dynamic collect2: ld returned 1 exit status error: Command "gcc -bundle -flat_namespace -undefined suppress -L/opt/local/lib -L/opt/local/lib/ gcc-3.4 build/temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/Lib/fftpack/_fftpackmodule.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfft.o build/temp.darwin-8.1.0- Power_Macintosh-2.4/Lib/fftpack/src/drfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/ fftpack/src/zrfft.o build/temp.darwin-8.1.0-Power_Macintosh-2.4/Lib/fftpack/src/zfftnd.o build/ temp.darwin-8.1.0-Power_Macintosh-2.4/build/src/fortranobject.o -L/opt/local/lib/gcc-3.4/gcc/ powerpc-apple-darwin8.1.0/3.4.3 -Lbuild/temp.darwin-8.1.0-Power_Macintosh-2.4 -ldfftpack -lg2c - lcc_dynamic -o build/lib.darwin-8.1.0-Power_Macintosh-2.4/scipy/fftpack/_fftpack.so" failed with exit status 1

comment:9 Changed 19 years ago by zpincus@…

I got the above error when g++ wasn't able to find the numeric include libraries. Maybe those need to be passed as CFLAGS.

comment:10 Changed 19 years ago by zpincus@…

I finally got SciPy to compile on Tiger (with XCode 2.1 tools.)

While I'm not qualified to write this up as a proper portfile, here's what I now know: (1) Using a recent CVS grab of SciPy is better because the gnufcompiler.py file doesn't need much patching at all. But this may not be necessary.

(2) What is ABSOLUTELY NECESSARY for getting SciPy to work is to compile it (and everything that links with it, such as FFTW) with gcc3.3 or gcc3.4. This is because g77-generated code can only be linked properly with gcc3.x code; if you want to link with gcc4-generated code, you have to compile the fortran with gfortran. Which currently is unsupported (and not working) for SciPy.

So, I think that: (a) The g77 port should be updated to gcc3.4, since there's no interest in fixing g77 for gcc3.3. (b) This should be used together with gcc3.4 to compile SciPy.

Then things will work on Tiger.

Changed 19 years ago by erickt@…

Attachment: py-scipy.tgz added

fixed to compile with gcc34 working

comment:11 Changed 19 years ago by erickt@…

attachments.isobsolete: 01

comment:12 Changed 19 years ago by tom@…

Cc: tom@… added

comment:13 Changed 19 years ago by erickt@…

Resolution: fixed
Status: reopenedclosed

can this be integrated in the the release?

Note: See TracTickets for help on using tickets.