Skip to content

ctest: Duplicate symbol errors for static tests #4365

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

Open
tgross35 opened this issue Apr 3, 2025 · 0 comments
Open

ctest: Duplicate symbol errors for static tests #4365

tgross35 opened this issue Apr 3, 2025 · 0 comments
Labels
ctest Issues relating to the ctest crate

Comments

@tgross35
Copy link
Contributor

tgross35 commented Apr 3, 2025

Something needs to be reworked here. This may be a ODR violation since they are defined in the header.

Look for FIXME(#4365) in the tests for relevant locations.

@tgross35 tgross35 added the ctest Issues relating to the ctest crate label Apr 3, 2025
tgross35 added a commit to tgross35/rust-libc that referenced this issue Apr 3, 2025
* Tests for C++ can only be run when g++ or another C++ compiler is
  available. We don't need to test this on all platforms, so make the
  tests check whether a compiler is available and only run these tests
  if so.
* Statics seem to produce duplicate symbol errors [1]. Comment out the
  relevant parts of tests for now.
* Tests don't work when cross compiling. Gate the `all.rs` test to only
  run on x86_64.

Most of this needs to be removed, but the workarounds get us able to run
something in CI.

[1]: rust-lang#4365
tgross35 added a commit to tgross35/rust-libc that referenced this issue Apr 3, 2025
* Tests for C++ can only be run when g++ or another C++ compiler is
  available. We don't need to test this on all platforms, so make the
  tests check whether a compiler is available and only run these tests
  if so.
* Statics seem to produce duplicate symbol errors [1]. Comment out the
  relevant parts of tests for now.
* Tests don't work when cross compiling. Gate the `all.rs` test to only
  run on x86_64.

Most of this needs to be removed, but the workarounds get us able to run
something in CI.

[1]: rust-lang#4365
sanstzu pushed a commit to sanstzu/rust-libc that referenced this issue May 16, 2025
* Tests for C++ can only be run when g++ or another C++ compiler is
  available. We don't need to test this on all platforms, so make the
  tests check whether a compiler is available and only run these tests
  if so.
* Statics seem to produce duplicate symbol errors [1]. Comment out the
  relevant parts of tests for now.
* Tests don't work when cross compiling. Gate the `all.rs` test to only
  run on x86_64.

Most of this needs to be removed, but the workarounds get us able to run
something in CI.

[1]: rust-lang#4365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctest Issues relating to the ctest crate
Projects
None yet
Development

No branches or pull requests

1 participant