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

IFUNC symbol wcslen creates circular dependency #1326

Open
Martin-Lndbl opened this issue Jul 6, 2024 · 2 comments
Open

IFUNC symbol wcslen creates circular dependency #1326

Martin-Lndbl opened this issue Jul 6, 2024 · 2 comments

Comments

@Martin-Lndbl
Copy link
Contributor

After getting the build process on NixOs working for the most part, I get following error when building with glibc.static present:

Building into build/release.x64
  GEN gen/include/osv/version.h
fatal: No names found, cannot describe anything.
  GEN gen/include/osv/drivers_config.h
  GEN build/release.x64/gen/include/bits/alltypes.h
  AS arch/x64/boot.S
  CXX loader.cc
  HOST_CXX build/release.x64/gen-ctype-data
  GEN build/release.x64/gen/include/ctype-data.h
build/release.x64/gen-ctype-data: IFUNC symbol 'wcslen' referenced in '/nix/store/bn7pnigb0f8874m6riiw6dngsmdyic1g-gcc-13.3.0-lib/lib/libstdc++.so.6' is defined in the executable and creates an unsatisfiable circular dependency.
make: *** [Makefile:2298: build/release.x64/gen/include/ctype-data.h] Error 127
make: *** Deleting file 'build/release.x64/gen/include/ctype-data.h'
make failed. Exiting from build script

If I try to build without glibc.static present, the build runs though, until the end, where the linker (obviously) cannot find the c library.
My glibc version is 2.39-52 and I tried with gcc 11, 13 and 14

@gburd
Copy link

gburd commented Jul 6, 2024 via email

@Martin-Lndbl
Copy link
Contributor Author

You can check out what I did so far on the feature branch of my fork. I'm sure there are still a lot of unnecessary dependencies but I got it working for now.

The unikernel can be built (without glibc.static present). But the native-example I tried to compile requires a static c library. So at the moment either the kernel or the app needs to be compiled before running ./scripts/build image=native-example to not run into this issue. (Or you run it twice, once without glibc.static present in your nativeBuildInputs to compile the kernel and then again with glibc.static to build the app and link everything together.

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

2 participants