Open tp-m opened 4 years ago
cc @dcbaker
This is happening because by default build_tests=false
and then:
libexpat = library('expat',
...
gnu_symbol_visibility : get_option('build_tests') ? 'default' : 'hidden',
)
This also looks dodgy:
# the lib/libexpat.def file is not valid with mingw, only with mvsc, intel-cl,
# and clang-cl
if cc.get_id() != 'gcc'
I don't think we can assume that if the compiler is not gcc
that it's one of mvsc
, intel-cl
or clang-cl
- e.g. what about "normal" clang
or intel
compilers?
This was fixed with https://github.com/mesonbuild/expat/pull/11 but then it caused https://github.com/mesonbuild/expat/issues/12, which I have a fix for.
The Intel complier that isn't Intel-cl is unsupported on windows by meson, and can only be used to cross compile to Linux anyway, and the def file does work with Intel-cl and clang-cl IIRC. you might be right about gnu-style clang though
I'm getting unresolved symbols when using expat 2.2.9 as a meson subproject, and it looks like it's happening because the shared lib doesn't export any symbols. This is on Linux with gcc and macOS with clang.
To reproduce on Linux:
result: