Re: [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

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

Post by Guest »

Hello, this is probally a simple problem. Just figure out which lib
contains pow and crc32, and include them on the build line.

On Tue, 5 Nov 2002 09:35:26 -0600
"C. Bensend" wrote:

>
> 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





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: lilesb@ijet.com
Locked