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

Freebsd cross-compilation fails to link libexpr-c #11546

Open
Mic92 opened this issue Sep 19, 2024 · 4 comments
Open

Freebsd cross-compilation fails to link libexpr-c #11546

Mic92 opened this issue Sep 19, 2024 · 4 comments
Labels

Comments

@Mic92
Copy link
Member

Mic92 commented Sep 19, 2024

Describe the bug

$ nix develop .#packages.x86_64-linux.nix-x86_64-unknown-freebsd
$ ./configure $configureFlags
$ make

x86_64-unknown-freebsd-ld: error: undefined symbol: operator new(unsigned long, std::align_val_t)
>>> referenced by nix_api_expr.cc:108 (src/libexpr-c/nix_api_expr.cc:108)
>>>               src/libexpr-c/nix_api_expr.o:(nix_state_create)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mk/lib.mk:84: src/libexpr-c/libnixexprc.so] Error 1

Is freebsd not linking libc++ correctly?

@Mic92
Copy link
Member Author

Mic92 commented Sep 19, 2024

cc @rhelmot @Ericson2314 who may have interest in this.

@Mic92
Copy link
Member Author

Mic92 commented Sep 19, 2024

@rhelmot says it's because of wrong llvm configuration and it might be fixed in master.
Will test this.

@Mic92
Copy link
Member Author

Mic92 commented Sep 19, 2024

Switching to nixpkgs unstable fixes it.

@Ericson2314
Copy link
Member

The alignment of this is probably uninteresting, so we could write some fallback code too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants