Relation problem during compilation
/usr/bin/ld: hwloc-prefix/src/hwloc-build/hwloc/topology-linux.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `cmi_hwloc_alloc_mmap' which may bind externally can not be used when making a sha
red object; recompile with -fPIC
I'm configuring with
cmake -D CMAKE_INSTALL_PREFIX=/work/00434/eijkhout/charmpp/installation-charmpp-8.0.0-vista-nvidia24.9-openmpi5.0.5_nvc249 -D CMAKE_COLOR_DIAGNOSTICS=OFF -D CMAKE_VERBOSE_MAKEFILE=ON -D BUILD_SHARED_LIBS=ON -D NETWORK=mpi -D CMAKE_POSITION_INDEPENDENT_CODE=ON /work/00434/eijkhout/charmpp/charmpp-8.0.0/
so the fPIC flag should be covered. Maybe you're not propagating it?
I get the same problem with gcc14
I would suggest you try using the build script to install charm++, as opposed to directly using cmake, and see if that resolves your issue.
Starting from version 7.0, Charm++ uses the CMake-based build system
when building with the ./build command. To use the old configure-based build
system, you can build with the ./buildold command with the same options.
We intend to remove the old build system in Charm++ 7.1.
?
But sure, the build script works. However, it only creates static libraries. How do I tell it to make shared?
--build-shared
Ok, that builds the shared & static in two separate directories. (Not great, usually that's combined in one directory.)
- How do I pass that option to the cmake install?
- I can't get a prefix dir set: I build
./build charm++ ucx-linux-arm8 --build-shared --basedir=$(pwd)/../installation-old --force
but the basedir seems to be ignored.
Let me ask that last one separately.