#22033 closed defect (fixed)
py26-scientific fails to build
Reported by: | singingwolfboy@… | Owned by: | adfernandes (Andrew Fernandes) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.1 |
Keywords: | Cc: | stromnov (Andrey Stromnov) | |
Port: | py26-scientific |
Description
After upgrading my python26 port to the latest version (2.6.3 rev 1), py26-scientific fails to build with the following error message:
---> Building py26-scientific 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_py26-scientific/work/ScientificPython-2.8" && /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 setup.py --no-user-cfg build " returned error 1 Command output: Src/Scientific_netcdf.c:1687: error: 'array' undeclared (first use in this function) Src/Scientific_netcdf.c:1687: error: invalid operands to binary * Src/Scientific_netcdf.c:1687: warning: statement with no effect Src/Scientific_netcdf.c:1741: error: syntax error before ')' token Src/Scientific_netcdf.c:1750: error: request for member 'data' in something not a structure or union Src/Scientific_netcdf.c:1782: error: request for member 'nd' in something not a structure or union Src/Scientific_netcdf.c:1782: warning: assignment makes integer from pointer without a cast Src/Scientific_netcdf.c:1789: error: request for member 'dimensions' in something not a structure or union Src/Scientific_netcdf.c:1792: error: request for member 'dimensions' in something not a structure or union Src/Scientific_netcdf.c:1793: error: request for member 'dimensions' in something not a structure or union Src/Scientific_netcdf.c:1794: error: request for member 'dimensions' in something not a structure or union Src/Scientific_netcdf.c:1823: error: request for member 'data' in something not a structure or union Src/Scientific_netcdf.c:1863: error: request for member 'ob_refcnt' in something not a structure or union Src/Scientific_netcdf.c:1863: error: wrong type argument to decrement Src/Scientific_netcdf.c:1863: error: request for member 'ob_type' in something not a structure or union Src/Scientific_netcdf.c:1863: error: request for member 'tp_dealloc' in something not a structure or union Src/Scientific_netcdf.c:1863: error: called object '*(&<erroneous-expression>)' is not a function Src/Scientific_netcdf.c:1863: warning: statement with no effect Src/Scientific_netcdf.c: In function 'PyNetCDFVariable_WriteString': Src/Scientific_netcdf.c:1879: warning: comparison between pointer and integer Src/Scientific_netcdf.c: In function 'PyNetCDFVariableObject_item': Src/Scientific_netcdf.c:1919: warning: return makes pointer from integer without a cast Src/Scientific_netcdf.c: In function 'PyNetCDFVariableObject_slice': Src/Scientific_netcdf.c:1937: warning: return makes pointer from integer without a cast Src/Scientific_netcdf.c: In function 'PyNetCDFVariableObject_subscript': Src/Scientific_netcdf.c:1960: warning: return makes pointer from integer without a cast Src/Scientific_netcdf.c:1997: warning: return makes pointer from integer without a cast Src/Scientific_netcdf.c: In function 'initScientific_netcdf': Src/Scientific_netcdf.c:2235: warning: implicit declaration of function 'import_array' error: command '/usr/bin/gcc-4.0' failed with exit status 1 Error: Unable to upgrade port: 1
This is on 10.5.8, Intel Macbook.
Attachments (3)
Change History (17)
comment:1 Changed 15 years ago by adfernandes (Andrew Fernandes)
comment:2 Changed 15 years ago by singingwolfboy@…
After a sudo port sync
, sudo port clean py26-scientific
, and sudo port upgrade outdated
, I still got the exact same error.
comment:3 follow-up: 4 Changed 15 years ago by adfernandes (Andrew Fernandes)
Okay - I just uninstalled, cleaned, and re-installed, without a problem.
Which version and variant of netcdf do you have installed? The latest is 4.0.1 revision 7.
If this version/revision is what you already have, can you please try re-installing netcdf with the +netcdf4
variant? (It will install hdf5-18 as a dependency).
Your build log indicates that there's something screwy with netcdf.
(FYI - I know from other tickets that at least one other py26-scientific
user has this running... but netcdf
has been a sufficient pain that I'd really like to track this down!)
comment:4 follow-up: 6 Changed 15 years ago by singingwolfboy@…
I went as far as uninstalling py26-scientific, netcdf, and hdf5-18, and reinstalling all of them. (For netcdf, I used both the "netcdf4" and "docs" variants). Same error message. Weird. Why would it work for you but not for me? Are you also running Leopard?
comment:5 Changed 15 years ago by stromnov (Andrey Stromnov)
Cc: | stromnov@… added |
---|
Please, try to build with debug flag (-d). Probably py26-scientific implicitly needs one of py26-numpy or py26-numeric installed.
comment:6 follow-up: 7 Changed 15 years ago by adfernandes (Andrew Fernandes)
Replying to singingwolfboy@…:
I went as far as uninstalling py26-scientific, netcdf, and hdf5-18, and reinstalling all of them. (For netcdf, I used both the "netcdf4" and "docs" variants). Same error message. Weird. Why would it work for you but not for me? Are you also running Leopard?
Yes - 10.5.8, latest dev tools, etc. The suggestion that perhaps py26-numpy or py26-numeric is required is implicitly required a good one; I've got them both.
comment:7 Changed 15 years ago by adfernandes (Andrew Fernandes)
Replying to adfernandes@…:
Replying to singingwolfboy@…:
I went as far as uninstalling py26-scientific, netcdf, and hdf5-18, and reinstalling all of them. (For netcdf, I used both the "netcdf4" and "docs" variants). Same error message. Weird. Why would it work for you but not for me? Are you also running Leopard?
Yes - 10.5.8, latest dev tools, etc. The suggestion that perhaps py26-numpy or py26-numeric is required is implicitly required a good one; I've got them both.
Thanks for doing all those reinstalls, BTW. I've just checked my shared libraries for py26-scientific and get the following:
Assam:ports andrew$ otool -L `port contents py26-scientific | fgrep .so` /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Scientific/darwin/Scientific_affinitypropagation.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Scientific/darwin/Scientific_interpolation.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Scientific/darwin/Scientific_netcdf.so: /opt/local/lib/libnetcdf.6.dylib (compatibility version 7.0.0, current version 7.0.0) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Scientific/darwin/Scientific_numerics_package_id.so: /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Scientific/darwin/Scientific_vector.so: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.4) /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
By the look of it, Scientific_netcdf.so
is the only library that requires a non-system dylib, and only /opt/local/lib/libnetcdf.6.dylib
at that. (Well, that's a runtime link dependency, but it would be weird if it had a build dependency on one of the other ports mentioned...!)
Changed 15 years ago by singingwolfboy@…
Attachment: | py26-scientific-debug.txt added |
---|
comment:8 follow-up: 9 Changed 15 years ago by singingwolfboy@…
Debug log is attached. I have py26-numeric installed, but not py26-numpy. Maybe that's the issue?
comment:9 Changed 15 years ago by adfernandes (Andrew Fernandes)
Replying to singingwolfboy@…:
Debug log is attached. I have py26-numeric installed, but not py26-numpy. Maybe that's the issue?
Thanks! Yes, your logs report the first error as
running build_ext 1174 building 'Scientific_netcdf' extension 1175 creating build/temp.macosx-10.5-i386-2.6 1176 creating build/temp.macosx-10.5-i386-2.6/Src 1177 /usr/bin/gcc-4.0 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py26-scientific/work/ScientificPython-2.8/Include -IInclude -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c Src/Scientific_netcdf.c -o build/temp.macosx-10.5-i386-2.6/Src/Scientific_netcdf.o -DNUMPY=1 1178 Src/Scientific_netcdf.c:14:31: error: numpy/arrayobject.h: No such file or directory 1179 In file included from Src/Scientific_netcdf.c:25:
When I locate the file in my system:
Assam:~ andrew$ mdfind arrayobject.h | grep "numpy/arrayobject.h" /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/include/numpy/arrayobject.h /opt/local/lib/python2.5/site-packages/numpy/core/include/numpy/arrayobject.h /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/core/include/numpy/arrayobject.h /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/include/numpy/arrayobject.h
So, yes, please try installing py26-numpy and see if the problem goes away. That would be nice if the problem was only an undeclared dependency.
(I think this is a bug in py26-scientific, because the build docs say that numpy is not required.)
comment:10 Changed 15 years ago by singingwolfboy@…
Yep, after I installed py26-numpy (and py26-nose which came along as a dependency), py26-scientific installed just fine.
Changed 15 years ago by stromnov (Andrey Stromnov)
Attachment: | Portfile.diff added |
---|
Changed 15 years ago by stromnov (Andrey Stromnov)
Attachment: | patch-Src-MPI-compile.py.diff added |
---|
comment:11 Changed 15 years ago by stromnov (Andrey Stromnov)
I'd just upload fixes for this ticket and some fixes for +mpi variant.
comment:12 Changed 15 years ago by stromnov (Andrey Stromnov)
BTW: py26-scientific uses some magic for determining NumPy, Numeric or Numarray modules. Numeric and Numarray were obsoleted by NumPy few years ago. So we can explicitly set dependency on py26-numpy.
comment:13 Changed 15 years ago by adfernandes (Andrew Fernandes)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks muchly - tested out fine. Committed in r59361.
comment:14 Changed 15 years ago by adfernandes (Andrew Fernandes)
... and about 10 seconds later to include the patchfile r59363. Oopsie. :-)
Hmm... try re-syncing ports; py26-scientific should be at version 2.8 revision 1, now.