[Nbd] update: nbd-2.8.7 on Solaris 10
Adding -lsocket and -lnsl takes care of all of the symbol problems except "daemon" which I still have yet to figure out.
---------- Forwarded message ----------
From:
Vico Marziale <vicodark@...17...>
Date: Jan 21, 2007 11:08 PM
Subject: nbd-2.8.7 on Solaris 10
To: nbd-general@lists.sourceforge.net
I am having trouble getting nbd 2.8.7 to compile under solaris 10. Here
is the output from configure and make. How do I get this to work? Note
that I only need the server to run on the solaris machine, the client
is already installed on another linux box. I have already copied nbd.h
from a 2.6 kernel into the working directory.
# ./configure
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether Large File Support should be enabled... yes
checking whether syslog logging is requested... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... none
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... ./install-sh -c
checking for grep that handles long lines and -e... /usr/sfw/bin/ggrep
checking for egrep... /usr/sfw/bin/ggrep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for
strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for inline... inline
checking for an ANSI C-conforming const... yes
checking for unsigned short int... yes
checking size of unsigned short int... 2
checking for unsigned int... yes
checking size of unsigned int... 4
checking for unsigned long int... yes
checking size of unsigned long int... 4
checking for unsigned long long int... yes
checking size of unsigned long long int... 8
checking for llseek... yes
checking for alarm... yes
checking for gethostbyname... no
checking for inet_ntoa... no
checking for memset... yes
checking for socket... no
checking for strerror... yes
checking for strstr... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking whether client should be built... no
checking where to find a working nbd.h... "nbd.h"
checking for sys/mount.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for
netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h..
. yes
checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.2.0... yes (version 2.4.1)
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for off_t... yes
checking for pid_t... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Doxyfile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
# make
make all-am
make[1]: Entering directory `/nbd-2.8.7'
source='nbd-server.c' object='nbd_server-nbd-server.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ./depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -c -o nbd_server-nbd-server.o `test -f 'nbd-server.c' || echo './'`nbd-server.c
In file included from
nbd-server.c:90:
cliserv.h:51:1: warning: "_LARGEFILE_SOURCE" redefined
In file included from /usr/include/sys/types.h:18,
from nbd-server.c:58:
/usr/include/sys/feature_tests.h:164:1: warning: this is the location of the previous definition
gcc -g -O2 -o nbd-server nbd_server-nbd-server.o -lglib-2.0
Undefined first referenced
symbol in file
bind nbd_server-nbd-server.o
accept nbd_server-nbd-server.o
daemon nbd_server-nbd-server.o
listen nbd_server-nbd-server.o
socket nbd_server-
nbd-server.o
setsockopt nbd_server-nbd-server.o
getpeername nbd_server-nbd-server.o
inet_ntoa nbd_server-nbd-server.o
ld: fatal: Symbol referencing errors. No output written to nbd-server
collect2: ld returned 1 exit status
make[1]: *** [nbd-server] Error 1
make[1]: Leaving directory `/nbd-2.8.7'
make: *** [all] Error 2
#
Reply to: