Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Numpy + OpenCV autodetection to SCons #173

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rtburns-jpl
Copy link
Member

else:
print("Numpy not found. Attempting to autodetect...")
try:
import numpy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is tricky because scons could be using a different python version than the one being used for installation - notably macports. Its lot easier with cmake to do this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think I have always used the scons from Python2. Not sure why I got started with that, but I never changed it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. Unless you know how to have scons invoke the python used for installation, maybe I should just disable this when scons is using python 2.

@rtburns-jpl
Copy link
Member Author

Hmm, I removed opencv from from the installation prereq list to test the autodetect fallback, but dependency resolution still failed. Is there another package conflict occurring in our prereqs?

@piyushrpt
Copy link
Member

hdf5 might need to be pinned. I think the new version still hasnt propagated to all the feedstocks.

@EJFielding
Copy link
Contributor

We also had a problem with HDF5 library requirement. @nicodalse had installed the ISCE2 requirements with conda and did a build. The resulting executables were pulling in an HDF5 library from /lib64 on our Linux server instead of using the one from his conda installation. I don't know if this is the same problem. I recommended that he try using cmake instead of scons but he had other problems.

@nicodalse
Copy link

Yes, opencv gave me a lot of conflicts and the hdf5 library get me this error also in a new virtual env:

SafetyError: The package for hdf5 located at /u/aa/seno/miniconda3/pkgs/hdf5-1.10.5-nompi_h3c11f04_1104
appears to be corrupted. The path 'lib/libhdf5_cpp.so.103.1.0'
has an incorrect size.
 reported size: 593616 bytes
 actual size: 347944 bytes
SafetyError: The package for hdf5 located at /u/aa/seno/miniconda3/pkgs/hdf5-1.10.5-nompi_h3c11f04_1104
appears to be corrupted. The path 'lib/libhdf5_fortran.so.102.0.0'
has an incorrect size.
 reported size: 405384 bytes
 actual size: 299176 bytes
SafetyError: The package for hdf5 located at /u/aa/seno/miniconda3/pkgs/hdf5-1.10.5-nompi_h3c11f04_1104
appears to be corrupted. The path 'lib/libhdf5_hl.so.100.1.2'
has an incorrect size.
 reported size: 163864 bytes
 actual size: 144968 bytes
SafetyError: The package for hdf5 located at /u/aa/seno/miniconda3/pkgs/hdf5-1.10.5-nompi_h3c11f04_1104
appears to be corrupted. The path 'lib/libhdf5_hl_cpp.so.100.1.3'
has an incorrect size.
 reported size: 23512 bytes
 actual size: 11336 bytes
SafetyError: The package for hdf5 located at /u/aa/seno/miniconda3/pkgs/hdf5-1.10.5-nompi_h3c11f04_1104
appears to be corrupted. The path 'lib/libhdf5hl_fortran.so.100.0.4'
has an incorrect size.
 reported size: 168008 bytes
 actual size: 99208 bytes

@piyushrpt
Copy link
Member

these errors seem to be driver driven due to environment issues and not due to conda. The conda issue is that none of the package versions are pinned and there should be no issues if they are pinned like it is done on raider / mintpy. Quickest way is to see dependencies used by isce2 conda package and use same package versions for hdf5 and gdal.

@EJFielding
Copy link
Contributor

I heard from @nicodalse that he was able to merge my uavsar PR branch with the cmake branch from @rtburns-jpl and get the build with cmake to work in his Linux conda environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants