Closed PureTryOut closed 3 years ago
Is this when running make
in the NymphRPC or NymphCast folder? It's not quite clear to me from the output you quoted.
NymphRPC
I have been unable to replicate it on either MSYS2 or any of the Linux versions I have here (Manjaro, Ubuntu, Raspbian). From the waiting for unfinished jobs...
part it does suggest that the problem is that Make on Alpine is not running the jobs in the right dependency order.
I have made the dependencies in the Makefiles more explicit now, please retest :)
No luck :cry:
g++ -o bin/nymph_client obj/nymph_test_client.o -L ../../lib -lnymphrpc -lPocoNet -lPocoUtil -lPocoFoundation -lPocoJSON -pthread
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lnymphrpc
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:36: bin/nymph_client] Error 1
make[1]: Leaving directory '/home/bart/Git/aports/testing/nymphrpc/src/NymphRPC-eff8a0188f0b28afdf610406f9780629c3e64911/test/nymph_test_client'
make: *** [Makefile:66: test-client] Error 2
make: *** Waiting for unfinished jobs....
g++ -o bin/nymph_server obj/nymph_test_server.o -L ../../lib -lnymphrpc -lPocoNet -lPocoUtil -lPocoFoundation -lPocoJSON -pthread
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lnymphrpc
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:35: bin/nymph_server] Error 1
make[1]: Leaving directory '/home/bart/Git/aports/testing/nymphrpc/src/NymphRPC-eff8a0188f0b28afdf610406f9780629c3e64911/test/nymph_test_server'
make: *** [Makefile:69: test-server] Error 2
I ran the same make
command on Alpine Linux (3.12_alpha20200122) in a VirtualBox VM and I could not replicate the reported issue.
Steps I took:
make
in the NymphRPC folder.I can not reproduce this anymore, not sure why this happened earlier...
Actually, I couldn't reproduce it locally anymore but the Alpine Linux CI still fails on it.
https://gitlab.alpinelinux.org/alpine/aports/-/jobs/450857/raw
Looks like you're compiling NymphRPC with make
and not make lib
? The former also builds the test client, which needs to find libnymphrpc. For a CI setting like this just building the lib should be sufficient, I think?
make lib
to get the package running yes. make
to try and get the tests to work
For CI we require running unit tests when they are available to verify functionality of the resulting package. No just building isn't enough.
I have made the lib target an explicit dependency for the test client and server targets. This should ensure that the the library is always built before the binaries.
On a sidenote: these test binaries are currently not used for any unit testing or compile-time tests. They're reference implementations used during development and for documentation purposes. This could probably be marked more clearly in the (lacking) documentation.
That seems to have solved it, thanks!
On a sidenote: these test binaries are currently not used for any unit testing or compile-time tests.
Ah, so not useful for distros then. I'll disable it, thanks.
Running just
make
causes build issues when compiling the tests.However, first running
make lib
and thenmake test
manually seems to work fine! I'm unsure why this is, as reading the makefile the default make target seems to do just that :thinking: