4.3.5 compile problems Solaris 10 x86
list Roland Soderstrom
Can't compile on Solaris 10 x86
ipndbb # pkginfo|grep SMC
application SMCdb47 db
application SMCevtlog eventlog
application SMCexpat expat
application SMCfontc fontconfig
application SMCfping fping
application SMCftype freetype
application SMCgcc gcc
application SMCgd gd
application SMCgviz graphviz
application SMCjpeg jpeg
application SMClibart libart_lgpl
application SMClibpng libpng
application SMCliconv libiconv
application SMClintl libintl
application SMClynx lynx
application SMCmake make
application SMCncurs ncurses
application SMColdap openldap
application SMCossl openssl
application SMCpcre pcre
application SMCrrdt rrdtool
application SMCsasl sasl
application SMCsudo sudo
application SMCxpm xpm
application SMCzlib zlib
Should take care of all (most?) dependencies
Configure runs fine
Make fail
ipndbb # /usr/local/bin/make
Snip
......
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
loadhosts_file.c: In function `load_hostnames':
loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in this function
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
gethostbyname ./libxymon.a(sendmsg.o)
socket ./libxymon.a(sendmsg.o)
getsockopt ./libxymon.a(sendmsg.o)
connect ./libxymon.a(sendmsg.o)
inet_aton ./libxymon.a(sendmsg.o)
inet_ntoa ./libxymon.a(sendmsg.o)
shutdown ./libxymon.a(sendmsg.o)
ld: fatal: Symbol referencing errors. No output written to loadhosts
collect2: ld returned 1 exit status
make[1]: *** [loadhosts] Error 1
make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib'
make: *** [lib-build] Error 2
ipndbb #
Any ideas?
Been googling and found nothing
Best Regards,
|
Roland
Soderstrom | Senior
System Administrator |
|
Disclaimer: This message contains privileged and confidential
information intended only for the use of the addressee named
above.
If you are not the intended recipient of this message you must
not
disseminate, copy or take any action in reliance on it.
Any views expressed in this message are those of the individual
sender,
except where the sender specifically states them to be the views
of the
company.
list Ralph Mitchell
Looks like you're not linking one or more network libraries. I don't have a Solaris system to get any closer than that. Ralph Mitchell On Mon, Sep 19, 2011 at 8:03 PM, Roland Soderstrom <
▸
user-0cec9512a49f@xymon.invalid> wrote:
Hi, Can't compile on Solaris 10 x86 ipndbb # pkginfo|grep SMC application SMCdb47 db application SMCevtlog eventlog application SMCexpat expat application SMCfontc fontconfig application SMCfping fping application SMCftype freetype application SMCgcc gcc application SMCgd gd application SMCgviz graphviz application SMCjpeg jpeg application SMClibart libart_lgpl application SMClibpng libpng application SMCliconv libiconv application SMClintl libintl application SMClynx lynx application SMCmake make application SMCncurs ncurses application SMColdap openldap application SMCossl openssl application SMCpcre pcre application SMCrrdt rrdtool application SMCsasl sasl application SMCsudo sudo application SMCxpm xpm application SMCzlib zlib Should take care of all (most?) dependencies Configure runs fine Make fail ipndbb # /usr/local/bin/make Snip ...... gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt loadhosts_file.c: In function `load_hostnames': loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in this function Undefined first referenced symbol in file recv ./libxymon.a(sendmsg.o) getservbyname ./libxymon.a(sendmsg.o) gethostbyname ./libxymon.a(sendmsg.o) socket ./libxymon.a(sendmsg.o) getsockopt ./libxymon.a(sendmsg.o) connect ./libxymon.a(sendmsg.o) inet_aton ./libxymon.a(sendmsg.o) inet_ntoa ./libxymon.a(sendmsg.o) shutdown ./libxymon.a(sendmsg.o) ld: fatal: Symbol referencing errors. No output written to loadhosts collect2: ld returned 1 exit status make[1]: *** [loadhosts] Error 1 make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib' make: *** [lib-build] Error 2 ipndbb # Any ideas? Been googling and found nothing -- Best Regards, *Roland Soderstrom* | *Senior System Administrator* *Direct* 03 8643 6485 | *Mobile* 0425 362 611 | *Office* 03 8643 6444 *Email* user-0cec9512a49f@xymon.invalid | *Web* www.logicaltech.com.au
[image: Logicaltech]
▸
Disclaimer: This message contains privileged and confidential information
intended only for the use of the addressee named above.
If you are not the intended recipient of this message you must not
disseminate, copy or take any action in reliance on it.
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of the
company.
list Roland Soderstrom
Network libraries???
Where should they be and what sort of lib is that?
- Roland
▸
On 20/09/11 10:39 AM, Ralph Mitchell wrote:Looks like you're not linking one or more network libraries. I don't have a Solaris system to get any closer than that.
Ralph MitchellOn Mon, Sep 19, 2011 at 8:03 PM, Roland Soderstrom <user-0cec9512a49f@xymon.invalid> wrote:
Hi,
Can't compile on Solaris 10 x86
ipndbb # pkginfo|grep SMC
application SMCdb47 db
application SMCevtlog eventlog
application SMCexpat expat
application SMCfontc fontconfig
application SMCfping fping
application SMCftype freetype
application SMCgcc gcc
application SMCgd gd
application SMCgviz graphviz
application SMCjpeg jpeg
application SMClibart libart_lgpl
application SMClibpng libpng
application SMCliconv libiconv
application SMClintl libintl
application SMClynx lynx
application SMCmake make
application SMCncurs ncurses
application SMColdap openldap
application SMCossl openssl
application SMCpcre pcre
application SMCrrdt rrdtool
application SMCsasl sasl
application SMCsudo sudo
application SMCxpm xpm
application SMCzlib zlib
Should take care of all (most?) dependencies
Configure runs fine
Make fail
ipndbb # /usr/local/bin/make
Snip
......
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
loadhosts_file.c: In function `load_hostnames':
loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in this function
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
gethostbyname ./libxymon.a(sendmsg.o)
socket ./libxymon.a(sendmsg.o)
getsockopt ./libxymon.a(sendmsg.o)
connect ./libxymon.a(sendmsg.o)
inet_aton ./libxymon.a(sendmsg.o)
inet_ntoa ./libxymon.a(sendmsg.o)
shutdown ./libxymon.a(sendmsg.o)
ld: fatal: Symbol referencing errors. No output written to loadhosts
collect2: ld returned 1 exit status
make[1]: *** [loadhosts] Error 1
make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib'
make: *** [lib-build] Error 2
ipndbb #
Any ideas?
Been googling and found nothing--Best Regards,
Roland Soderstrom | Senior System Administrator
Direct 03 8643 6485 | Mobile 0425 362 611 | Office 03 8643 6444
Email user-0cec9512a49f@xymon.invalid | Web www.logicaltech.com.au
Disclaimer: This message contains privileged and confidential information intended only for the use of the addressee named above.
If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it.
Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the company.
list Ralph Mitchell
There's a Makefile.SunOS in the build directory. As long as "uname -s"
returns "SunOS", then that file gets included, and in that file there's this
line:
NETLIBS = -lresolv -lsocket -lnsl
It looks like that line is not being included for some reason. Dunno why -
still don't have a Solaris system here :)
Ralph Mitchell
On Mon, Sep 19, 2011 at 9:52 PM, Roland Soderstrom <
▸
user-0cec9512a49f@xymon.invalid> wrote:
Hi, Network libraries??? Where should they be and what sort of lib is that? - Roland On 20/09/11 10:39 AM, Ralph Mitchell wrote: Looks like you're not linking one or more network libraries. I don't have a Solaris system to get any closer than that. Ralph Mitchell On Mon, Sep 19, 2011 at 8:03 PM, Roland Soderstrom < user-0cec9512a49f@xymon.invalid> wrote:Hi, Can't compile on Solaris 10 x86 ipndbb # pkginfo|grep SMC application SMCdb47 db application SMCevtlog eventlog application SMCexpat expat application SMCfontc fontconfig application SMCfping fping application SMCftype freetype application SMCgcc gcc application SMCgd gd application SMCgviz graphviz application SMCjpeg jpeg application SMClibart libart_lgpl application SMClibpng libpng application SMCliconv libiconv application SMClintl libintl application SMClynx lynx application SMCmake make application SMCncurs ncurses application SMColdap openldap application SMCossl openssl application SMCpcre pcre application SMCrrdt rrdtool application SMCsasl sasl application SMCsudo sudo application SMCxpm xpm application SMCzlib zlib Should take care of all (most?) dependencies Configure runs fine Make fail ipndbb # /usr/local/bin/make Snip ...... gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt loadhosts_file.c: In function `load_hostnames': loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in this function Undefined first referenced symbol in file recv ./libxymon.a(sendmsg.o) getservbyname ./libxymon.a(sendmsg.o) gethostbyname ./libxymon.a(sendmsg.o) socket ./libxymon.a(sendmsg.o) getsockopt ./libxymon.a(sendmsg.o) connect ./libxymon.a(sendmsg.o) inet_aton ./libxymon.a(sendmsg.o) inet_ntoa ./libxymon.a(sendmsg.o) shutdown ./libxymon.a(sendmsg.o) ld: fatal: Symbol referencing errors. No output written to loadhosts collect2: ld returned 1 exit status make[1]: *** [loadhosts] Error 1 make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib' make: *** [lib-build] Error 2 ipndbb # Any ideas? Been googling and found nothing -- Best Regards, *Roland Soderstrom* | *Senior System Administrator* *Direct* 03 8643 6485 | *Mobile* 0425 362 611 | *Office* 03 8643 6444 *Email* user-0cec9512a49f@xymon.invalid | *Web* www.logicaltech.com.au [image: Logicaltech] Disclaimer: This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the company.
list Kumaresh Nataraj
got the same error on SPARC gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/opt/xymon-4.3.5/include -I/usr/local/include -I. -I../include
▸
-DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
loadhosts_file.c: In function `load_hostnames':
loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in
this function
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
gethostbyname ./libxymon.a(sendmsg.o)
socket ./libxymon.a(sendmsg.o)
getsockopt ./libxymon.a(sendmsg.o)
connect ./libxymon.a(sendmsg.o)
inet_aton ./libxymon.a(sendmsg.o)
inet_ntoa ./libxymon.a(sendmsg.o)
shutdown ./libxymon.a(sendmsg.o)
ld: fatal: Symbol referencing errors. No output written to loadhosts
collect2: ld returned 1 exit status
gmake[1]: *** [loadhosts] Error 1
gmake[1]: Leaving directory `/opt/xymon-4.3.5/lib'
gmake: *** [lib-build] Error 2
************************************
Best Regards
Kumaresh
▸
On Mon, Sep 19, 2011 at 10:21 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
There's a Makefile.SunOS in the build directory. As long as "uname -s" returns "SunOS", then that file gets included, and in that file there's this line: NETLIBS = -lresolv -lsocket -lnsl It looks like that line is not being included for some reason. Dunno why - still don't have a Solaris system here :) Ralph Mitchell On Mon, Sep 19, 2011 at 9:52 PM, Roland Soderstrom < user-0cec9512a49f@xymon.invalid> wrote:Hi, Network libraries??? Where should they be and what sort of lib is that? - Roland On 20/09/11 10:39 AM, Ralph Mitchell wrote: Looks like you're not linking one or more network libraries. I don't have a Solaris system to get any closer than that. Ralph Mitchell On Mon, Sep 19, 2011 at 8:03 PM, Roland Soderstrom < user-0cec9512a49f@xymon.invalid> wrote:Hi, Can't compile on Solaris 10 x86 ipndbb # pkginfo|grep SMC application SMCdb47 db application SMCevtlog eventlog application SMCexpat expat application SMCfontc fontconfig application SMCfping fping application SMCftype freetype application SMCgcc gcc application SMCgd gd application SMCgviz graphviz application SMCjpeg jpeg application SMClibart libart_lgpl application SMClibpng libpng application SMCliconv libiconv application SMClintl libintl application SMClynx lynx application SMCmake make application SMCncurs ncurses application SMColdap openldap application SMCossl openssl application SMCpcre pcre application SMCrrdt rrdtool application SMCsasl sasl application SMCsudo sudo application SMCxpm xpm application SMCzlib zlib Should take care of all (most?) dependencies Configure runs fine Make fail ipndbb # /usr/local/bin/make Snip ...... gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt loadhosts_file.c: In function `load_hostnames': loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in this function Undefined first referenced symbol in file recv ./libxymon.a(sendmsg.o) getservbyname ./libxymon.a(sendmsg.o) gethostbyname ./libxymon.a(sendmsg.o) socket ./libxymon.a(sendmsg.o) getsockopt ./libxymon.a(sendmsg.o) connect ./libxymon.a(sendmsg.o) inet_aton ./libxymon.a(sendmsg.o) inet_ntoa ./libxymon.a(sendmsg.o) shutdown ./libxymon.a(sendmsg.o) ld: fatal: Symbol referencing errors. No output written to loadhosts collect2: ld returned 1 exit status make[1]: *** [loadhosts] Error 1 make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib' make: *** [lib-build] Error 2 ipndbb # Any ideas? Been googling and found nothing -- Best Regards, *Roland Soderstrom* | *Senior System Administrator* *Direct* 03 8643 6485 | *Mobile* 0425 362 611 | *Office* 03 8643 6444 *Email* user-0cec9512a49f@xymon.invalid | *Web* www.logicaltech.com.au [image: Logicaltech] Disclaimer: This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the company.
list Henrik Størner
▸
On 20-09-2011 02:03, Roland Soderstrom wrote:
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt Undefined first referenced symbol in file recv ./libxymon.a(sendmsg.o) getservbyname ./libxymon.a(sendmsg.o)
Oh dear - those Solaris network libraries ...
In lib/Makefile, you need to add "$(NETLIBS)" to the list of libraries used for the "loadhosts" tool. It is line 66:
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(LIBRTDEF)
Change it to
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(NETLIBS) $(LIBRTDEF)
I'll have to dig up a Solaris box to see if the same has to be done elsewhere.
Regards,
Henrik
list Roland Soderstrom
Thanks Ralph, Henrik.
Got over the first hurdle...
Adding $(NETLIBS) worked just fine.
Now I failed on the next... stackio.c
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lresolv -lsocket -lnsl -lrt
▸
loadhosts_file.c: In function `load_hostnames':loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in this function
stackio.c: In function `stackfgets':
stackio.c:424: warning: 'eolchar' might be used uninitialized in this function
stackio.c:440: warning: 'eolchar' might be used uninitialized in this function
▸
Undefined first referencedsymbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
gethostbyname ./libxymon.a(sendmsg.o)
socket ./libxymon.a(sendmsg.o)
getsockopt ./libxymon.a(sendmsg.o)
connect ./libxymon.a(sendmsg.o)
inet_aton ./libxymon.a(sendmsg.o)
inet_ntoa ./libxymon.a(sendmsg.o)
shutdown ./libxymon.a(sendmsg.o)
collect2: ld returned 1 exit status
make[1]: *** [stackio] Error 1
make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib'
make: *** [lib-build] Error 2
- Roland
▸
On 20/09/11 03:46 PM, Henrik Størner wrote:On 20-09-2011 02:03, Roland Soderstrom wrote:
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include
-DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
Oh dear - those Solaris network libraries ...
In lib/Makefile, you need to add "$(NETLIBS)" to the list of libraries used for the "loadhosts" tool. It is line 66:
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(LIBRTDEF)
Change it to
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(NETLIBS) $(LIBRTDEF)
I'll have to dig up a Solaris box to see if the same has to be done elsewhere.
Regards,
Henrik
Xymon@xymon.com
list Scott Pfister
in lib/Makefile Make the same change to
stackio: stackio.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ stackio.c ./libxymon.a
$(LIBRTDEF)
change it to
$(CC) $(CFLAGS) -DSTANDALONE -o $@ stackio.c ./libxymon.a $(NETLIBS)
$(LIBRTDEF)
On Tue, Sep 20, 2011 at 8:06 PM, Roland Soderstrom <
▸
user-0cec9512a49f@xymon.invalid> wrote:
Hi,
Thanks Ralph, Henrik.
Got over the first hurdle...
Adding $(NETLIBS) worked just fine.
Now I failed on the next... stackio.c
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include
-DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lresolv -lsocket -lnsl
-lrt
loadhosts_file.c: In function `load_hostnames':
loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in
this function
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include
-DSTANDALONE -o stackio stackio.c ./libxymon.a -lrt
stackio.c: In function `stackfgets':
stackio.c:424: warning: 'eolchar' might be used uninitialized in this
function
stackio.c:440: warning: 'eolchar' might be used uninitialized in this
function
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
gethostbyname ./libxymon.a(sendmsg.o)
socket ./libxymon.a(sendmsg.o)
getsockopt ./libxymon.a(sendmsg.o)
connect ./libxymon.a(sendmsg.o)
inet_aton ./libxymon.a(sendmsg.o)
inet_ntoa ./libxymon.a(sendmsg.o)
shutdown ./libxymon.a(sendmsg.o)
ld: fatal: Symbol referencing errors. No output written to stackio
collect2: ld returned 1 exit status
make[1]: *** [stackio] Error 1
make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib'
make: *** [lib-build] Error 2
- Roland
On 20/09/11 03:46 PM, Henrik Størner wrote:
On 20-09-2011 02:03, Roland Soderstrom wrote:
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include
-DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
Oh dear - those Solaris network libraries ...
In lib/Makefile, you need to add "$(NETLIBS)" to the list of libraries used
for the "loadhosts" tool. It is line 66:
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a
$(LIBRTDEF)
Change it to
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a
$(NETLIBS) $(LIBRTDEF)
I'll have to dig up a Solaris box to see if the same has to be done
elsewhere.
Regards,
Henrik
list Roland Soderstrom
thanks all,
Lots of NETLIBS missing.
After adding these, compilation worked fine.
It even worked with SSL which I always had problem getting to compile correctly.
I don't use it so I always said had to say no to the configure question.
-bash-3.00$ diff xymon-4.3.5-working/lib/Makefile xymon-4.3.5/lib/Makefile
66c66
▸
< $(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(NETLIBS) $(LIBRTDEF)---
> $(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(LIBRTDEF)
▸
< $(CC) $(CFLAGS) -DSTANDALONE -o $@ stackio.c ./libxymon.a $(NETLIBS) $(LIBRTDEF)---
> $(CC) $(CFLAGS) -DSTANDALONE -o $@ stackio.c ./libxymon.a $(LIBRTDEF)
< $(CC) $(CFLAGS) -DSTANDALONE -o $@ availability.c ./libxymon.a $(NETLIBS) $(LIBRTDEF)
---
> $(CC) $(CFLAGS) -DSTANDALONE -o $@ availability.c ./libxymon.a $(LIBRTDEF)
-bash-3.00$
-bash-3.00$ diff xymon-4.3.5-working/common/Makefile xymon-4.3.5/common/Makefile
25c25
< $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) ../lib/libxymon.a $(NETLIBS) $(LIBRTDEF)
---
> $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) ../lib/libxymon.a $(LIBRTDEF)
28c28
< $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) ../lib/xymonclient.a $(NETLIBS) $(LIBRTDEF)
---
> $(CC) $(CFLAGS) -o $@ $(HOSTSHOWOBJS) ../lib/xymonclient.a $(LIBRTDEF)
37c37
< $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) ../lib/libxymon.a $(NETLIBS) $(LIBRTDEF)
---
> $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) ../lib/libxymon.a $(LIBRTDEF)
40c40
< $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) ../lib/xymonclient.a $(NETLIBS) $(LIBRTDEF)
---
> $(CC) $(CFLAGS) -o $@ $(LAUNCHOBJS) ../lib/xymonclient.a $(LIBRTDEF)
43c43
< $(CC) $(CFLAGS) -o $@ $(CMDOBJS) ../lib/libxymon.a $(NETLIBS) $(LIBRTDEF)
---
> $(CC) $(CFLAGS) -o $@ $(CMDOBJS) ../lib/libxymon.a $(LIBRTDEF)
46c46
< $(CC) $(CFLAGS) -o $@ $(CMDOBJS) ../lib/xymonclient.a $(NETLIBS) $(LIBRTDEF)
---
> $(CC) $(CFLAGS) -o $@ $(CMDOBJS) ../lib/xymonclient.a $(LIBRTDEF)
-bash-3.00$
▸
On 21/09/11 10:15 AM, Scott Pfister wrote:in lib/Makefile Make the same change to
stackio: stackio.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ stackio.c ./libxymon.a $(LIBRTDEF)
change it to
$(CC) $(CFLAGS) -DSTANDALONE -o $@ stackio.c ./libxymon.a $(NETLIBS) $(LIBRTDEF)On Tue, Sep 20, 2011 at 8:06 PM, Roland Soderstrom <user-0cec9512a49f@xymon.invalid> wrote:
Hi,
Thanks Ralph, Henrik.
Got over the first hurdle...
Adding $(NETLIBS) worked just fine.
Now I failed on the next... stackio.c
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lresolv -lsocket -lnsl -lrt
loadhosts_file.c: In function `load_hostnames':
loadhosts_file.c:131: warning: 'insavchar' might be used uninitialized in this function
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I. -I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include -DSTANDALONE -o stackio stackio.c ./libxymon.a -lrt
stackio.c: In function `stackfgets':
stackio.c:424: warning: 'eolchar' might be used uninitialized in this function
stackio.c:440: warning: 'eolchar' might be used uninitialized in this function
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
gethostbyname ./libxymon.a(sendmsg.o)
socket ./libxymon.a(sendmsg.o)
getsockopt ./libxymon.a(sendmsg.o)
connect ./libxymon.a(sendmsg.o)
inet_aton ./libxymon.a(sendmsg.o)
inet_ntoa ./libxymon.a(sendmsg.o)
shutdown ./libxymon.a(sendmsg.o)
ld: fatal: Symbol referencing errors. No output written to stackio
collect2: ld returned 1 exit status
make[1]: *** [stackio] Error 1
make[1]: Leaving directory `/var/tmp/xymon-4.3.5/lib'
make: *** [lib-build] Error 2
- Roland
On 20/09/11 03:46 PM, Henrik Størner wrote:On 20-09-2011 02:03, Roland Soderstrom wrote:
gcc -g -O2 -Wall -Wno-unused -D_REENTRANT -DSunOS -I.
-I/var/tmp/xymon-4.3.5/include -I/usr/local/include -I. -I../include
-DSTANDALONE -o loadhosts loadhosts.c ./libxymon.a -lrt
Undefined first referenced
symbol in file
recv ./libxymon.a(sendmsg.o)
getservbyname ./libxymon.a(sendmsg.o)
Oh dear - those Solaris network libraries ...
In lib/Makefile, you need to add "$(NETLIBS)" to the list of libraries used for the "loadhosts" tool. It is line 66:
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(LIBRTDEF)
Change it to
loadhosts: loadhosts.c libxymon.a
$(CC) $(CFLAGS) -DSTANDALONE -o $@ loadhosts.c ./libxymon.a $(NETLIBS) $(LIBRTDEF)
I'll have to dig up a Solaris box to see if the same has to be done elsewhere.
Regards,
Henrik
Xymon@xymon.com
list Henrik Størner
On 21-09-2011 03:38, Roland Soderstrom wrote:
Lots of NETLIBS missing. After adding these, compilation worked fine.
Thanks, saves me the trouble of finding a Solaris box. The reason $(NETLIBS) is suddenly needed all these places is because I changed the code that loads the hosts.cfg file, so it can now load it from xymond instead of doing the file I/O by itself. But that means a lot of tools which previously just read stuff from a file now are doing network I/O instead, and therefore they suddenly need these libraries. And I had just plain forgotten that Solaris has this "feature" of keeping the network stuff in separate libraries. Regards, Henrik
list Roland Soderstrom
SSL with Solaris is not working after all.
I finally got to do the make install and it failed on SSL,
Because I don't use it I never really cared before, I just started over again and said no to use SSL.
Someone might care and I'm happy to help out debugging.
As everything seems to be there it must be a simple config problem.
ipndbb # make install
snip
.....
cd etcfiles; (echo "hosts.cfg"; echo "alerts.cfg"; echo "analysis.cfg"; echo "combo.cfg"; echo "client-local.cfg"; echo "holidays.cfg"; echo "rrddefinitions.cfg"; echo snmpmibs.cfg; echo xymonmenu.cfg) | ../../build/setup-newfiles /usr/local/xymon-4.3.5/server/etc/
ld.so.1: setup-newfiles: fatal: libssl.so.1.0.0: open failed: No such file or directory
Killed
make[1]: *** [install-cfg] Error 137
make[1]: Leaving directory `/var/tmp/xymon-4.3.5/xymond'
make: *** [install-xymond] Error 2
ipndbb # grep ssl Makefile
SSLINCDIR = -I/usr/local/ssl/include
SSLLIBS = -L/usr/local/ssl/lib -lssl -lcrypto
RPATHVAL += /usr/local/ssl/lib
ipndbb # ls -la /usr/local/ssl/lib
total 13618
drwxr-xr-x 4 bin bin 12 Sep 20 08:20 .
drwxr-xr-x 9 bin bin 10 Sep 20 08:20 ..
drwxr-xr-x 2 bin bin 14 Sep 20 08:20 engines
-rw-r--r-- 1 bin bin 2321302 Jun 3 2010 libcrypto.a
lrwxrwxrwx 1 root root 18 Sep 20 08:20 libcrypto.so -> libcrypto.so.1.0.0
-r-xr-xr-x 1 bin bin 1449244 Jun 3 2010 libcrypto.so.0.9.8
-r-xr-xr-x 1 bin bin 1637504 Jun 3 2010 libcrypto.so.1.0.0
-rw-r--r-- 1 bin bin 422352 Jun 3 2010 libssl.a
lrwxrwxrwx 1 root root 15 Sep 20 08:20 libssl.so -> libssl.so.1.0.0
-r-xr-xr-x 1 bin bin 304192 Jun 3 2010 libssl.so.0.9.8
-r-xr-xr-x 1 bin bin 338212 Jun 3 2010 libssl.so.1.0.0
drwxr-xr-x 2 bin bin 5 Sep 20 08:20 pkgconfig
ipndbb # file build/setup-newfiles
build/setup-newfiles: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped
ipndbb #
- Roland
▸
On 21/09/11 03:18 PM, Henrik Størner wrote:On 21-09-2011 03:38, Roland Soderstrom wrote:Lots of NETLIBS missing.
After adding these, compilation worked fine.
Thanks, saves me the trouble of finding a Solaris box.
The reason $(NETLIBS) is suddenly needed all these places is because I changed the code that loads the hosts.cfg file, so it can now load it from xymond instead of doing the file I/O by itself. But that means a lot of tools which previously just read stuff from a file now are doing network I/O instead, and therefore they suddenly need these libraries.
And I had just plain forgotten that Solaris has this "feature" of keeping the network stuff in separate libraries.
Regards,
Henrik
Xymon@xymon.com
list Henrik Størner
▸
Den 23-09-2011 07:47, Roland Soderstrom skrev:
SSL with Solaris is not working after all. I finally got to do the make install and it failed on SSL, Because I don't use it I never really cared before, I just started over again and said no to use SSL. Someone might care and I'm happy to help out debugging. As everything seems to be there it must be a simple config problem.
It is - your SSL libraries are not in the default runtime library path, and since the installation tools ends up being linked so they refer to the SSL libraries, they fail to run. Do an LD_LIBRARY_PATH=/usr/local/ssl/lib export LD_LIBRARY_PATH before running "make install", and I think it should work. See the description of how to configuring the system runtime library environment with "crle" at http://www.xymon.com/xymon/help/known-issues.html#solarislinker for a solution to these annoying library issues. Regards, Henrik
list Roland Soderstrom
Hi, Thanks, that worked just fine. - Roland
▸
On 23/09/11 11:31 PM, Henrik Størner wrote:Den 23-09-2011 07:47, Roland Soderstrom skrev:SSL with Solaris is not working after all. I finally got to do the make install and it failed on SSL, Because I don't use it I never really cared before, I just started over again and said no to use SSL. Someone might care and I'm happy to help out debugging. As everything seems to be there it must be a simple config problem.It is - your SSL libraries are not in the default runtime library path, and since the installation tools ends up being linked so they refer to the SSL libraries, they fail to run. Do an LD_LIBRARY_PATH=/usr/local/ssl/lib export LD_LIBRARY_PATH before running "make install", and I think it should work. See the description of how to configuring the system runtime library environment with "crle" at http://www.xymon.com/xymon/help/known-issues.html#solarislinker for a solution to these annoying library issues. Regards, Henrik