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

src/Makefile: Also stop compiling kamcmd from here #3020

Merged
merged 1 commit into from Feb 9, 2022
Merged

src/Makefile: Also stop compiling kamcmd from here #3020

merged 1 commit into from Feb 9, 2022

Conversation

AdrianBunk
Copy link
Contributor

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:

https://buildd.debian.org/status/fetch.php?pkg=kamailio&arch=s390x&ver=5.5.3-1&stamp=1638905109&raw=0

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

@miconda
Copy link
Member

miconda commented Feb 9, 2022

Thanks!

@miconda miconda merged commit c133515 into kamailio:master Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants