compiling GD-library Nagios cgis on Solaris 10: wrong ELF class: ELFCLASS32
Paul, Chris Y
cp1449 at att.com
Sun Oct 26 06:29:13 CET 2008
Hello Nagios Users,
I'm having trouble compiling the Nagios cgis which depend on the GD
library on Solaris 10. From what I can see, others have had this problem
with various reasons.
I wonder if the problem has anything to do with the GD and libiconv
libraries (which I got from sunfreeware.com) are 32 bit:
$ file /usr/local/lib/libgd.so
/usr/local/lib/libgd.so: ELF 32-bit MSB dynamic lib SPARC Version
1, dynamically linked, not stripped, no debugging information available
$ file /usr/local/lib/libiconv.so
/usr/local/lib/libiconv.so: ELF 32-bit MSB dynamic lib SPARC Version
1, dynamically linked, not stripped, no debugging information available
But the PNG and JPEG libraries are 64-bit:
$ file /usr/lib/sparcv9/libjpeg.so
/usr/lib/sparcv9/libjpeg.so: ELF 64-bit MSB dynamic lib SPARCV9
Version 1, dynamically linked, not stripped, no debugging information
available
$ file /usr/lib/sparcv9/libpng.so
/usr/lib/sparcv9/libpng.so: ELF 64-bit MSB dynamic lib SPARCV9
Version 1, dynamically linked, not stripped, no debugging information
available
Below is the partial (mostly relevant) output from the make process
nagios at nagios:/home/nagios/source/nagios-3.0.3$ echo $CPPFLAGS
-I/usr/sfw/include -I/usr/local/include -I/usr/include -I/home/include
-I/usr/X11/include
nagios at nagios:/home/nagios/source/nagios-3.0.3$ echo $LDFLAGS
-R/usr/sfw/lib -R/usr/local/lib -R/usr/lib -R/lib -R/home/lib
-R/usr/X11/lib
$ ./configure --prefix=$HOME/nagios --with-httpd-conf=$HOME/conf
--with-init-dir=$HOME/etc/init.d --with-gd-lib=/usr/local/lib
--with-gd-inc=/usr/local/include --with-nagios-user=nagios
--with-nagios-group=nagios --enable-embedded-perl --with-perlcache
...
*** Configuration summary for nagios 3.0.3 06-25-2008 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagios
Embedded Perl: yes, with caching
Event Broker: yes
Install ${prefix}: /opt/app/nagios/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /opt/app/nagios/etc/init.d
Apache conf.d directory: /opt/app/nagios/conf
Mail program: /usr/bin/mail
Host OS: solaris2.10
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP):
$ make
..
gcc -g -O2 -I/usr/local/include -D_REENTRANT -fno-strict-aliasing -pipe
-Wdeclaration-after-statement -I/usr/local/include -mcpu=v9 -m64
-Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-DPERL_USE_SAFE_PUTENV
-I/usr/local/lib/perl5/5.8.8/sun4-solaris-thread-multi-64/CORE
-DHAVE_CONFIG_H -DNSCGI -R/usr/sfw/lib -R/usr/local/lib -R/usr/lib
-R/lib -R/home/lib -R/usr/X11/lib -L/usr/local/lib -o statusmap.cgi
statusmap.c getcgi.o cgiutils.o cgiauth.o macros-cgi.o skiplist.o
../common/snprintf.o objects-cgi.o xobjects-cgi.o statusdata-cgi.o
xstatusdata-cgi.o comments-cgi.o downtime-cgi.o -lgd -liconv -lpng
-ljpeg -lz -lm -lrt
ld: fatal: file /usr/local/lib/libgd.so: wrong ELF class: ELFCLASS32
ld: fatal: file /usr/local/lib/libiconv.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to statusmap.cgi
collect2: ld returned 1 exit status
make[1]: *** [statusmap.cgi] Error 1
make[1]: Leaving directory `/home/nagios/source/nagios-3.0.3/cgi'
make: *** [cgis] Error 2
Thanks for any tips you have. I really hope I get this working soon.
CP
--
Chris Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20081025/38f50133/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list