Page 1 of 1

Compile 64-bit on SPARC produces LD error

Posted: Fri Jun 17, 2016 1:46 am
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.

Re: Compile 64-bit on SPARC produces LD error

Posted: Fri Jun 17, 2016 3:05 am
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 ;)

Re: Compile 64-bit on SPARC produces LD error

Posted: Fri Jun 17, 2016 9:34 am
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.

Re: Compile 64-bit on SPARC produces LD error

Posted: Fri Jun 17, 2016 9:48 am
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.

Re: Compile 64-bit on SPARC produces LD error

Posted: Fri Jun 17, 2016 9:55 am
by tmcdonald
Awesome, thanks!