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

abseil-cpp: remove gentables binary from static lib #1382

Merged

Conversation

haydenmc
Copy link
Contributor

@haydenmc haydenmc commented Feb 1, 2024

The current meson patch for abseil-cpp includes gaussian_distribution_gentables.cc as a source file for the abseil_random static library.

absl_random_sources = files(
'absl/random/discrete_distribution.cc',
'absl/random/gaussian_distribution.cc',
'absl/random/internal/chi_square.cc',
'absl/random/internal/gaussian_distribution_gentables.cc',
'absl/random/internal/pool_urbg.cc',
'absl/random/internal/randen.cc',

gaussian_distribution_gentables.cc has its own main() function, and is meant to be compiled into a separate binary used to codegen gaussian_distribution.cc, as indicated here. gaussian_distribution.cc is already committed to the abseil repo, so it does not need to be generated at build time.

Currently, if you use this wrap and statically link abseil_random from an executable, you will run into an issue where multiple main() functions are defined due to the inclusion of gaussian_distribution_gentables.cc.

This change removes gaussian_distribution_gentables.cc from the list of sources for abseil_random, resolving the issue.

@neheb neheb merged commit 538b198 into mesonbuild:master Feb 1, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants