LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 10-18-2023, 09:00 AM   #1
HytronBG
LQ Newbie
 
Registered: Oct 2023
Posts: 10

Rep: Reputation: 0
Unhappy Unable to compile xinetd on Slackware 15.0


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




Is someone able to help me fix this issue?

TIA!!!
 
Old 10-18-2023, 11:34 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,453

Rep: Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342Reputation: 2342
Quote:
Originally Posted by HytronBG
/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?
 
Old 10-18-2023, 12:46 PM   #3
HytronBG
LQ Newbie
 
Registered: Oct 2023
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by business_kid View Post
"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.

Last edited by HytronBG; 10-18-2023 at 12:48 PM.
 
Old 10-18-2023, 12:48 PM   #4
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 798

Rep: Reputation: 256Reputation: 256Reputation: 256
Code:
./configure --prefix=/usr --with-loadavg --with-inet6 --with-libwrap --with-labeled-networking
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.
 
1 members found this post helpful.
Old 10-19-2023, 01:43 PM   #5
HytronBG
LQ Newbie
 
Registered: Oct 2023
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jayjwa View Post
Code:
./configure --prefix=/usr --with-loadavg --with-inet6 --with-libwrap --with-labeled-networking
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:

CFLAGS=-I/usr/include/tirpc \
LIBS=-ltirpc \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var/run \
--with-libwrap \
--with-inet6 \
--with-loadavg \
--with-labeled-networking

And it works as well! Thank you much for your help!!! I appreciate it!!

Last edited by HytronBG; 10-19-2023 at 01:46 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xinetd : Show ip address of the connected xinetd client fjkum Linux - Server 3 11-25-2020 06:48 PM
[SOLVED] To xinetd or not to xinetd? ptemmerman Linux - Newbie 4 07-22-2009 01:29 AM
/etc/xinetd.conf vs /etc/xinetd.d foampile Linux - Server 2 04-24-2009 05:33 PM
unable to start saned using xinetd butchman Linux - Networking 0 07-11-2004 09:44 AM
Xinetd dead --xinetd dead but pid file exists hillxy Linux - General 1 04-15-2004 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration