``` flex -o core/lex.yy.c core/cfg.lex CC (gcc) [kamailio] core/lex.yy.o LD (gcc) [kamailio] kamailio core/ut.o: In function `ksr_clock_gettime': /root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src/core/ut.c:175: undefined reference to `clock_gettime' collect2: ld returned 1 exit status make[1]: *** [kamailio] Error 1 make[1]: Leaving directory `/root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src' make: *** [default] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.RFyzKs (%build) ```
Should we continue support CentOS 6?
maybe ``` Link with -lrt (only for glibc versions before 2.17). ``` https://www.unix.com/man-page/centos/2/clock_gettime/
`-lrt` can be added for that linux version if solves it. But cannot be added always, because some UNIX variants does not have it, like BSD-based systems (e.g., macos).
Closed #2921.
Tried to fix it with the commit referenced above, but no centos 6 around to try it. If still fails, reopen.
Hi Daniel Current master build log ``` LD (gcc) [kamailio] kamailio core/ut.o: In function `ksr_clock_gettime': /root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src/core/ut.c:175: undefined reference to `clock_gettime' collect2: ld returned 1 exit status make[1]: *** [kamailio] Error 1 make[1]: Leaving directory `/root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src' make: *** [default] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.1wyutm (%build) Bad exit status from /var/tmp/rpm-tmp.1wyutm (%build) ```
When executed `make cfg` i see error message ``` /bin/sh: line 0: [: -le: unary operator expected ```
Full log message ``` sh-4.1# make cfg make -C src/ cfg target architecture <x86_64>, host architecture <x86_64> /bin/sh: line 0: [: -le: unary operator expected make[1]: Entering directory `/root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src' making config... rm -f modules.lst make --no-print-directory modules.lst saving modules list... make[1]: Leaving directory `/root/rpmbuild/BUILD/kamailio-5.6.0-dev2/src' ```
I made troubleshooting and found does not work the` aws` command inside Makefile. I have updated Makefile to get working variable initialization. ```diff diff --git a/src/Makefile.defs b/src/Makefile.defs index 8fab3fd..57bccfe 100644 --- a/src/Makefile.defs +++ b/src/Makefile.defs @@ -1890,7 +1890,7 @@ ifeq ($(OS), linux) endif ifeq ($(CC_NAME), gcc) # link librt for glibc <= 2.17 - GLIBCVER:=$(shell ldd --version | head -1 | awk '{ sub(/./, "", $NF); print $NF }' ) + GLIBCVER=$(shell ldd --version | head -1 | sed -e 's/^.* //' -e 's/.//' ) ifeq ($(shell [ $(GLIBCVER) -le 217 ] && echo librt), librt) LIBS+=-lrt endif ```
Reopened #2921.
Thanks, pushed the proposed change.
Closed #2921.