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

BUG: New linking issue on 1.12.2 for macOS x86_64 CPython #178

Open
1 task done
larsoner opened this issue Jul 29, 2022 · 4 comments
Open
1 task done

BUG: New linking issue on 1.12.2 for macOS x86_64 CPython #178

larsoner opened this issue Jul 29, 2022 · 4 comments
Labels

Comments

@larsoner
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

In a dependent conda-forge library (OpenMEEG), the tickbot's update to 1.12.2 failed on OSX x86_64 CPython only (PyPy okay, arm64 okay, Windows/linux okay):

conda-forge/openmeeg-feedstock#28

https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=543348&view=logs&jobId=9c5ef928-2cd6-52e5-dbe6-9d173a7d951b&j=9c5ef928-2cd6-52e5-dbe6-9d173a7d951b&t=20c71c51-4b27-578b-485d-06ade2de1d00

[11/86] Linking CXX shared library OpenMEEGMaths/libOpenMEEGMaths.1.1.0.dylib
FAILED: OpenMEEGMaths/libOpenMEEGMaths.1.1.0.dylib 
: && $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -lgfortran -fopenmp=libomp -O3 -DNDEBUG -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9 -dynamiclib -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib   -compatibility_version 1.0.0 -current_version 1.1.0 -o OpenMEEGMaths/libOpenMEEGMaths.1.1.0.dylib -install_name @rpath/libOpenMEEGMaths.1.dylib OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/vector.cpp.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/matrix.cpp.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/symmatrix.cpp.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/sparse_matrix.cpp.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/fast_sparse_matrix.cpp.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/MathsIO.C.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/MatlabIO.C.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/AsciiIO.C.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/BrainVisaTextureIO.C.o OpenMEEGMaths/CMakeFiles/OpenMEEGMaths.dir/src/TrivialBinIO.C.o  $PREFIX/lib/libmatio.a  $PREFIX/lib/libopenblas.a  $PREFIX/lib/libomp.dylib  $PREFIX/lib/libhdf5.a  $PREFIX/lib/libcrypto.dylib  $PREFIX/lib/libcurl.dylib  /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libpthread.dylib  $PREFIX/lib/libz.dylib  /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libdl.dylib  /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libm.dylib && :
ld: warning: -pie being ignored. It is only used when linking a main executable
Undefined symbols for architecture x86_64:
  "_MPI_Allgather", referenced from:
      _H5_mpio_gatherv_alloc_simple in libhdf5.a(H5mpi.o)
      _H5D__mpio_redistribute_shared_chunks in libhdf5.a(H5Dmpio.o)
  "_MPI_Allgatherv", referenced from:
      _H5_mpio_gatherv_alloc in libhdf5.a(H5mpi.o)
...

I can look into adding an extra linker flag on osx x86_64 to overcome this, but it seems like it might be a bug with the packing here, so I figured I'd raise an issue!

Installed packages

Recipe:

https://github.com/conda-forge/openmeeg-feedstock/blob/main/recipe/meta.yaml

Environment info

See recipe and build logs
@larsoner larsoner added the bug label Jul 29, 2022
@hmaarrfk
Copy link
Contributor

Why is hdf5 and hdf5 static both getting installed. I feel like the linker might be getting confused.

Why do you need the static builds?

@larsoner
Copy link
Author

Why is hdf5 and hdf5 static both getting installed.

I thought there was only hdf5-static on Windows (hence the selector), it wasn't present on the other OSes when I tried some time ago (but the static versions shipped with plain hdf5)

I feel like the linker might be getting confused.

Could be, but I'm not sure why this would be new, or isolated to macOS. Seems like there's something to understand at least!

Why do you need the static builds?

We build the C++ library against static OpenBLAS, and in the cmake internals this makes it do static HDF5 as well. This can probably be changed at our end, but I'm not sure how easy it would be. We also could move to using dynamically linked OpenBLAS, but I'm not sure that would interact with someone wanting to use NumPy+MKL at the same time for example. (Maybe it doesn't interact at all and they can both be installed at once, which would be great!)

@hmaarrfk
Copy link
Contributor

For blas and mkl. There are guidelines that you can link to netlib, which will allow your program to switch between the two.

@hmaarrfk
Copy link
Contributor

Otherwise, i don't think you can have both installed at the same time, but i could be very wrong.

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

No branches or pull requests

2 participants