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

make -j broken in tests/ #10749

Closed
bagder opened this issue Mar 12, 2023 · 0 comments
Closed

make -j broken in tests/ #10749

bagder opened this issue Mar 12, 2023 · 0 comments
Assignees

Comments

@bagder
Copy link
Member

bagder commented Mar 12, 2023

I did this

make -C tests -sj to build the test suite and tests using a parallel build

It currently fails on master, see partial error output below. I bisected the offending commit to this:

commit cb7ed5a

If I don't use -j and use use just make in the tests directory, it seems to build just fine.

If I revert the above mention commit, it also makes the build work again.

/usr/bin/ld: unit1305.o: warning: relocation against `unitfail' in read-only section `.text'
/usr/bin/ld: unit1304.o: warning: relocation against `unitfail' in read-only section `.text'
/usr/bin/ld: unit1302.o: warning: relocation against `unitfail' in read-only section `.text'
/usr/bin/ld: unit1300.o: warning: relocation against `unitfail' in read-only section `.text'
/usr/bin/ld: unit1303.o: warning: relocation against `unitfail' in read-only section `.text'
/usr/bin/ld: unit1305.o: in function `test':
/home/dast/src/curl/tests/unit/unit1305.c:114: undefined reference to `unitfail'
/usr/bin/ld: /home/dast/src/curl/tests/unit/unit1305.c:114: undefined reference to `unitfail'
/usr/bin/ld: /home/dast/src/curl/tests/unit/unit1305.c:122: undefined reference to `unitfail'
/usr/bin/ld: /home/dast/src/curl/tests/unit/unit1305.c:122: undefined reference to `unitfail'
/usr/bin/ld: /home/dast/src/curl/tests/unit/unit1305.c:127: undefined reference to `unitfail'
/usr/bin/ld: unit1305.o:/home/dast/src/curl/tests/unit/unit1305.c:127: more undefined references to `unitfail' follow
/usr/bin/ld: unit1330.o: warning: relocation against `unitfail' in read-only section `.text'
/usr/bin/ld: unit1323.o: warning: relocation against `unitfail' in read-only section `.text'
/usr/bin/ld: unit1304.o: in function `test':
/home/dast/src/curl/tests/unit/unit1304.c:50: undefined reference to `unitfail'
/usr/bin/ld: /home/dast/src/curl/tests/unit/unit1304.c:50: undefined reference to `unitfail'
dfandrich added a commit that referenced this issue Mar 13, 2023
Using CPPFLAGS sometimes caused odd compile issues when building tests
with parallel make and AM_CPPFILES is the right flag, anyway.

Follow-up to cb7ed5a

Ref #10749
dfandrich added a commit that referenced this issue Mar 13, 2023
The only difference used to be global variable used in unittest tests.
After cb7ed5a removed individual flag overrides for the unittests, first.c
was no longer recompiled for unit tests to include the flag, so whether it
worked or gave a link error depended on whether it was compiled in
libtest or unittest first.

Fixes #10749
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
Using CPPFLAGS sometimes caused odd compile issues when building tests
with parallel make and AM_CPPFILES is the right flag, anyway.

Follow-up to cb7ed5a

Ref curl#10749
bch pushed a commit to bch/curl that referenced this issue Jul 19, 2023
The only difference used to be global variable used in unittest tests.
After cb7ed5a removed individual flag overrides for the unittests, first.c
was no longer recompiled for unit tests to include the flag, so whether it
worked or gave a link error depended on whether it was compiled in
libtest or unittest first. This way also speeds up the build by
eliminating 40 identical compile invocations.

Fixes curl#10749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants