Looks like you need to link in -lnsl -lsocket -lm

Aaron

On Sun, 22 Dec 2002, Ronnie Tartar wrote:

> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  list.c
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  debug.c
> debug.c: In function `trace':
> debug.c:70: warning: implicit declaration of function `vsyslog'
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  pipe.c
> pipe.c: In function `insert_messages':
> pipe.c:282: warning: subscript has type `char'
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  mime.c
> mime.c: In function `mime_readheader':
> mime.c:226: warning: subscript has type `char'
> gcc -o mysql/dbmysql.o -c mysql/dbmysql.c -L/usr/local/mysql/lib
> -I/usr/local/mysql/include
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  dbmd5.c
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  md5.c
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  bounce.c
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  forward.c
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  memblock.c
> gcc -o mysql/dbauthmysql.o -c mysql/dbauthmysql.c -L/usr/local/mysql/lib
> -I/usr/local/mysql/include
> gcc -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE  -c  config.c
> config.c: In function `ReadConfig':
> config.c:59: warning: subscript has type `char'
> config.c:86: warning: subscript has type `char'
> config.c:90: warning: subscript has type `char'
> gcc     -Wall -O2 -D_BSD_SOURCE -D_SVID_SOURCE main.c -o dbmail-smtp list.o
> debug.o pipe.o mime.o mysql/dbmysql.o dbmd5.o md5.o bounce.o forward.o
> memblock.o  mysql/dbauthmysql.o config.o -L/usr/local/mysql/lib
> -I/usr/local/mysql/include -lmysqlclient -lcrypto
> main.c: In function `main':
> main.c:49: warning: implicit declaration of function `openlog'
> /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function
> `mysql_real_connect':
> libmysql.o(.text+0x670): undefined reference to `socket'
> libmysql.o(.text+0xe3c): undefined reference to `socket'
> libmysql.o(.text+0xe78): undefined reference to `inet_addr'
> libmysql.o(.text+0xee4): undefined reference to `gethostbyname_r'
> /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function
> `mysql_once_init':
> libmysql.o(.text+0x2e50): undefined reference to `getservbyname'
> /usr/local/mysql/lib/libmysqlclient.a(libmysql.o): In function `connect2':
> libmysql.o(.text+0x3534): undefined reference to `connect'
> libmysql.o(.text+0x3570): undefined reference to `connect'
> libmysql.o(.text+0x36b0): undefined reference to `getsockopt'
> /usr/local/mysql/lib/libmysqlclient.a(violite.o): In function `vio_delete':
> violite.o(.text+0xa4): undefined reference to `shutdown'
> /usr/local/mysql/lib/libmysqlclient.a(violite.o): In function
> `vio_fastsend':
> violite.o(.text+0x1b0): undefined reference to `setsockopt'
> violite.o(.text+0x1e0): undefined reference to `setsockopt'
> /usr/local/mysql/lib/libmysqlclient.a(violite.o): In function
> `vio_keepalive':
> violite.o(.text+0x240): undefined reference to `setsockopt'
> /usr/local/mysql/lib/libmysqlclient.a(violite.o): In function `vio_close':
> violite.o(.text+0x2a0): undefined reference to `shutdown'
> /usr/local/mysql/lib/libmysqlclient.a(violite.o): In function
> `vio_peer_addr':
> violite.o(.text+0x350): undefined reference to `getpeername'
> /usr/local/mysql/lib/libmysqlclient.a(password.o): In function `scramble':
> password.o(.text+0x564): undefined reference to `floor'
> password.o(.text+0x608): undefined reference to `floor'
> /usr/local/mysql/lib/libmysqlclient.a(password.o): In function
> `check_scramble':
> password.o(.text+0x854): undefined reference to `floor'
> password.o(.text+0x8fc): undefined reference to `floor'
> /usr/local/mysql/lib/libmysqlclient.a(my_net.o): In function `my_inet_ntoa':
> my_net.o(.text+0xc): undefined reference to `inet_ntoa'
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `smtp'
>
>
>
> -----Original Message-----
> From: Aaron Stone [mailto:[EMAIL PROTECTED]
> Sent: Saturday, December 21, 2002 11:34 PM
> To: 'dbmail@dbmail.org'
> Subject: Re: [Dbmail] Sun Solaris and DBMail
>
>
> The output of the failed compile is needed; everything else in your
> description indicates that it should work in a correct build environment.
>
> Aaron
>
>
> On Sat, 21 Dec 2002, Ronnie Tartar wrote:
>
> > I am trying to put DBMail 1.0 on Sun Solaris 8.0.
> >
> > I have everything installed that is required I believe.  I am using
> > mysql, the binary downloaded from mysql.
> >
> > I cannot seem to compile.  Is Gcc an acceptable compiler?
> >
> > I have v2.95.
> >
> > Any suggestions would be helpful.
> >
> > Thank You.
> >
>
> _______________________________________________
> Dbmail mailing list
> Dbmail@dbmail.org https://mailman.fastxs.nl/mailman/listinfo/dbmail
> _______________________________________________
> Dbmail mailing list
> Dbmail@dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>

Reply via email to