Opened 15 years ago

Closed 14 years ago

#24716 closed defect (fixed)

python config with ccache in CC causes scipy build failure

Reported by: dmmonarres@… Owned by: blb@…
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), skymoo (Adam Mercer), jmroot (Joshua Root), jyrkiwahlstedt, erickt@…
Port: python26 python27 python31

Description

py26-scipy fails to build with a linking error. Fails when trying to link using gcc-4.2.

/opt/local/bin/g++-mp-4.3 /usr/bin/gcc-4.2 -L/opt/local/lib -bundle -undefined dynamic_lookup build/temp.macosx-10.6-x86_64-2.6/scipy/interpolate/src/_interpolate.o -Lbuild/temp.macosx-10.6-x86_64-2.6 -o build/lib.macosx-10.6-x86_64-2.6/scipy/interpolate/_interpolate.so
ld: in /usr/bin/gcc-4.2, can't link with a main executable
collect2: ld returned 1 exit status
ld: in /usr/bin/gcc-4.2, can't link with a main executable
collect2: ld returned 1 exit status

Attached is the full output of port -d install py26-scipy

Attachments (2)

py26-scipy.log (453.6 KB) - added by dmmonarres@… 15 years ago.
py26-scipy-bgrant.log (465.3 KB) - added by bgrant@… 14 years ago.
Full output of: sudo port clean --dist py26-scipy; sudo port -d install py26-scipy

Download all attachments as: .zip

Change History (9)

Changed 15 years ago by dmmonarres@…

Attachment: py26-scipy.log added

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Keywords: python scipy numpy removed
Owner: changed from macports-tickets@… to jmr@…

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

You seem to be using ccache, have you the configureccache option set in ${prefix}/etc/macports/macports.conf? If so try disabling it and try again, after cleaning.

Changed 14 years ago by bgrant@…

Attachment: py26-scipy-bgrant.log added

Full output of: sudo port clean --dist py26-scipy; sudo port -d install py26-scipy

comment:3 in reply to:  2 ; Changed 14 years ago by bgrant@…

Replying to ram@…:

You seem to be using ccache, have you the configureccache option set in ${prefix}/etc/macports/macports.conf? If so try disabling it and try again, after cleaning.

I think I'm having the same problem. I also had ccache enabled initially, but I've disabled it, and I attached the log of cleaning the port and reinstalling.

comment:4 in reply to:  3 ; Changed 14 years ago by jmroot (Joshua Root)

Cc: mcalhoun@… jmr@… added
Owner: changed from jmr@… to blb@…
Port: python26 added
Summary: py26-scipy: link error when building 'scipy.interpolate._interpolate' extensionpython config with ccache in CC causes scipy build failure

Replying to bgrant@…:

I think I'm having the same problem. I also had ccache enabled initially, but I've disabled it, and I attached the log of cleaning the port and reinstalling.

This log shows that ccache is still being used. The configure.ccache setting should not actually make any difference to scipy's portfile. I'm guessing the bad compiler value is being picked up from the python config, which means you would have to rebuild python26 with ccache disabled.

comment:5 in reply to:  4 Changed 14 years ago by dmmonarres@…

That is exactly what we found. Python will build modules with the same compiler that itself was built with. I had to rebuild python2.6 with ccache disabled and the problem went away.

Replying to jmr@…:

Replying to bgrant@…:

I think I'm having the same problem. I also had ccache enabled initially, but I've disabled it, and I attached the log of cleaning the port and reinstalling.

This log shows that ccache is stil being used. The configure.ccache setting should not actually make any difference to scipy's portfile. I'm guessing the bad compiler value is being picked up from the python config, which means you would have to rebuild python26 with ccache disabled.

comment:6 Changed 14 years ago by blb@…

Cc: jwa@… erickt@… added
Port: python27 python31 added; py26-scipy removed

python26 port now set to not use ccache in r68165. I would have kept it building with ccache but stripping it from python's config/Makefile but it looks like using ccache also causes python's configure to not want to use -fwrapv, which is apparently important according to python issue 1608.

CC'ing 2.7 and 3.1 maintainers as they probably also need to disable.

comment:7 Changed 14 years ago by blb@…

Resolution: fixed
Status: newclosed

Confirmed that 2.7 and 3.1 both miss -fwrapv with ccache enabled, so it's disabled there as well in r68616.

Note: See TracTickets for help on using tickets.