forked from intel/hyperscan
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove adding CMAKE_CXX_IMPLICIT_LINK_LIBRARIES to PRIVATE_LIBS
as on alpine linux this add gcc_s which is a shared library on alpine: Libs.private: -lstdc++ -lm -lssp_nonshared -lgcc_s -lgcc -lc -lgcc_s -lgcc
- Loading branch information
1 parent
bc57891
commit e5e2057
Showing
2 changed files
with
0 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a16bitsysop @markos: do you remember the specifics behind this change?
Is there some kind of test scenario I could try to reproduce the issue?
I ask because it appears that
vectorscan
as distributed in Homebrew and also in Ubuntu is broken for static linking, I believe because of the change in this commit tolibhs.pc.in
. Is this issue just thatgcc_s
shows up in@PRIVATE_LIBS@
, when that is a shared library?e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was similar, that a shared gcc lib shows up in libhs.pc for static linking. Or static linking links to a shared lib as well.
Probably to do with this: rspamd/rspamd#3915
e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its actually in the commit description
e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like the specific issue that instigated the patch is that
Libs.private
included-lgcc_s
? If this is the case, probably a better thing to do is filter out-lgcc_s
fromPRIVATE_LIBS
, rather than delete outrightLibs.private
from the pkg-config file (which seems to break static linking in the Homebrew and Ubuntu packages).e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes the problem was
-lgcc_s
, I tried rspamd static compile on alpine and it also fails at linking with/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/lib/libhs.a: error adding symbols: file format not recognized
Is that the error you are getting?
e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me get back to you on that! 🙇
e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The particular troubles I see when trying to build Nosey Parker against
vectorscan
usingpkg-config
are linker errors that come from missinglibstdc++
orlibc++
, e.g.:No errors like this arise when linking Nosey Parker against Hyperscan instead, still using
pkg-config
(Hyperscan still has theLibs.private: @PRIVATE_LIBS@
pkgconfig bit).There's a bunch of layers to the build failures I'm seeing above against Vectorscan. When I get a chance I might dig into it to isolate the problem, open an issue and a PR. But it does seem that static linking against Vectorscan at present doesn't work as intended.
e5e2057
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if libgcc_s.a is for mingwin, on alpine its in the mingwin package