Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#14240 closed defect (fixed)

py-scipy fails to build on intel mac, xcode 2.5, tiger

Reported by: dave.iltis@… Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: tenomoto (Takeshi Enomoto), luomo1138@…, shreevatsa.public@…, sanchom (Sancho McCann)
Port:

Description

I am trying to install py-scipy on an intel macbook, OSX 10.4.11, xcode 2.5, macports 1.600, These python ports are installed: py-dateutil @1.3_0 (active) py-matplotlib @0.91.2_0+gtk2 (active) py-mysql @1.2.2_0 (active) py-numpy @1.0.4_8+g95 (active) py-tz @2007c_0 (active) python24 @2.4.4_2+darwin_8 (active) g95 @0.90_3 (active) gnuplot @4.2.2_0 (active)

Shell Output:

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 org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-scipy/work/scipy-0.6.0" && /opt/local/bin/python2.4 setup.py config_fc --fcompiler g95 --f77exec /opt/local/bin/g95 --f90exec /opt/local/bin/g95 build " returned error 1
Command output: /opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common __g95_string_len (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common _f__xargc (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common _f__xargv (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(environ.o) definition of common __g95_my_endian (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(transfer.o) definition of common __g95_scratch (size 304)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(environ.o) definition of common __g95_default_endian (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(array.o) definition of common __g95_section_info (size 112)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(string.o) definition of common __g95_null_string (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(error.o) definition of common __g95_base (size 16)
/opt/local/bin/odlibtool: internal link edit command failed
/opt/local/bin/odld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(error.o) definition of common __g95_filename (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(error.o) definition of common __g95_line (size 16)
build/temp.macosx-10.3-i386-2.4/libmach.a(d1mach.o) definition of common _d9mach_ (size 160)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(transfer.o) definition of common __g95_current_unit (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common __g95_globals (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common __g95_junk_stat (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common __g95_library_return (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(environ.o) definition of common __g95_options (size 160)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common __g95_string_len (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common _f__xargc (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(top.o) definition of common _f__xargv (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(environ.o) definition of common __g95_my_endian (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(transfer.o) definition of common __g95_scratch (size 304)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(environ.o) definition of common __g95_default_endian (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(array.o) definition of common __g95_section_info (size 112)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(string.o) definition of common __g95_null_string (size 16)
/opt/local/bin/../lib/gcc-lib/i386-apple-darwin8.11.1/4.0.3//libf95.a(error.o) definition of common __g95_base (size 16)
/opt/local/bin/odlibtool: internal link edit command failed
error: Command "/opt/local/bin/g95 -dynamiclib -L/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib -lpython2.4 -dynamiclib -L/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib -lpython2.4 build/temp.macosx-10.3-i386-2.4/scipy/integrate/_quadpackmodule.o -Lbuild/temp.macosx-10.3-i386-2.4 -lquadpack -llinpack_lite -lmach -o build/lib.macosx-10.3-i386-2.4/scipy/integrate/_quadpack.so" failed with exit status 1

Error: Status 1 encountered during processing.

Attachments (3)

output.log (249.3 KB) - added by dave.iltis@… 16 years ago.
Output log requested in previous comment
output2.log (243.1 KB) - added by dave.iltis@… 16 years ago.
output3.log (243.6 KB) - added by dave.iltis@… 16 years ago.

Download all attachments as: .zip

Change History (26)

comment:1 Changed 16 years ago by skymoo (Adam Mercer)

Owner: changed from macports-tickets@… to ram@…
Status: newassigned

can you attach the full build log i.e. run

$ sudo port clean py-scipy
$ sudo port -d install py-scipy &> output.log

and attach output.log

Changed 16 years ago by dave.iltis@…

Attachment: output.log added

Output log requested in previous comment

comment:2 Changed 16 years ago by skymoo (Adam Mercer)

Cc: takeshi@… added

I can't reproduce this on Intel Leopard.

Takeshi, as you're the maintainer of g95 have you seen the above links errors from g95 before?

comment:3 Changed 16 years ago by tenomoto (Takeshi Enomoto)

I am not familiar with these errors. Line 5890 in output.log could be a clue.

/opt/local/bin/odld: common symbols not allowed with MH_DYLIB output format with the -multi_module option

comment:4 Changed 16 years ago by skymoo (Adam Mercer)

Thats the only place that -multi_module exists in the log file, its not specified in the scipy port and is not used when building on Leopard - is that coming the odctools linker?

Takeshi: does g95 fail to build on tiger without odcctools?

comment:5 Changed 16 years ago by tenomoto (Takeshi Enomoto)

A quick Google search tells me that -fno-common is needed to remove common symbols. It seems that -fno-common is used when building scipy. It is libf95 that needs this option. In the Portfile for g95 I have just committed, that option is explicitly specified when building libf95.

Adam, could you test scipy with g95-0.90 Revision 4?

comment:6 Changed 16 years ago by skymoo (Adam Mercer)

Thanks Takeshi, builds fine under Leopard.

Dave can you update to g95-0.90_4 and then rebuild py25-numpy and then see if this enables you to build py25-scipy?

Changed 16 years ago by dave.iltis@…

Attachment: output2.log added

comment:7 Changed 16 years ago by dave.iltis@…

I did a selfupdate.

I upgraded to g95-0.90_4 and reinstalled. Py25-numpy installed, but py25-scipy does not.

I upgraded to odcctools @20061117_0 (active) and tried again. No luck.

I attached the new logfile (output2.log).

I also tried installing py-numpy and py-scipy (in hopes of getting them and py-mysql to work together with python24 or 25). Py-scipy did not work either.

thanks Dave

comment:8 Changed 16 years ago by skymoo (Adam Mercer)

same error with both the python24 and python25 versions?

comment:9 Changed 16 years ago by tenomoto (Takeshi Enomoto)

It failed at fftpack this time (output2.log) so I added -fno-common to fftw-3 (3.1.2_2).

BTW, I tried to build py-scipy (0.6.0_5) on Leopard, it stumbled at UMFPACK (cf. ticket 12376).

comment:10 Changed 16 years ago by skymoo (Adam Mercer)

Does applying the patch in #12376 help with the build for you, as it builds fine for me on Leopard. Intel or PPC?

comment:11 Changed 16 years ago by skymoo (Adam Mercer)

Dave, can you try rebuilding after updating to fftw-3 3.1.2_2 after Takeshi added the -fno-common option to build

comment:12 in reply to:  9 Changed 16 years ago by skymoo (Adam Mercer)

Replying to takeshi@macports.org:

BTW, I tried to build py-scipy (0.6.0_5) on Leopard, it stumbled at UMFPACK (cf. ticket 12376).

The OP is not having this problem on Leopard, are you getting the same error as detailed in the ticket?

Changed 16 years ago by dave.iltis@…

Attachment: output3.log added

comment:13 Changed 16 years ago by dave.iltis@…

I did sudo port selfupdate

sudo port upgrade fftw-3

sudo port clean py25-scipy

sudo port install py25-scipy

, which failed.

The output3.log is attached.

I also tried just py-scipy [this failed too, perhaps for different reasons]

comment:14 Changed 16 years ago by tenomoto (Takeshi Enomoto)

g95 on Tiger does require odcctools but there is problems the newest version (#12241). There used to be a stable and a development verisons for odcctools. The use of an old version could be a solution (I will find which).

comment:15 Changed 16 years ago by tenomoto (Takeshi Enomoto)

I tried to build py-scipy on Tiger (PPC and Intel).

On PPC, I stumbled at building the current version of odcctools (20061117). The previous verison (20060608). I can't remember if this version worked with py-scipy.

On Intel odcctools (20061117) builds OK. Of course, py-scipy does not build. I tried to supply -fno-common to g95. I added --f77flags -fno-common and --f90flags -fno-common to fc_options.

There is still a link problem. I wish to supply -Wl,-single_module when g95 tries to build a shared library. I found linkers_so field but I don't know how to change it. (I am not familiar with Python's distutils). LDFLAGS is too much since it is also used to build static libraries with gcc-4.0. This causes another error.

I wonder why py-numpy builds OK and py-scipy causes a problem.

comment:16 Changed 16 years ago by skymoo (Adam Mercer)

Cc: luomo1138@… added

The linking problem is related to the fact that g95 is not a supported fortran compiler for linking numpy/scipy on Mac OS X. numpy will link without issue as it doesn't actually contain any fortran code, whereas a scipy does.

http://projects.scipy.org/pipermail/scipy-user/2008-January/015300.html

What was thought to be the correct linking flags were added to numpy from #14114, in r33616, but there is clearly a problem with these flags on Tiger. I don't have a Tiger system so I cannot reproduce this problem.

comment:17 Changed 16 years ago by tenomoto (Takeshi Enomoto)

Thanks for your comments. Now we need to look at those flags in numpy. Has py-scipy ever built OK on Tiger? Then new options for Leopard are broken for Tiger. What is required is to use different flags for each version.

comment:18 Changed 16 years ago by skymoo (Adam Mercer)

Essentially the fix that was committed in r33616 wasn't really the complete solution, it was really a work around of the problem. What needs to be done is to port numpy/distutils/fcompiler/gnu.py, which specifies all the required flags for gfortran, over to numpy/distutils/fcompiler/g95.py which does the same for g95.

scipy builds OK on Tiger using gcc42, just not using g95 (to my knowledge).

If we can find the appropriate linker flags for Tiger then it should be fairly straightforward then platform darwin 8 could be used to patch g95.py accordingly for Tiger and similarly for Leopard.

comment:19 Changed 16 years ago by skymoo (Adam Mercer)

Cc: shreevatsa.public@… added

comment:20 Changed 16 years ago by sanchom (Sancho McCann)

No news on this? I've run into the same problem.

comment:21 Changed 16 years ago by skymoo (Adam Mercer)

Cc: sanchom@… added

Not yet, in the meantime the gcc42 and gcc43 variants, of both numoy and scipy, work.

comment:22 Changed 16 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: assignedclosed

r37408 removed the various fortran variants from the py-numpy and py25-numpy ports, as these were just unnecessary dependencies. r37409 removed the default g95 variant and made gcc43 the default, these should resolve the build issue seen on Tiger due to g95 not being a supported (by numpy distutils) fortran compiler on Mac OS X.

comment:23 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.