ornladios / ADIOS2

Next generation of ADIOS developed in the Exascale Computing Program
https://adios2.readthedocs.io/en/latest/index.html
Apache License 2.0
271 stars 126 forks source link

Link failure with Python #2368

Open NAThompson opened 4 years ago

NAThompson commented 4 years ago

On Ubuntu 18.04, on top of the latest master, we have

build$ cmake -DADIOS2_USE_Python=ON ../ -G Ninja
build$ ninja
[263/613] Linking CXX executable bin/adios2_reorganize_mpi
FAILED: bin/adios2_reorganize_mpi 
: && /usr/bin/c++  -O3 -DNDEBUG  -L/usr/lib -pthread source/utils/CMakeFiles/adios_reorganize_mpi.dir/adios_reorganize/main.cpp.o source/utils/CMakeFiles/adios_reorganize_mpi.dir/adios_reorganize/Reorganize.cpp.o source/utils/CMakeFiles/adios_reorganize_mpi.dir/Utils.cpp.o  -o bin/adios2_reorganize_mpi  -Wl,-rpath,/home/4nt/ADIOS2/build/lib:/usr/local/lib:/usr/lib/x86_64-linux-gnu/openmpi/lib:  lib/libadios2_core_mpi.so.2.6.0  lib/libadios2_core.so.2.6.0  -pthread  /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so  -Wl,-rpath-link,/usr/local/lib:/home/4nt/ADIOS2/build/lib && :
lib/libadios2_core.so.2.6.0: undefined reference to `CMderef_and_copy_list'
collect2: error: ld returned 1 exit status

The only reference I found to CMderef_and_copy_list is here.

eisenhauer commented 4 years ago

CMderef_and_copy_list was added to EVPath (and pulled into ADIOS2) to fix a race condition a month or so ago. You might look around for old library versions interfering somehow...

NAThompson commented 4 years ago

@eisenhauer : Here's where CMake finds EVPath:

-- ADIOS2 ThirdParty: Configuring EVPath
-- Found atl: /home/4nt/ADIOS2/build/thirdparty/atl/atl/atl-config.cmake (found suitable version "2.2.1", minimum required is "2.2.1") 
-- Found atl: /home/4nt/ADIOS2/build/thirdparty/atl/atl/atl-config.cmake (found version "2.2.1") 
-- Found ffs: /home/4nt/ADIOS2/build/thirdparty/ffs/ffs/ffs-config.cmake (found suitable version "1.6.0", minimum required is "1.5.1") 
-- Found enet: /home/4nt/ADIOS2/build/thirdparty/enet/enet/enet-config.cmake (found suitable version "1.3.14", minimum required is "1.3.13") 
-- Found atl: /home/4nt/ADIOS2/build/thirdparty/atl/atl/atl-config.cmake (found suitable version "2.2.1", minimum required is "2.2.1") 
-- Found atl: /home/4nt/ADIOS2/build/thirdparty/atl/atl/atl-config.cmake (found version "2.2.1") 
-- Found ffs: /home/4nt/ADIOS2/build/thirdparty/ffs/ffs/ffs-config.cmake (found suitable version "1.6.0", minimum required is "1.6.0") 

This is the correct internal directory; not a version on the syspath.

eisenhauer commented 4 years ago

Check to see that you've actually got CMderef_and_copy_list in your build tree. A grep -R should deliver something like: (venv-cheetah) bash-3.2$ grep -R CMderef_and_copy_list ~/prog/ADIOS2 /Users/eisen/prog/ADIOS2/source/adios2/toolkit/sst/cp/cp_common.c: CMderef_and_copy_list(Stream->CPInfo->SharedCM->cm, ContactList); Binary file /Users/eisen/prog/ADIOS2/build/bin/sst_conn_tool matches Binary file /Users/eisen/prog/ADIOS2/build/source/adios2/toolkit/sst/CMakeFiles/sst.dir/cp/cp_common.c.o matches Binary file /Users/eisen/prog/ADIOS2/build/lib/libadios2_core.2.dylib matches Binary file /Users/eisen/prog/ADIOS2/build/lib/libadios2_core.dylib matches Binary file /Users/eisen/prog/ADIOS2/build/lib/libadios2_core.2.6.0.dylib matches Binary file /Users/eisen/prog/ADIOS2/build/lib/libadios2_evpath.dylib matches Binary file /Users/eisen/prog/ADIOS2/build/thirdparty/EVPath/EVPath/CMakeFiles/EVPath.dir/cm_interface.c.o matches Binary file /Users/eisen/prog/ADIOS2/build/thirdparty/EVPath/EVPath/CMakeFiles/EVPath.dir/cm.c.o matches /Users/eisen/prog/ADIOS2/build/thirdparty/EVPath/EVPath/cm_interface.c:CMderef_and_copy_list ( CManager cm, attr_list attrs ) /Users/eisen/prog/ADIOS2/build/thirdparty/EVPath/EVPath/cm_interface.c: ret = INT_CMderef_and_copy_list(cm, attrs); /Users/eisen/prog/ADIOS2/thirdparty/EVPath/EVPath/cm_internal.h:extern attr_list INT_CMderef_and_copy_list(CManager cm, attr_list attrs); /Users/eisen/prog/ADIOS2/thirdparty/EVPath/EVPath/evpath.h:CMderef_and_copy_list(CManager cm, attr_list attrs); /Users/eisen/prog/ADIOS2/thirdparty/EVPath/EVPath/cm.c:INT_CMderef_and_copy_list(CManager cm, attr_list attrs) (venv-cheetah) bash-3.2$ If it does, then somehow the link is not getting the right version of the library.

NAThompson commented 4 years ago

@eisenhauer : You're correct; it picked up an old lib from /usr/local/lib. Ostensibly that's a bug since CMake should be picking this up from the build tree, but probably not a high priority issue.

Feel free to close; or leave open so we can fix the CMake config at our convenience.