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 am using Ubuntu 14.04. I have downloaded the net-snmp package net-snmp-5.7.3.pre5. The configure went well. Make gives the following error :
/usr/bin/ld: /usr/local/lib/perl5/5.18.2/x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/perl5/5.18.2/x86_64-linux/CORE/libperl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [libnetsnmpagent.la] Error 1
make[1]: Leaving directory `/home/dell/Desktop/net-snmp-5.7.3.pre5/agent'
make: *** [subdirs] Error 1
Yes i tried recompiling with fPIC : ./configure --with-cflags=fPIC.
It gave the following error :
Location to write persistent information (/var/net-snmp):
setting Location to write persistent information to... /var/net-snmp
checking if I need to feed myself to ksh... no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for grep that handles long lines and -e... (cached) /bin/grep
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /bin/sed
checking for file... file
checking for find... find
checking for whoami... whoami
checking for autoconf... no
checking for autoheader... no
checking for perl... /usr/local/bin/perl
checking for ps... /bin/ps
checking for python... /usr/bin/python
checking for uname... /bin/uname
checking whether the Perl function system() invokes a POSIX shell... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/dell/Desktop/net-snmp-5.7.3.pre5':
configure: error: C compiler cannot create executables
i moved all header files to include directory in net-snmp. it still gives the error.
/usr/bin/ld: /usr/local/lib/perl5/5.18.2/x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/perl5/5.18.2/x86_64-linux/CORE/libperl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [libnetsnmpagent.la] Error 1
make[1]: Leaving directory `/home/dell/Desktop/net-snmp-5.7.2/agent'
make: *** [subdirs] Error 1
I'm following this thread cause i'm getting the exact same issues. I'm hoping you didn't forget what you did to solve the problem...
I'm stuck at "i moved all header files to include directory in net-snmp" . What header files are you talking about, and where did you put them ?
Thanks in advance
-- EDIT
Ok i had read "include" as a verb, and not as THE "include" directory in net-snmp, makes much more sense now. So i guess the header files you're talking about are the ones in the perl_5.18.2 folder ?
-- EDIT #2
Ok guys i spent all afternoon trying to fix this, i really don't get it.
When i follow post #8, i get (at the "make CFLAGS=-fPIC" step for net-snmp, without moving the perl h files to net-snmp/include) :
And when i DO put these files in net-snmp/include, i still get:
/usr/bin/ld: /usr/local/lib/perl5/5.18.2/x86_64-linux/CORE/libperl.a(op.o): relocation R_X86_64_32S against `PL_sv_yes' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/perl5/5.18.2/x86_64-linux/CORE/libperl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [libnetsnmpagent.la] Error 1
make[1]: Leaving directory `/home/dell/Desktop/net-snmp-5.7.2/agent'
make: *** [subdirs] Error 1
I don't know what i'm missing. My perl version is same as yours, though my net-snmp is 5.5.1, could that be what's making it go wrong ?
Last edited by idontlikeusernames; 11-18-2015 at 11:05 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.