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

Add -fPIC to csharp unix build #344

Merged
merged 1 commit into from
Aug 16, 2023
Merged

Conversation

jtraglia
Copy link
Member

Ran into this issue when creating a docker image for C# tests:

$ make
cd ../../blst && ./build.sh -D__BLST_PORTABLE__
+ clang -O2 -fno-builtin -fPIC -Wall -Wextra -Werror -D__ADX__ -D__BLST_PORTABLE__ -c ./src/server.c
+ clang -O2 -fno-builtin -fPIC -Wall -Wextra -Werror -D__ADX__ -D__BLST_PORTABLE__ -c ./build/assembly.S
+ llvm-ar rc libblst.a assembly.o server.o
clang -O2 -Wall -Wextra -shared -DFIELD_ELEMENTS_PER_BLOB=4096 -I../../src -I../../blst/bindings -o Ckzg.Bindings/runtimes/linux-x64/native/ckzg.so ckzg.c ../../src/c_kzg_4844.c ../../blst/libblst.a
/usr/bin/ld: /tmp/ckzg-f1a131.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /tmp/c_kzg_4844-72668e.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:59: ckzg] Error 1

Definitely something that should have been there.

Copy link
Contributor

@asn-d6 asn-d6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@asn-d6 asn-d6 merged commit 485dcc2 into ethereum:main Aug 16, 2023
31 of 32 checks passed
@jtraglia jtraglia deleted the csharp-fpic branch August 16, 2023 18:23
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

Successfully merging this pull request may close these issues.

2 participants