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
ld 2.3.0 doesn't recognize -Wl,-soname #34
Comments
After letting it error out, doing linking manually and resuming, I get: cc -Ibtparse/src -I/home/vadimkantorov/buildbiber/build/native/perl/../prefix/lib/5.30.0/x86_64-linux/CORE -c -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -O -o xscode/BibTeX.o xscode/BibTeX.c
ld -o blib/arch/auto/Text/BibTeX/BibTeX.none xscode/BibTeX.o xscode/btxs_support.o -Lbtparse/src -lbtparse
# ld: error in btparse/src/libbtparse.so(.eh_frame); no .eh_frame_hdr table will be created.
# ld: warning: cannot find entry symbol _start; defaulting to 0000000000400f00
# xscode/BibTeX.o: In function `XS_Text__BibTeX_macro_text':
# BibTeX.c:(.text+0xb): undefined reference to `PL_markstack_ptr'
# BibTeX.c:(.text+0x16): undefined reference to `PL_markstack_ptr'
# BibTeX.c:(.text+0x24): undefined reference to `PL_stack_base'
# BibTeX.c:(.text+0x2f): undefined reference to `PL_stack_sp'
# BibTeX.c:(.text+0x49): undefined reference to `PL_op'
# BibTeX.c:(.text+0x5e): undefined reference to `PL_curpad'
# BibTeX.c:(.text+0x74): undefined reference to `PL_stack_base'
# BibTeX.c:(.text+0x8c): undefined reference to `PL_stack_base'
# BibTeX.c:(.text+0xbb): undefined reference to `PL_na'
# BibTeX.c:(.text+0xd8): undefined reference to `PL_stack_base'
# BibTeX.c:(.text+0xf1): undefined reference to `PL_stack_base'
... I guess I need to link I tried specifying ld -o blib/arch/auto/Text/BibTeX/BibTeX.none xscode/BibTeX.o xscode/btxs_support.o -Lbtparse/src -lbtparse -lperl ~/buildbiber/build/native/perl/libperl.a
# ld: /home/vadimkantorov/buildbiber/build/native/perl/libperl.a(toke.o): undefined reference to symbol 'pow@@GLIBC_2.2.5'
# //lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line ld -o blib/arch/auto/Text/BibTeX/BibTeX.none xscode/BibTeX.o xscode/btxs_support.o -Lbtparse/src -lbtparse -lperl ~/buildbiber/build/native/perl/libperl.a -lm -lpthread -lc
# ld: error in btparse/src/libbtparse.so(.eh_frame); no .eh_frame_hdr table will be created.
# ld: warning: cannot find entry symbol _start; defaulting to 0000000000417ce0 |
Although I would like to help, you are dealing with details I am not aware of. |
I should be able to prepare a repro later in the week |
A more simplified version of this question would be - is it possible to compile Perl with Text::BibTeX in |
Otherwise, do you have a manual building script (without relying on Build.PL / ExtUtils and stuff)? For me that would work and it would be easier than fighting ExtUtils linker options |
See if this helps: https://www.cpan.org/modules/by-authors/id/A/AM/AMBS/btparse/ |
I guess I'm stuck at trying to get Text::BibTeX working because it's what biber uses. The only non-trivial piece of Text::BibTeX is the XS module. If there's a simple command to build the XS module by calling perl manually, that would work too. |
Currently Text::BibTeX bundles a standard C library (btparse) and a Perl module, that has its own library for dynamic loading from Perl. The soname option you refer is being used to link the btparse library. Thus, if you can compile it properly from the link above, then it should be just a matter of understanding how to tweak Text::BibTeX not to compile itself the library. |
Well, by manual compiling and resuming it seems to compile and link. I'm not sure about the scary warnings though. So compiling btparse itself is not complicated. Then Build.PL still makes a build string with nasty linker flags unsuitable for static builds. If you have an idea how to compile the Perl module without Build.PL in a simpler way, that would work. Or if you managed to build it with |
I'm building Text::BibTeX manually with an almost-static build of Perl in order to eventually port biber to WebAssembly. Getting build errors from Text::BibTeX. Could you advise how to hack around the build script?
The text was updated successfully, but these errors were encountered: