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

Test fails due to linking errors if --build was specified #351

Open
the-horo opened this issue Dec 20, 2023 · 0 comments
Open

Test fails due to linking errors if --build was specified #351

the-horo opened this issue Dec 20, 2023 · 0 comments

Comments

@the-horo
Copy link
Contributor

Running dub test with --build=plain or specifying $DFLAGS leads to linking errors:

$ dub test --build=plain
<snip>
     Linking serve-d-test-unittest
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/happy/.dub/cache/serve-d/~master/build/serve-d-test-unittest-plain-rocVMvrAD7Ih_R6i7neQJw/serve-d-test-unittest.o: in function `_D6served9extension14makeServerInfoFZSQBk3lsp8protocol10ServerInfo':
/home/happy/d/dev/git/the-horo/dlang/serve-d/.dub/packages/silly/1.1.1/silly/silly.d:(.text._D6served9extension14makeServerInfoFZSQBk3lsp8protocol10ServerInfo[_D6served9extension14makeServerInfoFZSQBk3lsp8protocol10ServerInfo]+0x61): undefined reference
to `_D6served4info7VersionyAi'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/happy/d/dev/git/the-horo/dlang/serve-d/.dub/packages/silly/1.1.1/silly/silly.d:(.text._D6served9extension14makeServerInfoFZSQBk3lsp8protocol10ServerInfo[_D6served9extension14makeServerInfoFZSQBk3lsp8protocol10ServerInfo]+0x8c): undefined reference to `_D6served4info13VersionSuffixyAa'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
Error /usr/bin/dmd failed with exit code 1.

Forcing --build=unittest fixes the issue as well as adding unittests to buildOptions in dub.json for the unittest configuration. I can make a PR for this but I don't know if that' the right way to fix it.

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

No branches or pull requests

1 participant