[xymon] 4.3.0 beta3 compile problem on solaris 10 sparc
Roland Soderstrom
rolands at logicaltech.com.au
Wed Nov 17 23:48:01 CET 2010
Hi,
Here is the Solaris 10 x86 compile error:
gcc -o setup-newfiles -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.0.beta3/include -DCLIENTONLY=1 -Wl,-R
setup-newfiles.c ../lib/xymonclient.a -lresolv -lsocket -lnsl -lrt
Undefined first referenced
symbol in file
main
/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/crt1.o
ld: fatal: Symbol referencing errors. No output written to setup-newfiles
collect2: ld returned 1 exit status
make[1]: *** [setup-newfiles] Error 1
make[1]: Leaving directory `/var/tmp/xymon-4.3.0.beta3/build'
make: *** [build-build] Error 2
- Roland
On 18/11/10 09:02 AM, Roland Soderstrom wrote:
> Hi,
>
> That seems like a dirty fix, I relinked /usr/ccs/bin/ld which is as
> dirty.
> Wouldn't the proper solution be that if it could find the Gnu ld it
> will use it?
> In my case it is in the path but /usr/ccs/bin is not.
> Still /usr/ccs/bin/ld is found first and used.
> I tried setting LD= but it doesn't help.
> As in that statement:
> -bash-3.00$ ld -V 2>&1|head -1|cut -d' ' -f1
> GNU
> -bash-3.00$ ld -V
> GNU ld version 2.15
> Supported emulations:
> elf32_sparc
> elf64_sparc
> So Makefile.SunOS finds the Gnu linker, but later it is using
> /usr/ccs/bin/ld. Where? and Why?
>
>
>
> Another problem:
> I'm trying to compile the client on Solaris 9 SPARC and get this error.
> gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -DSunOS -I.
> -I/var/tmp/xymon-4.3.0.beta3/include -DCLIENTONLY=1 -I.
> -I../include -c -o misc.o misc.c
> In file included from /var/tmp/xymon-4.3.0.beta3/include/libxymon.h:56,
> from misc.c:34:
> /var/tmp/xymon-4.3.0.beta3/include/../lib/eventlog.h:38: error: syntax
> error before numeric constant
> make[1]: *** [misc.o] Error 1
> make[1]: Leaving directory `/var/tmp/xymon-4.3.0.beta3/lib'
> make: *** [lib-client] Error 2
>
> Next up is Solaris 10 x86, well see if that works.
>
> - Roland
>
> On 18/11/10 07:40 AM, Henrik Størner wrote:
>> In<4CE4376C.909 at logicaltech.com.au> Roland
>> Soderstrom<rolands at logicaltech.com.au> writes:
>>
>>> make[1]: Entering directory `/var/tmp/xymon-4.3.0.beta3/xymonnet'
>>> gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
>>> -I/var/tmp/xymon-4.3.0.beta3/include -I/usr/local/include -o xymonnet
>>> -Wl,--rpath,/opt/csw/lib -Wl,--rpath,/usr/local/lib xymonnet.o
>>> contest.o
>>> httptest.o httpresult.o ldaptest.o dns.o dns2.o httpcookies.o
>>> ../lib/libxymon.a libcares.a -L/usr/local/lib -lpcre -lresolv
>>> -lsocket
>>> -lnsl -lrt
>>> /usr/ccs/bin/ld: illegal option -- rpath
>> I just now noticed that the problem probably isn't with C-ARES, but
>> with the "--rpath" options that Xymon uses for the linker command.
>>
>> If you look at the build/Makefile.SunOS file, you'll find the linker
>> setup there. Xymon tries to figure out if you are using the GNU ld
>> program:
>>
>> LDTYPE := $(shell ld -V 2>&1|head -1|cut -d' ' -f1)
>> ifeq ($(LDTYPE),GNU)
>> RPATH=-Wl,--rpath,
>> else
>> RPATH=-Wl,-R
>> endif
>>
>> Try deleting those lines, and see if it helps.
>>
>>
>> Regards,
>> Henrik
>>
>>
>> To unsubscribe from the xymon list, send an e-mail to
>> xymon-unsubscribe at xymon.com
>>
>>
>
> To unsubscribe from the xymon list, send an e-mail to
> xymon-unsubscribe at xymon.com
>
>
More information about the Xymon
mailing list