Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been using xinetd (Version 2.3.15 is the last one available) for years and now that I have upgraded from Linux Slackware 14.2 to 15.0 it fails to compile:
gcc -g -O2 -I../libs/include -c -o reconfig.o reconfig.c
reconfig.c:30:11: fatal error: rpc/rpc.h: No such file or directory
30 | #include <rpc/rpc.h>
| ^~~~~~~~~~~
compilation terminated.
Doing some research it appears that rpc.h was moved from:
/usr/include/rpc/rpc.h <- Old Slackware 14.2
which was part of glibc-2.17 to the new package which is now called libtirpc-1.3.2 and is located here:
/usr/include/tirpc/rpc/rpc.h <- Slackware 15.0
So I included the:
CFLAGS=-I/usr/include/tirpc
to my ./configure script and now I am able to compile but the linking fails with the following error:
/usr/bin/ld: reconfig.o: undefined reference to symbol 'pmap_unset@@TIRPC_0.3.0'
/usr/bin/ld: /lib64/libtirpc.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
/usr/bin/ld: reconfig.o: undefined reference to symbol 'pmap_unset@@TIRPC_0.3.0'
/usr/bin/ld: /lib64/libtirpc.so.3: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
"Undefined reference" errors are usually outdated libraries. Are you compiling old code here, or is there stuff from 14.2 lying about?
"Undefined reference" errors are usually outdated libraries. Are you compiling old code here, or is there stuff from 14.2 lying about?
Linux installation (15.0) is new with all current updates. The xinetd was last updated in 2012 and it probably has reference to some older libraries or libraries that have changed names.
Now open the Makefile and find the CFLAGS line. Add the path to TIRPC, -I/usr/include/tirpc on my system. Find the LIBS line and add -ltirpc at the end. Do the same with LIBS in the Makefile in xinetd/xinetd subdir. Why it doesn't pick up LIBS from the master Makefile I don't know. Compile.
Code:
jayjwa@atr2 ~/xinetd (master)> file xinetd/xinetd
xinetd/xinetd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, with debug_info, not stripped
jayjwa@atr2 ~/xinetd (master)> xinetd/xinetd -version
xinetd Version 2.3.15 libwrap loadavg
It builds but I didn't test it as I already have it installed from before. Slackware current, https://github.com/xinetd-org/xinetd
For such an integral part of Linux, I have no idea why this isn't maintained better.
Now open the Makefile and find the CFLAGS line. Add the path to TIRPC, -I/usr/include/tirpc on my system. Find the LIBS line and add -ltirpc at the end. Do the same with LIBS in the Makefile in xinetd/xinetd subdir. Why it doesn't pick up LIBS from the master Makefile I don't know. Compile.
Code:
jayjwa@atr2 ~/xinetd (master)> file xinetd/xinetd
xinetd/xinetd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, with debug_info, not stripped
jayjwa@atr2 ~/xinetd (master)> xinetd/xinetd -version
xinetd Version 2.3.15 libwrap loadavg
It builds but I didn't test it as I already have it installed from before. Slackware current, https://github.com/xinetd-org/xinetd
For such an integral part of Linux, I have no idea why this isn't maintained better.
Thats it! I tried what you suggested and it worked!! Looks like "-ltirpc" was missing from the LIBS. When you mentioned the option "-ltirpc" that needs to be added to the LIBS variable, I also tried compiling with:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.