[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] RE: Solaris compile error for xymon 4.3.0-beta2



I think that the problem is (at least in my case) that GNU gcc is compiled 
to use /usr/ccs/bin/ld so no matter how hard you try, you cannot get the 
compile to run /usr/local/bin/ld (the GNU one).

The file build/Makefile.SunOS contains the following piece of code:

LDTYPE := $(shell ld -V 2>&1|head -1|cut -d' ' -f1)
ifeq ($(LDTYPE),GNU)
   RPATH=-Wl,--rpath,
else
   RPATH=-Wl,-R
endif

unfortunately, if /usr/local/bin id in your path before /usr/ccs/bin (like 
it is in mine), it checks the version of /usr/local/bin/ld and finds GNU.

A better way for the Makefile to check would be to do a gcc -v which in my 
case gives:

maitprodsys # /usr/local/bin/gcc -v

Reading specs from 
/opt/local/bin/../lib/gcc/sparc-sun-solaris2.10/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as 
--with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6

as you can see, this gcc was compiled to use /usr/ccs/bin/ld which means 
that it should use -R instead of ---rpath.

If you want to compile then change the --rpath above to -R and you will 
find that it now compiles correctly right through to the end.

The Makefile.SunOS as distributed needs to be changed.

------------------------------------------------------------------------------
David Peters

+61 2 63913565
+61 4 17863572
------------------------------------------------------------------------------




From:
Craig Cook <Craig.Cook (at) carquest.com>
To:
"'hobbit (at) hswn.dk'" <hobbit (at) hswn.dk>
Date:
20/05/2009 06:25 AM
Subject:
[hobbit] RE: Solaris compile error for xymon 4.3.0-beta2



>collect2: ld returned 1 exit status
>make[1]: *** [bbtest-net] Error 1
>make[1]: Leaving directory `/export/home/crcook/xymon-4.3.0-beta2/bbnet'
>make: *** [bbnet-build] Error 2
>
>Has anyone seen this?
>
>Thanks
>
>Craig


If you edit build/Makefile.rules and make a change similar to this:

#RPATHOPT := $(RPATH)$(shell echo $(RPATHVAL) | sed -e 's/ / $(RPATH)/g')
RPATHOPT := -R/usr/local/rrdtool-1.2.19/lib -R/usr/local/lib 
-R/usr/local/ssl/lib

You get further in the compile.  It now crashes with this:

gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include -c -o 
bb-ack.o bb-ack.c
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include -o 
bb-ack.cgi bb-ack.o ../lib/libbbgen.a -L/usr/local/lib -lpcre -lresolv 
-lsocket -lnsl -lrt
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include -c -o 
bb-webpage.o bb-webpage.c
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include -o 
bb-webpage bb-webpage.o ../lib/libbbgen.a -L/usr/local/lib -lpcre -lresolv 
-lsocket -lnsl -lrt
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include -c -o 
bb-datepage.o bb-datepage.c
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include -o 
bb-datepage.cgi bb-datepage.o ../lib/libbbgen.a -L/usr/local/lib -lpcre 
-lresolv -lsocket -lnsl -lrt
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include 
-I/usr/local/include -DRRDTOOL12 -I/usr/local/rrdtool-1.2.19/include -c -o 
hobbitgraph.o hobbitgraph.c
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT  -DSunOS -I. 
-I/export/home/crcook/xymon-4.3.0-beta2/include -I/usr/local/include -o 
hobbitgraph.cgi -R/usr/local/rrdtool-1.2.19/lib -R/usr/local/lib 
-R/usr/local/ssl/lib hobbitgraph.o ../lib/libbbgen.a -L/usr/local/lib 
-lpcre -L/usr/local/rrdtool-1.2.19/lib -lrrd -L/usr/lib -lpng -lresolv 
-lsocket -lnsl -lrt
Undefined                       first referenced
 symbol                             in file
png_init_io /usr/local/rrdtool-1.2.19/lib/librrd.so
png_memset_check                    /usr/local/lib/libpng.so
png_get_mmx_flagmask                /usr/local/lib/libpng.so
png_progressive_combine_row         /usr/local/lib/libpng.so
png_get_asm_flags                   /usr/local/lib/libpng.so
png_read_info /usr/local/rrdtool-1.2.19/lib/librrd.so
png_read_rows                       /usr/local/lib/libpng.so
png_set_packswap                    /usr/local/lib/libpng.so
png_set_expand                      /usr/local/lib/libpng.so
png_set_filter /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_filler                      /usr/local/lib/libpng.so
png_get_int_32                      /usr/local/lib/libpng.so
png_get_io_ptr                      /usr/local/lib/libpng.so
png_get_header_ver                  /usr/local/lib/libpng.so
png_set_tRNS_to_alpha               /usr/local/lib/libpng.so
png_set_dither                      /usr/local/lib/libpng.so
png_set_read_user_chunk_fn          /usr/local/lib/libpng.so
png_set_write_status_fn             /usr/local/lib/libpng.so
png_get_rgb_to_gray_status          /usr/local/lib/libpng.so
png_set_add_alpha                   /usr/local/lib/libpng.so
png_get_signature                   /usr/local/lib/libpng.so
png_get_mmx_bitdepth_threshold      /usr/local/lib/libpng.so
png_get_header_version              /usr/local/lib/libpng.so
png_convert_from_time_t             /usr/local/lib/libpng.so
png_set_user_transform_info         /usr/local/lib/libpng.so
png_set_mem_fn                      /usr/local/lib/libpng.so
png_get_rowbytes                    /usr/local/lib/libpng.so
png_set_compression_mem_level       /usr/local/lib/libpng.so
png_get_asm_flagmask                /usr/local/lib/libpng.so
png_set_invalid                     /usr/local/lib/libpng.so
png_destroy_info_struct             /usr/local/lib/libpng.so
png_get_filter_type                 /usr/local/lib/libpng.so
png_destroy_read_struct /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_compression_window_bits     /usr/local/lib/libpng.so
png_data_freer                      /usr/local/lib/libpng.so
png_write_info_before_PLTE          /usr/local/lib/libpng.so
png_libpng_ver                      /usr/local/lib/libpng.so
png_chunk_warning                   /usr/local/lib/libpng.so
png_set_gray_1_2_4_to_8             /usr/local/lib/libpng.so
png_set_palette_to_rgb              /usr/local/lib/libpng.so
png_read_update_info                /usr/local/lib/libpng.so
png_convert_to_rfc1123              /usr/local/lib/libpng.so
png_get_y_offset_microns            /usr/local/lib/libpng.so
png_get_x_offset_microns            /usr/local/lib/libpng.so
png_free /usr/local/rrdtool-1.2.19/lib/librrd.so
png_get_image_height /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_interlace_handling          /usr/local/lib/libpng.so
png_start_read_image                /usr/local/lib/libpng.so
png_set_read_status_fn              /usr/local/lib/libpng.so
png_set_compression_level /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_read_fn                     /usr/local/lib/libpng.so
png_get_bit_depth                   /usr/local/lib/libpng.so
png_permit_empty_plte               /usr/local/lib/libpng.so
png_malloc /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_unknown_chunks              /usr/local/lib/libpng.so
png_create_info_struct /usr/local/rrdtool-1.2.19/lib/librrd.so
png_create_read_struct /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_rgb_to_gray                 /usr/local/lib/libpng.so
png_get_image_width /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_invert_mono                 /usr/local/lib/libpng.so
png_set_compression_strategy        /usr/local/lib/libpng.so
png_get_uint_31                     /usr/local/lib/libpng.so
png_get_uint_32                     /usr/local/lib/libpng.so
png_get_uint_16                     /usr/local/lib/libpng.so
png_get_error_ptr                   /usr/local/lib/libpng.so
png_set_sig_bytes                   /usr/local/lib/libpng.so
png_get_unknown_chunks              /usr/local/lib/libpng.so
png_mmx_support                     /usr/local/lib/libpng.so
png_get_pixels_per_meter            /usr/local/lib/libpng.so
png_get_user_width_max              /usr/local/lib/libpng.so
png_write_row                       /usr/local/lib/libpng.so
png_write_png                       /usr/local/lib/libpng.so
png_write_end /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_expand_gray_1_2_4_to_8      /usr/local/lib/libpng.so
png_write_image /usr/local/rrdtool-1.2.19/lib/librrd.so
png_write_flush                     /usr/local/lib/libpng.so
png_write_chunk                     /usr/local/lib/libpng.so
png_access_version_number           /usr/local/lib/libpng.so
png_get_user_chunk_ptr              /usr/local/lib/libpng.so
png_get_progressive_ptr             /usr/local/lib/libpng.so
png_info_init_3                     /usr/local/lib/libpng.so
png_save_int_32                     /usr/local/lib/libpng.so
png_set_progressive_read_fn         /usr/local/lib/libpng.so
png_convert_from_struct_tm          /usr/local/lib/libpng.so
png_malloc_warn                     /usr/local/lib/libpng.so
png_reset_zstream                   /usr/local/lib/libpng.so
png_set_rgb_to_gray_fixed           /usr/local/lib/libpng.so
png_write_chunk_start               /usr/local/lib/libpng.so
png_memcpy_check                    /usr/local/lib/libpng.so
png_set_invert_alpha                /usr/local/lib/libpng.so
png_sig_cmp                         /usr/local/lib/libpng.so
png_set_bgr                         /usr/local/lib/libpng.so
png_set_compression_method          /usr/local/lib/libpng.so
png_set_gray_to_rgb                 /usr/local/lib/libpng.so
png_get_interlace_type              /usr/local/lib/libpng.so
png_get_compression_buffer_size     /usr/local/lib/libpng.so
png_set_compression_buffer_size     /usr/local/lib/libpng.so
png_set_background                  /usr/local/lib/libpng.so
png_set_read_user_transform_fn      /usr/local/lib/libpng.so
png_get_compression_type            /usr/local/lib/libpng.so
png_set_cHRM_fixed                  /usr/local/lib/libpng.so
png_get_cHRM_fixed                  /usr/local/lib/libpng.so
png_set_unknown_chunk_location      /usr/local/lib/libpng.so
png_create_write_struct /usr/local/rrdtool-1.2.19/lib/librrd.so
png_build_grayscale_palette         /usr/local/lib/libpng.so
png_set_user_limits                 /usr/local/lib/libpng.so
png_set_packing                     /usr/local/lib/libpng.so
png_set_strip_alpha                 /usr/local/lib/libpng.so
png_destroy_write_struct /usr/local/rrdtool-1.2.19/lib/librrd.so
png_write_chunk_data                /usr/local/lib/libpng.so
png_get_copyright                   /usr/local/lib/libpng.so
png_get_channels                    /usr/local/lib/libpng.so
png_malloc_default                  /usr/local/lib/libpng.so
png_get_PLTE                        /usr/local/lib/libpng.so
png_set_PLTE                        /usr/local/lib/libpng.so
png_set_iCCP                        /usr/local/lib/libpng.so
png_get_iCCP                        /usr/local/lib/libpng.so
png_set_hIST                        /usr/local/lib/libpng.so
png_get_hIST                        /usr/local/lib/libpng.so
png_get_gAMA                        /usr/local/lib/libpng.so
png_set_gAMA                        /usr/local/lib/libpng.so
png_get_cHRM                        /usr/local/lib/libpng.so
png_set_cHRM                        /usr/local/lib/libpng.so
png_set_bKGD                        /usr/local/lib/libpng.so
png_get_bKGD                        /usr/local/lib/libpng.so
png_set_tRNS                        /usr/local/lib/libpng.so
png_get_tRNS                        /usr/local/lib/libpng.so
png_set_sRGB                        /usr/local/lib/libpng.so
png_get_sPLT                        /usr/local/lib/libpng.so
png_get_sRGB                        /usr/local/lib/libpng.so
png_set_sPLT                        /usr/local/lib/libpng.so
png_get_tIME                        /usr/local/lib/libpng.so
png_set_tIME                        /usr/local/lib/libpng.so
png_set_rows                        /usr/local/lib/libpng.so
png_get_rows                        /usr/local/lib/libpng.so
png_get_text                        /usr/local/lib/libpng.so
png_set_text /usr/local/rrdtool-1.2.19/lib/librrd.so
png_set_swap                        /usr/local/lib/libpng.so
png_set_pCAL                        /usr/local/lib/libpng.so
png_get_pCAL                        /usr/local/lib/libpng.so
png_get_pHYs                        /usr/local/lib/libpng.so
png_set_pHYs                        /usr/local/lib/libpng.so
png_set_sBIT                        /usr/local/lib/libpng.so
png_set_sCAL                        /usr/local/lib/libpng.so
png_get_sCAL                        /usr/local/lib/libpng.so
png_get_sBIT                        /usr/local/lib/libpng.so
png_set_oFFs                        /usr/local/lib/libpng.so
png_get_oFFs                        /usr/local/lib/libpng.so
png_get_IHDR                        /usr/local/lib/libpng.so
png_set_IHDR /usr/local/rrdtool-1.2.19/lib/librrd.so
png_read_end                        /usr/local/lib/libpng.so
png_read_png                        /usr/local/lib/libpng.so
png_read_row                        /usr/local/lib/libpng.so
png_process_data                    /usr/local/lib/libpng.so
png_info_init                       /usr/local/lib/libpng.so
png_get_user_height_max             /usr/local/lib/libpng.so
png_set_keep_unknown_chunks         /usr/local/lib/libpng.so
png_handle_as_unknown               /usr/local/lib/libpng.so
png_pass_ystart                     /usr/local/lib/libpng.so
png_set_filter_heuristics           /usr/local/lib/libpng.so
png_pass_dsp_mask                   /usr/local/lib/libpng.so
png_create_read_struct_2            /usr/local/lib/libpng.so
png_set_asm_flags                   /usr/local/lib/libpng.so
png_check_sig                       /usr/local/lib/libpng.so
png_free_data                       /usr/local/lib/libpng.so
png_set_strip_16                    /usr/local/lib/libpng.so
png_error                           /usr/local/lib/libpng.so
png_save_uint_32                    /usr/local/lib/libpng.so
png_save_uint_16                    /usr/local/lib/libpng.so
png_set_sRGB_gAMA_and_cHRM          /usr/local/lib/libpng.so
png_get_color_type                  /usr/local/lib/libpng.so
png_set_write_user_transform_fn     /usr/local/lib/libpng.so
png_write_chunk_end                 /usr/local/lib/libpng.so
png_pass_start                      /usr/local/lib/libpng.so
png_pass_mask                       /usr/local/lib/libpng.so
png_pass_yinc                       /usr/local/lib/libpng.so
png_warning                         /usr/local/lib/libpng.so
png_chunk_error                     /usr/local/lib/libpng.so
png_get_y_offset_pixels             /usr/local/lib/libpng.so
png_get_x_offset_pixels             /usr/local/lib/libpng.so
png_get_y_pixels_per_meter          /usr/local/lib/libpng.so
png_create_write_struct_2           /usr/local/lib/libpng.so
png_write_rows                      /usr/local/lib/libpng.so
png_write_info /usr/local/rrdtool-1.2.19/lib/librrd.so
png_read_image                      /usr/local/lib/libpng.so
png_set_crc_action                  /usr/local/lib/libpng.so
png_get_x_pixels_per_meter          /usr/local/lib/libpng.so
png_permit_mng_features             /usr/local/lib/libpng.so
png_set_gAMA_fixed                  /usr/local/lib/libpng.so
png_get_gAMA_fixed                  /usr/local/lib/libpng.so
png_get_libpng_ver                  /usr/local/lib/libpng.so
png_set_mmx_thresholds              /usr/local/lib/libpng.so
png_get_mem_ptr                     /usr/local/lib/libpng.so
png_set_strip_error_numbers         /usr/local/lib/libpng.so
png_set_gamma                       /usr/local/lib/libpng.so
png_set_flush                       /usr/local/lib/libpng.so
png_get_valid                       /usr/local/lib/libpng.so
png_set_shift                       /usr/local/lib/libpng.so
png_get_pixel_aspect_ratio          /usr/local/lib/libpng.so
png_set_error_fn                    /usr/local/lib/libpng.so
png_get_user_transform_ptr          /usr/local/lib/libpng.so
png_free_default                    /usr/local/lib/libpng.so
png_get_mmx_rowbytes_threshold      /usr/local/lib/libpng.so
png_set_write_fn                    /usr/local/lib/libpng.so
png_set_swap_alpha                  /usr/local/lib/libpng.so
png_pass_inc                        /usr/local/lib/libpng.so
ld: fatal: Symbol referencing errors. No output written to hobbitgraph.cgi
collect2: ld returned 1 exit status
make[1]: *** [hobbitgraph.cgi] Error 1
make[1]: Leaving directory `/export/home/crcook/xymon-4.3.0-beta2/web'
make: *** [web-build] Error 2

If I manually edit web/Makefile and remove hobbitgraph.cgi and 
hobbit-perfdata.cgi from the list of things to compile xymon builds. 
Trending is very broken though ;)

Craig

To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk






This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message are those of the individual sender, and are not necessarily the views of their organisation.