Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ SW:Fote 2.1 compilation on Solaris 10(SPARC)
SW:Fote 2.1 compilation on Solaris 10(SPARC)
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| JanusFarsythe
Canada (2 posts) Bio
|
Date
| Sat 05 Jul 2008 03:54 AM (UTC) |
Message
| After a bit of struggling to correct code for this OS(proper library for DIR is <dirent.h>) it compiles without issue. However, after compilation, the build chokes when linking.
make -s swr
Undefined first referenced
symbol in file
bind o/comm.o
recv o/comm.o
send o/comm.o
getservbyname o/comm.o
accept o/comm.o
listen o/comm.o
gethostbyaddr o/comm.o
gethostbyname o/comm.o
socket o/comm.o
setsockopt o/comm.o
inet_ntoa o/comm.o
ld: fatal: Symbol referencing errors. No output written to swr
collect2: ld returned 1 exit status
make[1]: *** [swr] Error 1
make: *** [all] Error 2
Anyone have any ideas in getting this built on this system? | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #1 on Sat 05 Jul 2008 10:18 AM (UTC) |
Message
| These all look like network functions, so it looks like you haven't linked against the network library. The way to find its name is to do "man (function)" asking about one of the missing functions.
eg.
$ man gethostbyaddr
GETHOSTBYNAME(3) BSD Library Functions Manual GETHOSTBYNAME(3)
NAME
endhostent, gethostbyaddr, gethostbyname, gethostbyname2, gethostent, herror,
hstrerror, sethostent -- get network host entry
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <netdb.h>
...
The line in bold says which library it is in, so you should have -lc in your Makefile on the line that does the linking. Or in your case, whatever library is listed.
I notice inside the Makefile are the following lines:
# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket
As you are compiling on Solaris, did you uncomment those two lines?
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| JanusFarsythe
Canada (2 posts) Bio
|
Date
| Reply #2 on Sat 05 Jul 2008 07:36 PM (UTC) |
Message
| I had to add the compile flags and linker options manually, as for some reason, the 2.1.3 makefile doesn't have the solaris flag options mentioned in your post. After a make purge and a make clean, it builds fine. Thanks for the information on that. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,866 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top