[MacPorts] #24942: py26-numpy 1.4.1 undefined symbols in lapack_litemodule
MacPorts
noreply at macports.org
Sun Sep 19 11:59:16 PDT 2010
#24942: py26-numpy 1.4.1 undefined symbols in lapack_litemodule
-------------------------------------+--------------------------------------
Reporter: and.damore@… | Owner: mcalhoun@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.9.99
Keywords: | Port: py26-numpy
-------------------------------------+--------------------------------------
Comment(by michaelld@…):
Hmm .. I tried what another person with this issue wrote (default Portfile
with -gcc44) and it errors out the same for the rest of this ticket. So,
I'm attaching a patch file (goes into .../python/py26-numpy/files ) as
well as a Portfile diff -- it just adds this new file to the list of
patches applied to the source (no matter what).
The issue is that LDFLAGS exists in the environment used to setup the
linalg module, overriding the default values "-undefined dynamic_lookup
-bundle". Without those values, the build errors out due to undefined
symbols from -lpython. Since loading happens inside Python, these symbols
already exist in the process, and hence are not necessary for linking the
module. The source code patch just adds these flags to the linking of the
linalg library.
If you want to try out these patches, download them from this ticket &
then follow this "script" which will keep the old Portfile around for easy
restoring. I'll assume you've downloaded the files to ~/Desktop, so
change this directory as need be:
{{{
sudo port clean py26-numpy
cd `port dir py26-numpy`
sudo cp ~/Desktop/patch-numpy_linalg_setup.py.diff files
sudo cp Portfile Portfile_orig
sudo patch -p0 < ~/Desktop/py26-numpy_Portfile.diff
sudo port -d build py26-numpy -gcc44
}}}
and see if that works. You can also try "-gcc44 +universal" if your MP
setup can do universal.
To restore everything back to normal, do:
{{{
cd `port dir py26-numpy`
sudo rm files/patch-numpy_linalg_setup.py.diff
sudo rm Portfile
sudo mv Portfile_orig Portfile
}}}
NOTE: This patch is for this ticket's issue only, by bypassing the use of
gcc4X. This practice is not recommended by numpy upstream when using
+atlas because atlas is compiled with gcc4X -- but it does seem to work.
If the above works for you, please finish the install then go and try a
Python program that uses numpy to see if it works for you.
--
Ticket URL: <https://trac.macports.org/ticket/24942#comment:12>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list