[Dovecot] Problem compiling dovecot 1.2.8 on Solaris 10?
I've got an issue using Sun's compilers on Solaris 10 - it appears that dovecot is trying to use the getopt function, that's part of GNU's glibc, and, therefore, not present when using Sun's compilers.
Any ideas on how to resolve?
cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-auth -I../../src/lib-mail -I../../src/lib-imap -I../../src/lib-index -I../../src/lib-storage/index/maildir -I../../src/auth -DPKG_RUNDIR=\""/usr/local/var/run/dovecot"\" -I/usr/local/include -I/usr/local/ssl/include -D_XPG6 -L/usr/local/lib -L/usr/local/ssl/lib -KPIC -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc99 -I/usr/local/include -I/usr/local/ssl/include -L/usr/local/lib -L/usr/local/ssl/lib -D_XPG6 -xstrconst -KPIC -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c authtest.c "authtest.c", line 164: warning: implicit function declaration: getopt "authtest.c", line 167: undefined symbol: optarg "authtest.c", line 167: warning: improper pointer/integer combination: op "=" "authtest.c", line 170: warning: improper pointer/integer combination: op "=" "authtest.c", line 176: undefined symbol: optind "authtest.c", line 178: undefined symbol: optind cc: acomp failed for authtest.c
-Drew Schatt
On Nov 20, 2009, at 2:40 PM, Drew Schatt wrote:
I've got an issue using Sun's compilers on Solaris 10 - it appears
that dovecot is trying to use the getopt function, that's part of
GNU's glibc, and, therefore, not present when using Sun's compilers.Any ideas on how to resolve?
cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib- auth -I../../src/lib-mail -I../../src/lib-imap -I../../src/lib- index -I../../src/lib-storage/index/maildir -I../../src/auth - DPKG_RUNDIR=\""/usr/local/var/run/dovecot"\" -I/usr/local/include - I/usr/local/ssl/include -D_XPG6 -L/usr/local/lib -L/usr/local/ssl/ lib -KPIC -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc99 -I/ usr/local/include -I/usr/local/ssl/include -L/usr/local/lib -L/usr/ local/ssl/lib -D_XPG6 -xstrconst -KPIC -lm -D_LARGEFILE_SOURCE - D_FILE_OFFSET_BITS=64 -c authtest.c "authtest.c", line 164: warning: implicit function declaration: getopt "authtest.c", line 167: undefined symbol: optarg "authtest.c", line 167: warning: improper pointer/integer
combination: op "=" "authtest.c", line 170: warning: improper pointer/integer
combination: op "=" "authtest.c", line 176: undefined symbol: optind "authtest.c", line 178: undefined symbol: optind cc: acomp failed for authtest.c
Hey Drew, fancy meeting you here. ;) Building 1.2.x under Solaris
is on my to-do list for this weekend, so if nobody has any
suggestions today, I'll figure it out.
-Dave
-- Dave McGuire Port Charlotte, FL
On Nov 20, 2009, at 2:40 PM, Drew Schatt wrote:
cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-auth -I../../src/lib-mail -I../../src/lib-imap -I../../src/lib-index -I../../src/lib-storage/index/maildir -I../../src/auth -DPKG_RUNDIR=\""/usr/local/var/run/dovecot"\" -I/usr/local/include -I/usr/local/ssl/include -D_XPG6 -L/usr/local/lib -L/usr/local/ssl/lib -KPIC -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc99 -I/usr/local/include -I/usr/local/ssl/include -L/usr/local/lib -L/usr/local/ssl/lib -D_XPG6 -xstrconst -KPIC -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c authtest.c "authtest.c", line 164: warning: implicit function declaration: getopt
This breaks because you're defining _XPG6. Why are you doing it?
On Nov 20, 2009, at 12:17 PM, Timo Sirainen wrote:
On Nov 20, 2009, at 2:40 PM, Drew Schatt wrote:
cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-auth -I../../src/lib-mail -I../../src/lib-imap -I../../src/lib-index -I../../src/lib-storage/index/maildir -I../../src/auth -DPKG_RUNDIR=\""/usr/local/var/run/dovecot"\" -I/usr/local/include -I/usr/local/ssl/include -D_XPG6 -L/usr/local/lib -L/usr/local/ssl/lib -KPIC -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc99 -I/usr/local/include -I/usr/local/ssl/include -L/usr/local/lib -L/usr/local/ssl/lib -D_XPG6 -xstrconst -KPIC -lm -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c authtest.c "authtest.c", line 164: warning: implicit function declaration: getopt
This breaks because you're defining _XPG6. Why are you doing it?
I was defining _XPG6 because a lot of the code I was compiling is c99 code, and requires it to be set to be totally happy.
Removing the -xc99 and the -D_XPG6 from my compiler options seems to have fixed the problem completely. Thanks Timo.
-Drew
participants (3)
-
Dave McGuire
-
Drew Schatt
-
Timo Sirainen