updated statusmap CGI compiling tip

Pulyankote, Gopinath Gopinath_Pulyankote at affymetrix.com
Tue Oct 22 20:29:05 CEST 2002


Sergio,
 I tried compiling it from the command line. It failed with the following
error messages. Any ideas?

bash-2.05a$ gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI  statusmap.c getcgi.o
cgiutils.o auth.o popen.o  ../common/objects.c ../xdata/xodtemplate.c
../common/statusdata.c ../xdata/xsddefault.c /usr/lib/libgd.so edata.o
../xdata/xedtemplate.c -o statusmap.cgi
/tmp/ccNJsgOI.o: In function `calculate_circular_layer_coords':
/opt/src/nagios/nagios-1.0b6/cgi/statusmap.c:2897: undefined reference to
`sin'
/opt/src/nagios/nagios-1.0b6/cgi/statusmap.c:2898: undefined reference to
`sin'
/tmp/ccNJsgOI.o: In function `draw_circular_layer_markup':
/opt/src/nagios/nagios-1.0b6/cgi/statusmap.c:2990: undefined reference to
`sin'
/opt/src/nagios/nagios-1.0b6/cgi/statusmap.c:2991: undefined reference to
`sin'
/opt/src/nagios/nagios-1.0b6/cgi/statusmap.c:2992: undefined reference to
`sin'
/tmp/ccNJsgOI.o:/opt/src/nagios/nagios-1.0b6/cgi/statusmap.c:2993: more
undefined references to `sin' follow
/usr/lib/libgd.so: undefined reference to `uncompress'
/usr/lib/libgd.so: undefined reference to `sqrt'
/usr/lib/libgd.so: undefined reference to `FT_Init_FreeType'
/usr/lib/libgd.so: undefined reference to `jpeg_read_scanlines'
/usr/lib/libgd.so: undefined reference to `jpeg_simple_progression'
/usr/lib/libgd.so: undefined reference to `FT_Load_Glyph'
/usr/lib/libgd.so: undefined reference to `FT_Done_Face'
/usr/lib/libgd.so: undefined reference to `png_get_rowbytes'
/usr/lib/libgd.so: undefined reference to `png_set_strip_16'
/usr/lib/libgd.so: undefined reference to `floor'
/usr/lib/libgd.so: undefined reference to `png_create_read_struct'
/usr/lib/libgd.so: undefined reference to `FT_Get_Kerning'
/usr/lib/libgd.so: undefined reference to `FT_Get_Char_Index'
/usr/lib/libgd.so: undefined reference to `png_set_sig_bytes'
/usr/lib/libgd.so: undefined reference to `jpeg_set_defaults'
/usr/lib/libgd.so: undefined reference to `png_set_read_fn'
/usr/lib/libgd.so: undefined reference to `png_set_packing'
/usr/lib/libgd.so: undefined reference to `FT_Get_Glyph'
/usr/lib/libgd.so: undefined reference to `png_get_io_ptr'
/usr/lib/libgd.so: undefined reference to `jpeg_start_decompress'
/usr/lib/libgd.so: undefined reference to `jpeg_destroy'
/usr/lib/libgd.so: undefined reference to `png_set_IHDR'
/usr/lib/libgd.so: undefined reference to `jpeg_write_marker'
/usr/lib/libgd.so: undefined reference to `png_set_tRNS'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_To_Bitmap'
/usr/lib/libgd.so: undefined reference to `png_get_valid'
/usr/lib/libgd.so: undefined reference to `jpeg_destroy_decompress'
/usr/lib/libgd.so: undefined reference to `jpeg_std_error'
/usr/lib/libgd.so: undefined reference to `jpeg_CreateDecompress'
/usr/lib/libgd.so: undefined reference to `png_create_write_struct'
/usr/lib/libgd.so: undefined reference to `cos'
/usr/lib/libgd.so: undefined reference to `png_get_error_ptr'
/usr/lib/libgd.so: undefined reference to `atan2'
/usr/lib/libgd.so: undefined reference to `png_write_info'
/usr/lib/libgd.so: undefined reference to `png_set_PLTE'
/usr/lib/libgd.so: undefined reference to `FT_Set_Char_Size'
/usr/lib/libgd.so: undefined reference to `png_get_PLTE'
/usr/lib/libgd.so: undefined reference to `jpeg_read_header'
/usr/lib/libgd.so: undefined reference to `jpeg_start_compress'
/usr/lib/libgd.so: undefined reference to `png_write_end'
/usr/lib/libgd.so: undefined reference to `jpeg_destroy_compress'
/usr/lib/libgd.so: undefined reference to `png_get_IHDR'
/usr/lib/libgd.so: undefined reference to `png_set_write_fn'
/usr/lib/libgd.so: undefined reference to `jpeg_finish_decompress'
/usr/lib/libgd.so: undefined reference to `jpeg_resync_to_restart'
/usr/lib/libgd.so: undefined reference to `jpeg_CreateCompress'
/usr/lib/libgd.so: undefined reference to `FT_Done_Glyph'
/usr/lib/libgd.so: undefined reference to `png_read_info'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Get_CBox'
/usr/lib/libgd.so: undefined reference to `jpeg_finish_compress'
/usr/lib/libgd.so: undefined reference to `png_destroy_read_struct'
/usr/lib/libgd.so: undefined reference to `png_check_sig'
/usr/lib/libgd.so: undefined reference to `png_write_image'
/usr/lib/libgd.so: undefined reference to `png_read_update_info'
/usr/lib/libgd.so: undefined reference to `png_read_image'
/usr/lib/libgd.so: undefined reference to `png_get_tRNS'
/usr/lib/libgd.so: undefined reference to `FT_New_Face'
/usr/lib/libgd.so: undefined reference to `png_create_info_struct'
/usr/lib/libgd.so: undefined reference to `compress'
/usr/lib/libgd.so: undefined reference to `jpeg_set_quality'
/usr/lib/libgd.so: undefined reference to `FT_Glyph_Transform'
/usr/lib/libgd.so: undefined reference to `jpeg_write_scanlines'
/usr/lib/libgd.so: undefined reference to `png_destroy_write_struct'
/usr/lib/libgd.so: undefined reference to `png_read_end'
collect2: ld returned 1 exit status

-----Original Message-----
From: Sergio Freire [mailto:sergio-s-freire at ptinovacao.pt] 
Sent: Tuesday, October 22, 2002 2:23 AM
To: Pulyankote, Gopinath
Cc: nagios-users at lists.sourceforge.net
Subject: updated statusmap CGI compiling tip


The makefile that i have from CVS doesn't compile statusmap.c!
Someone took it off of the makefile.
Anwyay, here goes an updated Makefile for the CGI directory.
However, i compile it from the command line due to an issue that i have
with the GD libraries, so i include the full path of this library in the
command line...
I use:

gcc -g -O2 -DHAVE_CONFIG_H -DNSCGI  statusmap.c getcgi.o cgiutils.o
auth.o popen.o  ../common/objects.c ../xdata/xodtemplate.c
../common/statusdata.c ../xdata/xsddefault.c /usr/lib/libgd.so edata.o
../xdata/xedtemplate.c -o statusmap.cgi

I ask again, if anyone could update this statusmap.c and Makefile in the
CVS? Thanks in advance.
Any more questions feel free to contact me.
Regards,
Sergio


On Mon, 2002-10-21 at 22:30, Pulyankote, Gopinath wrote:
> Hi,
>  How does one compile this?
> I moved the orig statusmap.c & copied this to the cgi directory, 
> Did a make clean, ./configure and make cgis. It complied and created all
> other files except statusmap.cgi
> Any clues?
> Thanks
> -G 
> 
> -----Original Message-----
> From: Sergio Freire [mailto:sergio-s-freire at ptinovacao.pt] 
> Sent: Monday, October 21, 2002 7:50 AM
> To: nagios-users at lists.sourceforge.net
> Cc: nagios at nagios.org
> Subject: [Nagios-users] updated statusmap CGI source file
> 
> 
> Hi everyone.
> Please find attached an updated contribution on statusmap.cgi source
> file.
> Major changes:
> 	- the size of the image created is the maximum of (2d coordinates of
> all hosts, background image). Until now the background was not taken in
> account in this calculation so you could have a cropped image...
> 	- the user supplied layout was changed to take in account the size
> of
> the statusmap image (until now it had DEFAULT_NODE_WIDTH and
> DEFAULT_NODE_HEIGHT in account for the calculation of the target's,
> circular arc's, map area, and text drawing). This is now a more
> realistic situation  because the actual size of the statusmap image of
> the hosts are used to calculate the positioning of the target, highlight
> selection and map shape area of the html.
> 	- Also, the draw_host_text() now is called with the correct
> coordinates
> so the text is centered vertically and horizontally in the host image
> (whatever size it has!)
> 	- The highlighted host with circular drawings is now correclty
> displayed! Until now, other hosts could be drawn on top of these
> drawings. Now, the circular drawings are displayed after all hosts are
> drawn.
> 
> Could anyone update this file (if you agree...) in the CVS?
> Please feel free to comment any aspect.
> Regards,
> Sergio Freire


-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote




More information about the Users mailing list