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

Build fails with libffi on Ubuntu 22.04 #144

Open
apnadkarni opened this issue Jul 18, 2023 · 1 comment
Open

Build fails with libffi on Ubuntu 22.04 #144

apnadkarni opened this issue Jul 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@apnadkarni
Copy link
Owner

gcc -pipe -m64 -O2 -fomit-frame-pointer -DNDEBUG -Wall -fPIC   -shared -Wl,--export-dynamic   -o libtclcffi1.3a0.so tclCffi.o tclCffiAlias.o tclCffiCallback.o tclCffiEnum.o tclCffiFunction.o tclCffiHelp.o tclCffiLoad.o tclCffiMemory.o tclCffiNames.o tclCffiPointer.o tclCffiPrototype.o tclCffiStruct.o tclCffiTypes.o tclCffiWrapper.o memlifo.o tclCffiLibffi.o -Wl,-Bstatic -lffi -Wl,-Bdynamic  -L/usr/lib/x86_64-linux-gnu -ltclstub8.6 
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libffi.a(prep_cif.o): warning: relocation against `ffi_type_sint32' in read-only section `.text'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libffi.a(prep_cif.o): relocation R_X86_64_PC32 against symbol `ffi_type_sint32' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
@apnadkarni apnadkarni added the bug Something isn't working label Jul 18, 2023
@apnadkarni
Copy link
Owner Author

This is actually an issue with libffi 3.4.4. Changing to linking to the shared libffi works. Apparently, building libffi with

../configure --prefix=/tmp/libffi --without-gcc-arch --disable-docs --with-pic --enable-shared=no

fixes the problem but that is not how the libffi in the distributions are built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant