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

Relation problem during compilation #3846

Open
VictorEijkhout opened this issue Oct 15, 2024 · 6 comments
Open

Relation problem during compilation #3846

VictorEijkhout opened this issue Oct 15, 2024 · 6 comments

Comments

@VictorEijkhout
Copy link

/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

@ritvikrao
Copy link
Contributor

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.

@VictorEijkhout
Copy link
Author

VictorEijkhout commented Oct 22, 2024

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
Copy link
Author

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

@ZwFink
Copy link
Contributor

ZwFink commented Oct 22, 2024

--build-shared

@VictorEijkhout
Copy link
Author

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
Copy link
Author

Let me ask that last one separately.

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

3 participants