charm icon indicating copy to clipboard operation
charm copied to clipboard

Relation problem during compilation

Open VictorEijkhout opened this issue 1 year ago • 6 comments

/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

VictorEijkhout avatar Oct 15 '24 16:10 VictorEijkhout

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.

ritvikrao avatar Oct 16 '24 16:10 ritvikrao

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.

?

VictorEijkhout avatar Oct 22 '24 15:10 VictorEijkhout

But sure, the build script works. However, it only creates static libraries. How do I tell it to make shared?

VictorEijkhout avatar Oct 22 '24 15:10 VictorEijkhout

--build-shared

ZwFink avatar Oct 22 '24 16:10 ZwFink

Ok, that builds the shared & static in two separate directories. (Not great, usually that's combined in one directory.)

  1. How do I pass that option to the cmake install?
  2. 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.

VictorEijkhout avatar Oct 22 '24 16:10 VictorEijkhout

Let me ask that last one separately.

VictorEijkhout avatar Oct 23 '24 14:10 VictorEijkhout