Closed faizol closed 6 months ago
Hi @faizol, thanks for this report. I'll try reproducing this on in a Fedora 39 environment.
We use flex to parse and evaluate subscriptions in the bmqeval
package. As I understand, libfl
provides default implementations of two functions, main
and yywrap
, neither of which we use in BlazingMQ. So we probably shouldn't be linking against this at all, which is why the -as-needed
flag works for you.
If you're interested, I notice there's a libfl-static
library in Fedora, which seems to provide .a
files instead of the .so
files libfl2
provides. This is the same as the libfl-dev
package that Debian provides, and that we list as a requirement. I wonder if not using --as-needed
and instead linking against libfl-static
would also work?
Linking it against static library (libfl.a) does solve the problem on Fedora 39 platform. Thank you.
Is there an existing issue for this?
Current Behavior
Compiling on Fedora 39 failed because of linking issue;
which could be traced to how flex 2.6.x changed the way yylex behaves.
Expected Behavior
No response
Steps To Reproduce
Env - OS: Fedora 39
Step - run bin/build-ubuntu.sh (commenting out the apt update and installations)
Expected - to compile/link without errors
Errors -
BlazingMQ Version
0.90.21
Anything else?
I solved the compilation issue by adding
target_link_options(bmq PUBLIC "LINKER:-as-needed")
to the CMakeLists.txt in the src/groups/bmq/ folder,However I am not sure if that's the right solution without affecting how BlazingMQ would behave.