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

Some 32-bit platforms need linking to libatomic #67

Open
barracuda156 opened this issue Jan 3, 2024 · 0 comments
Open

Some 32-bit platforms need linking to libatomic #67

barracuda156 opened this issue Jan 3, 2024 · 0 comments

Comments

@barracuda156
Copy link

barracuda156 commented Jan 3, 2024

For instance, build fails on ppc:

[ 33%] Linking CXX shared library libngla.dylib
cd /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_math_ngsolve/ngsolve/work/build/linalg && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/ngla.dir/link.txt --verbose=ON
/opt/local/bin/g++-mp-13 -pipe -Os -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -dynamiclib -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -o libngla.dylib -install_name /opt/local/lib/libngla.dylib CMakeFiles/ngla.dir/basematrix.cpp.o CMakeFiles/ngla.dir/basevector.cpp.o CMakeFiles/ngla.dir/multivector.cpp.o CMakeFiles/ngla.dir/blockjacobi.cpp.o CMakeFiles/ngla.dir/cg.cpp.o CMakeFiles/ngla.dir/chebyshev.cpp.o CMakeFiles/ngla.dir/commutingAMG.cpp.o CMakeFiles/ngla.dir/eigen.cpp.o CMakeFiles/ngla.dir/jacobi.cpp.o CMakeFiles/ngla.dir/order.cpp.o CMakeFiles/ngla.dir/pardisoinverse.cpp.o CMakeFiles/ngla.dir/sparsecholesky.cpp.o CMakeFiles/ngla.dir/sparsematrix.cpp.o CMakeFiles/ngla.dir/sparsematrix_dyn.cpp.o CMakeFiles/ngla.dir/special_matrix.cpp.o CMakeFiles/ngla.dir/superluinverse.cpp.o CMakeFiles/ngla.dir/mumpsinverse.cpp.o CMakeFiles/ngla.dir/elementbyelement.cpp.o CMakeFiles/ngla.dir/arnoldi.cpp.o CMakeFiles/ngla.dir/paralleldofs.cpp.o CMakeFiles/ngla.dir/python_linalg.cpp.o CMakeFiles/ngla.dir/umfpackinverse.cpp.o CMakeFiles/ngla.dir/__/parallel/parallelvvector.cpp.o CMakeFiles/ngla.dir/__/parallel/parallel_matrices.cpp.o  -Wl,-rpath,"\$ORIGIN" -Wl,-rpath,"\$ORIGIN/" /opt/local/lib/libumfpack.dylib /opt/local/lib/libcholmod.dylib /opt/local/lib/libamd.dylib /opt/local/lib/libccolamd.dylib /opt/local/lib/libsuitesparseconfig.dylib ../basiclinalg/libngbla.dylib ../ngstd/libngstd.dylib -Wl,-framework,Accelerate /opt/local/lib/libnglib.dylib /opt/local/lib/libngcore.dylib /opt/local/Library/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib 
Undefined symbols:
  "___atomic_compare_exchange_8", referenced from:
      __ZNSt6atomicIdE21compare_exchange_weakERddSt12memory_order in basevector.cpp.o
      __ZNSt6atomicIdE21compare_exchange_weakERddSt12memory_order in sparsecholesky.cpp.o
      __ZNSt6atomicIdE21compare_exchange_weakERddSt12memory_order in sparsematrix.cpp.o
      __ZZNK4ngla22ElementByElementMatrixIdE7MultAddEdRKNS_10BaseVectorERS2_ENKUlRKN6ngcore8TaskInfoEE_clES9_ in elementbyelement.cpp.o
      __ZZNK4ngla22ElementByElementMatrixIdE12MultTransAddEdRKNS_10BaseVectorERS2_ENKUlRKN6ngcore8TaskInfoEE_clES9_ in elementbyelement.cpp.o
  "___atomic_load_8", referenced from:
      __ZN4ngla10BaseVector11AddIndirectEN6ngcore9FlatArrayIimEEN5ngbla10VectorViewIdmSt17integral_constantIiLi1EEEEb in basevector.cpp.o
      __ZZNK4ngla15BaseVectorPtrMV13InnerProductDERKNS_11MultiVectorEENKUliE_clEi in basevector.cpp.o
      __ZN5ngbla9AtomicAddERSt7complexIdES1_ in basevector.cpp.o
      __ZN5ngbla9AtomicAddERSt7complexIdES1_ in basevector.cpp.o
      __ZNK4ngla14SparseCholeskyIdddE10SolveBlockEiN5ngbla10VectorViewIdmSt17integral_constantIiLi1EEEE in sparsecholesky.cpp.o
      __ZN5ngbla9AtomicAddERSt7complexIdES1_ in sparsecholesky.cpp.o
      __ZN5ngbla9AtomicAddERSt7complexIdES1_ in sparsecholesky.cpp.o
      __ZZNK4ngla14SparseCholeskyIdddE14SolveReorderedEN5ngbla10VectorViewIdmSt17integral_constantIiLi1EEEEENKUliE_clEi in sparsecholesky.cpp.o
      __ZZNK4ngla14SparseCholeskyIdddE14SolveReorderedEN5ngbla10VectorViewIdmSt17integral_constantIiLi1EEEEENKUliE_clEi in sparsecholesky.cpp.o
      __ZZNK4ngla14SparseCholeskyIdddE14SolveReorderedEN5ngbla10VectorViewIdmSt17integral_constantIiLi1EEEEENKUliE1_clEi in sparsecholesky.cpp.o
      __ZN5ngbla9AtomicAddILi1EdNS_9MinusExprINS_3VecILi1EKdEEEEEEvRNS2_IXT_ET0_EET1_ in sparsecholesky.cpp.o
      __ZN5ngbla9AtomicAddILi2EdNS_9MinusExprINS_3VecILi2EKdEEEEEEvRNS2_IXT_ET0_EET1_ in sparsecholesky.cpp.o
      __ZN5ngbla9AtomicAddILi3EdNS_9MinusExprINS_3VecILi3EKdEEEEEEvRNS2_IXT_ET0_EET1_ in sparsecholesky.cpp.o
      __ZN5ngbla9AtomicAddERSt7complexIdES1_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddERSt7complexIdES1_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddILi1ELi1EdNS_3MatILi1ELi1EdEEEEvRNS1_IXT_EXT0_ET1_EET2_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddILi2ELi2EdNS_3MatILi2ELi2EdEEEEvRNS1_IXT_EXT0_ET1_EET2_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddILi1ELi2EdNS_3MatILi1ELi2EdEEEEvRNS1_IXT_EXT0_ET1_EET2_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddILi2ELi1EdNS_3MatILi2ELi1EdEEEEvRNS1_IXT_EXT0_ET1_EET2_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddILi3ELi3EdNS_3MatILi3ELi3EdEEEEvRNS1_IXT_EXT0_ET1_EET2_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddILi1ELi3EdNS_3MatILi1ELi3EdEEEEvRNS1_IXT_EXT0_ET1_EET2_ in sparsematrix.cpp.o
      __ZN5ngbla9AtomicAddILi3ELi1EdNS_3MatILi3ELi1EdEEEEvRNS1_IXT_EXT0_ET1_EET2_ in sparsematrix.cpp.o
      __ZN4ngla14SparseMatrixTMIdE16AddElementMatrixEN6ngcore9FlatArrayIimEES4_N5ngbla10MatrixViewIdLNS5_8ORDERINGE1ENS5_14undefined_sizeES8_mEEb in sparsematrix.cpp.o
      __ZN4ngla14SparseMatrixTMIdE25AddElementMatrixSymmetricEN6ngcore9FlatArrayIimEEN5ngbla10MatrixViewIdLNS5_8ORDERINGE1ENS5_14undefined_sizeES8_mEEb in sparsematrix.cpp.o
      __ZZNK4ngla22ElementByElementMatrixIdE7MultAddEdRKNS_10BaseVectorERS2_ENKUlRKN6ngcore8TaskInfoEE_clES9_ in elementbyelement.cpp.o
      __ZZNK4ngla22ElementByElementMatrixIdE12MultTransAddEdRKNS_10BaseVectorERS2_ENKUlRKN6ngcore8TaskInfoEE_clES9_ in elementbyelement.cpp.o
ld: symbol(s) not found

Configure should check for 8-byte atomics support without libatomic, if it is not detected, then pass -latomic ldflag.

Related: NGSolve/netgen#169

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

No branches or pull requests

1 participant