You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
symbols are not included when building with optimization #109
Hi,
I am trying to build this perl module which uses fribidi Text-Bidi under Archlinux, unfortunately it fails to build due to missing symbols of the library that is shipped with archlinux. undefined symbol: fribidi_unicode_version
after some digging it turns out that there are some problems with the package that is shipped with Archlinux(by looking at the PKGBUILD):
because the Archlinux build system (ABS) automatically strips the symtab table from the elf binary some symbols that are in this table are removed so I instructed ABS to not run the elf binaries through strip by disabling the strip option
options=(!strip)
because the package is built with some optimization options (default on archlinux and derivatives) specifically these :
this causes the resulting .so file to lack symbols including fribidi_unicode_version
disabling these flags result in an elf binary that has these symbols but the build system complains about disabling optimizations, I get a lot of these:
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
so a couple of questions i have:
is this package supposed to be built with optimizations or not?
is removing the fribidi_unicode_version symbol from the optimized version intentional ? or a bug?
I have opened similar bug reports on the relevant projects here:
Feel free to submit a pull request or just point out where the problem is.
I don't know much about meson build system so I couldn't really track down the problem, that's why i opened the issue hoping someone with more experience can have a look.
keep in mind that if i build using the usual ./autogen.sh and make then i get no problem, so the issue is in the meson route of building
I'm on OSX at the moment and so I can't actually test the autotools system to compare, but at a glance meson's behavior seems correct. It sets -fvisibility=hidden by default (which ensures *nix builds are consistent with MSVC ones) and then will export any symbols marked with FRIBIDI_ENTRY, which does not include fribidi_unicode_version. That seems like it was intended to be public, so I'll make a PR adding it to fribidi.h.
Activity
dov commentedon May 24, 2019
Of course! Why wouldn'it be. The faster the better.
The debug and the optimized versions are supposed to support the same API. If they do not, it's a bug.
Feel free to submit a pull request or just point out where the problem is.
moham96 commentedon May 24, 2019
I don't know much about meson build system so I couldn't really track down the problem, that's why i opened the issue hoping someone with more experience can have a look.
keep in mind that if i build using the usual
./autogen.shandmakethen i get no problem, so the issue is in the meson route of buildingkhaledhosny commentedon May 24, 2019
CC @tp-m, @nirbheek, @CoffeeFlux who contributed/worked on the meson build before.
CoffeeFlux commentedon May 24, 2019
I'm on OSX at the moment and so I can't actually test the autotools system to compare, but at a glance meson's behavior seems correct. It sets
-fvisibility=hiddenby default (which ensures *nix builds are consistent with MSVC ones) and then will export any symbols marked withFRIBIDI_ENTRY, which does not includefribidi_unicode_version. That seems like it was intended to be public, so I'll make a PR adding it tofribidi.h.