[Nagios-devel] Troubles building statically - 1.0b6

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
Guest

[Nagios-devel] Troubles building statically - 1.0b6

Post by Guest »

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C284E1.D6C5F200
Content-Type: text/plain;
charset="iso-8859-1"

Are all of the apps in the chroot jail statically linked? That seems wrong
- The appropriate libraries should probably just be copied into the jail.

-----Original Message-----
From: C. Bensend [mailto:benny@bennyvision.com]
Sent: Tuesday, November 05, 2002 10:35 AM
To: nagios-devel@lists.sourceforge.net
Subject: [Nagios-devel] Troubles building statically - 1.0b6



Hey folks,

I've begun working on a port for the OpenBSD ports
tree, and I've run into a snag. Please keep in mind, I am
not a developer. :)

I'm attempting to build Nagios statically, as OpenBSD
3.2 now defaults to a chrooted Apache installation. I would
like to ensure I can contain Nagios within the chroot without
a bunch of libraries as well, so statically seemed the way to
go.

However, when the build process gets to statusmap.cgi,
it dies with the following (the other cgi's appeared to have
built statically just fine):


gcc -g -static -I/usr/local/include -DHAVE_CONFIG_H -DNSCGI -L/usr/local/lib
statusmap.c getcgi.o cgiutils.o auth.o popen.o ../common/objects.c
../xdata/xodtemplate.c ../common/statusdata.c ../xdata/xsddefault.c -lgd -lz
-lm -lpng -ljpeg edata.o ../xdata/xedtemplate.c -o statusmap.cgi
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: Undefined symbol `_pow' referenced from text segment
pngrtran.o: More undefined symbol _pow refs follow
png.o: Undefined symbol `_crc32' referenced from text segment
png.o: Undefined symbol `_crc32' referenced from text segment
collect2: ld returned 1 exit status
*** Error code 1

Stop in /var/www/nagios/nagios-1.0b6/cgi (line 135 of Makefile).
*** Error code 1

Stop in /var/www/nagios/nagios-1.0b6 (line 56 of Makefile).


So, I go clumsily fumbling around in the source and the
Makefile in cgi/, and I know that libpng provides these symbols,
so I figure "I just need to make sure that cgi is being linked
against libpng". Silly me. ;)

From the Makefile:

statusmap.cgi: statusmap.c $(CGIDEPS) $(EDATADEPS)
$(CC) $(CFLAGS) $(LDFLAGS) statusmap.c $(CGILIBS) $(GDLIBS)
$(EDATALIBS)
-o $@

And GDLIBS includes -lpng. Um. Now I'm lost, because I'm
a lowly sysadmin and not a developer. ;) I know this is basic
stuff, and I googled for a while without much luck, so I'd appreciate
any hints/cluebats anyone could give me. :) With my limited
experience with code, I don't understand why the above symbols
were undefined.

Cluebat, anyone? :) Thanks!

Benny


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There's always time for Cheerios...



-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redi ... palm0001en
_______________________________________________
Nagios-devel mailing list
Nagios-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/lis ... gios-devel

------_=_NextPart_001_01C284E1.D6C5F200
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable






RE: [Nagios-devel] Troubles building statically - 1.0b6



Are all of the apps in the

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: . Bensend [mailto:benny@bennyvision.com
Locked