Skip to content
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

Use object libraries for subdir libs and plugins #674

Merged
merged 2 commits into from
Nov 5, 2019

Conversation

Neverlord
Copy link
Member

Reverts 8e7ef00, requires zeek/cmake#12.

After wrestling with duplicate symbol errors (see #643 (comment)), I finally figured out where they came from:

Many subdirectories added the generated .cc files for BIFs via ${BIF_OUTPUT_CC}. However, there is no need to compile these files separately. They all end up in zeek/src/Func.cc. Also, some plugins pulled in source files from the parent directory which compiled this file multiple times. All of this works when using static libraries, because the linker drops most symbols when building the final zeek binary. With object libraries, we must take care to not build something twice.

@jsiwek jsiwek self-assigned this Nov 4, 2019
@jsiwek jsiwek merged commit 3338cfb into master Nov 5, 2019
@jsiwek
Copy link
Contributor

jsiwek commented Nov 5, 2019

Thanks for hunting down the duplicate symbol problem, nice to get this stuff cleaned up a bit.

@Neverlord Neverlord deleted the topic/neverlord/object-libraries branch November 5, 2019 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants