mosquitto icon indicating copy to clipboard operation
mosquitto copied to clipboard

tests do not work via cmake on BSD, due to assumption that /usr/bin/make is GNU make

Open gdt opened this issue 6 years ago • 6 comments

Running "gmake tests" results in a failure, apparently because ctest somehow invokes /usr/bin/make rather than finding/using GNU make. The command that is run is /usr/pkg/bin/ctest --force-new-ctest-process which leads to 1: Test command: /usr/bin/make "-C" "/home/n0/gdt/pkgsrc-current/pkgsrc/wip/mosquitto/work/mosquitto-1.6.1/test" "test"

I would address this by somehow having MAKE=${MAKE} put into the environment and respected, as the top-level gmake test (from the pkgsrc wrapper) should have MAKE set to gmake.

gdt avatar Apr 28 '19 00:04 gdt

In CMakeLists.txt, changing make to gmake in the add_test line results in getting further. Obviously this is not an ok solution.

A further problem is in lib/util_mosq.c, where the following patch (in two places) avoids a syntax error during tests.

-#elif defined(__GLIBC__) && __GLIBC_PREREQ(2, 25)
+#elif defined(__GLIBC__)

gdt avatar Apr 28 '19 01:04 gdt

Sorry Greg, I really should have anticipated the make problem.

ralight avatar Apr 29 '19 22:04 ralight

No need to apologize - we are making progress at quite a good pace.

gdt avatar Apr 30 '19 14:04 gdt

~~I think this issue can be closed as solved~~

ckrey avatar Oct 15 '24 07:10 ckrey

@ckrey Do you mean that you have successfully run tests using the cmake build flavor on systems where /usr/bin/make is not gmake? Which ones? With the latest release? master?

gdt avatar Oct 15 '24 12:10 gdt

@gdt sorry, I didn't read carefully and misunderstood

ckrey avatar Oct 15 '24 15:10 ckrey