Compile 64-bit on SPARC produces LD error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
dheitepriem
Posts: 20
Joined: Mon May 09, 2016 7:50 am
Location: Germany

Compile 64-bit on SPARC produces LD error

Post by dheitepriem »

Hi everyone,

I'm trying to compile the 64-bit version of Nagios 4.1.1 on Solaris 11.3 SPARC and getting the following errors:

Code: Select all

gmake[1]: Entering directory `/export/home/dheitepriem/nagios/nagios-4.1.1/module'
gcc -m64 -I..  -m64 -DHAVE_CONFIG_H -o helloworld.o helloworld.c -G -m64 -lsocket 
ld: fatal: relocation error: R_SPARC_H44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_M44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_L44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_H44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_M44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_L44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_H44: file /var/tmp//ccl5aiPv.o: symbol .rodata (section): relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_M44: file /var/tmp//ccl5aiPv.o: symbol .rodata (section): relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_L44: file /var/tmp//ccl5aiPv.o: symbol .rodata (section): relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_H44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
ld: fatal: relocation error: R_SPARC_M44: file /var/tmp//ccl5aiPv.o: symbol helloworld_module_handle: relocations based on the ABS44 coding model can not be used in building a shared object
[...]
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake[1]: *** [helloworld.o] Error 1
gmake[1]: Leaving directory `/export/home/dheitepriem/nagios/nagios-4.1.1/module'
gmake: *** [all] Error 2
Here are my "configure" and "make" commands:

Code: Select all

CFLAGS="-m64" CC="gcc -m64" LD="ldd -m64" LDFLAGS="-m64" CXXFLAGS="-m64" ./configure --prefix=/opt/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-user=nagios --with-command-group=nagios
CFLAGS="-m64" CC="gcc -m64" LD="ldd -m64" LDFLAGS="-m64" CXXFLAGS="-m64" /usr/bin/gmake all  
Attached are also my config.log and config.status files.

Thank you very much in advance.
Attachments
config.status.txt
(30.92 KiB) Downloaded 385 times
config.log
(75.42 KiB) Downloaded 368 times
Last edited by dheitepriem on Fri Jun 17, 2016 3:07 am, edited 1 time in total.
Best regards,
Daniel Heitepriem
dheitepriem
Posts: 20
Joined: Mon May 09, 2016 7:50 am
Location: Germany

Re: Compile 64-bit on SPARC produces LD error

Post by dheitepriem »

Just a quick note: As the error appears when building the "hello world" module, I did just check if it was really necessary. As this is a simple example for modules I considered it not necessary for us and added a simple "#" to the appropriate lines in the main MakeFile (*nagios-4.1.1-dir*/Makefile).

After this the modules folder wasn't touched anymore and everything worked as it should. Nevertheless it would be nice if this could be investigated further as a proper building process without any manual editing is always nicer than choosing the solution I did ;)
Best regards,
Daniel Heitepriem
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Compile 64-bit on SPARC produces LD error

Post by tmcdonald »

Can you post this on our GitHub page for Core?

https://github.com/NagiosEnterprises/nagioscore

That'll get visibility to our developers right away.
Former Nagios employee
dheitepriem
Posts: 20
Joined: Mon May 09, 2016 7:50 am
Location: Germany

Re: Compile 64-bit on SPARC produces LD error

Post by dheitepriem »

I posted the error to the github page (https://github.com/NagiosEnterprises/na ... issues/135) so I think this topic can be closed.
Best regards,
Daniel Heitepriem
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Compile 64-bit on SPARC produces LD error

Post by tmcdonald »

Awesome, thanks!
Former Nagios employee
Locked