Building kamcmd
twice was not only a (marginal) waste of build time, but also created a race condition where the first linking sometimes failed due to reading the incomplete file from the ongoing second build of kamcmd.o
:
gcc -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DVERSION_NODATE -DNAME='"kamcmd"' -DSRNAME='"kamailio"' -DVERSION='"1.5"' -D__OS_linux -DRUN_DIR='"/var/run/kamailio/"' -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DMOD_NAME="utils/kamcmd" -c kamcmd.c -o kamcmd.o
...
gcc -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DVERSION_NODATE -DNAME='"kamcmd"' -DSRNAME='"kamailio"' -DVERSION='"1.5"' -D__OS_linux -DRUN_DIR='"/var/run/kamailio/"' -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DMOD_NAME="utils/kamcmd" -c kamcmd.c -o kamcmd.o
gcc -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DVERSION_NODATE -DNAME='"kamcmd"' -DSRNAME='"kamailio"' -DVERSION='"1.5"' -D__OS_linux -DRUN_DIR='"/var/run/kamailio/"' -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DMOD_NAME="utils/kamcmd" -c parse_listen_id.c -o parse_listen_id.o
gcc -g -Wl,-O2 -Wl,-E -Wl,-z,relro -Wl,-z,now -pthread -rdynamic "-ldl" -Wl,-Bsymbolic-functions kamcmd.o parse_listen_id.o -lresolv -lreadline -o kamcmd
/usr/bin/ld: /usr/lib/gcc/s390x-linux-gnu/11/../../../s390x-linux-gnu/Scrt1.o: in function `_start':
(.text+0x34): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[4]: *** [../../src//Makefile.rules:191: kamcmd] Error 1
make[3]: *** [Makefile:536: utils] Error 1
make[3]: *** Waiting for unfinished jobs....
gcc -pthread -DKSR_PTHREAD_MUTEX_SHARED -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DVERSION_NODATE -DNAME='"kamcmd"' -DSRNAME='"kamailio"' -DVERSION='"1.5"' -D__OS_linux -DRUN_DIR='"/var/run/kamailio/"' -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DMOD_NAME="utils/kamcmd" -c parse_listen_id.c -o parse_listen_id.o
gcc -g -Wl,-O2 -Wl,-E -Wl,-z,relro -Wl,-z,now -pthread -rdynamic "-ldl" -Wl,-Bsymbolic-functions kamcmd.o parse_listen_id.o -lresolv -lreadline -o kamcmd
https://github.com/kamailio/kamailio/pull/3020
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.