Hello all,

I’m working on building OpenSMTPd on OS X Yosemite. I’ve tried the latest 
portable snapshot, 5.4.4p1, and 5.4.2p1. I’m having a couple issue.

With the 5.4.2p1 and 5.4.4p1 I get the following error: 
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../smtpd -I../../openbsd-compat 
-I../../contrib/lib/libc/asr -I. -I/usr/local/include  
-DSMTPD_CONFDIR=\"/usr/local/etc\" -DPATH_CHROOT=\"/var/empty\" 
-DPATH_SMTPCTL=\"/usr/local/sbin/smtpctl\" 
-DPATH_MAILLOCAL=\"/usr/local/libexec/opensmtpd/mail.local\" 
-DPATH_FILTERS=\"/usr/local/libexec/opensmtpd\" 
-DPATH_TABLES=\"/usr/local/libexec/opensmtpd\" -DHAVE_CONFIG_H -DIO_SSL 
-DASR_OPT_THREADSAFE=0 -DCA_FILE=\"/etc/ssl/cert.pem\" -g -O2  
-Qunused-arguments -Wno-unknown-warning-option -Wall -Wpointer-arith 
-Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess 
-Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-memset  
-D_GNU_SOURCE -MT smtpd-mta_session.o -MD -MP -MF .deps/smtpd-mta_session.Tpo 
-c -o smtpd-mta_session.o `test -f '../../smtpd/mta_session.c' || echo 
'./'`../../smtpd/mta_session.c
mv -f .deps/smtpd-mta_session.Tpo .deps/smtpd-mta_session.Po
\
         \
        /bin/sh ../../ylwrap `test -f '../../smtpd/parse.y' || echo 
'./'`../../smtpd/parse.y y.tab.c parse.c y.tab.h `echo parse.c | sed -e 
s/cc$/hh/ -e s/cpp$/hpp/ -e s/cxx$/hxx/ -e s/c++$/h++/ -e s/c$/h/` y.output 
parse.output -- bison -y  
gcc -DHAVE_CONFIG_H -I. -I../..  -I../../smtpd -I../../openbsd-compat 
-I../../contrib/lib/libc/asr -I. -I/usr/local/include  
-DSMTPD_CONFDIR=\"/usr/local/etc\" -DPATH_CHROOT=\"/var/empty\" 
-DPATH_SMTPCTL=\"/usr/local/sbin/smtpctl\" 
-DPATH_MAILLOCAL=\"/usr/local/libexec/opensmtpd/mail.local\" 
-DPATH_FILTERS=\"/usr/local/libexec/opensmtpd\" 
-DPATH_TABLES=\"/usr/local/libexec/opensmtpd\" -DHAVE_CONFIG_H -DIO_SSL 
-DASR_OPT_THREADSAFE=0 -DCA_FILE=\"/etc/ssl/cert.pem\" -g -O2  
-Qunused-arguments -Wno-unknown-warning-option -Wall -Wpointer-arith 
-Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess 
-Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -fno-builtin-memset  
-D_GNU_SOURCE -MT smtpd-parse.o -MD -MP -MF .deps/smtpd-parse.Tpo -c -o 
smtpd-parse.o `test -f 'parse.c' || echo './'`parse.c
../../smtpd/parse.y:169:13: error: typedef redefinition with different types 
('int' vs 'struct YYSTYPE')
typedef int YYSTYPE;
            ^
../../smtpd/parse.y:146:3: note: previous definition is here
} YYSTYPE;
  ^
1 error generated.

I don’t know yacc/lex/bison really well enough to sort this one out. So this is 
the road block I’ve hit.


Now onto the latest portable snapshot (opensmtpd-201502012312p1):
With the latest snapshot - first is an issue (and this only effects the latest 
portable snapshot ) with the OpenBSD-compat libraries. I’m getting:

./openbsd-compat.h:152:5: warning: incompatible redeclaration of library 
function 'snprintf' [-Wincompatible-library-redeclaration]
int snprintf(char *, size_t, SNPRINTF_CONST char *, …);

If use the openbsd-compat from 5.4.2 or 5.4.4, this goes aways. So that’s easy 
enough. It’s probably outside the scope of opensmtpd and not a big deal. But I 
figured it would be worth noting. 
   

Second problem (and this problem also occurs on FreeBSD-current as well) - The 
latest snapshot I get the following error:

In file included from ../../smtpd/aliases.c:41:
../../smtpd/smtpd.h:141:16: error: use of undeclared identifier 'HOST_NAME_MAX'
        char hostname[HOST_NAME_MAX+1];
                      ^
../../smtpd/smtpd.h:147:16: error: use of undeclared identifier 'HOST_NAME_MAX'
        char heloname[HOST_NAME_MAX+1];
                      ^
../../smtpd/smtpd.h:157:12: error: use of undeclared identifier 'HOST_NAME_MAX'
        char    name[HOST_NAME_MAX+1];
                     ^
../../smtpd/smtpd.h:166:14: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                    name[HOST_NAME_MAX+1];
                                     ^
../../smtpd/smtpd.h:528:19: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                            smtpname[HOST_NAME_MAX+1];
                                                 ^
../../smtpd/smtpd.h:529:15: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                            helo[HOST_NAME_MAX+1];
                                             ^
../../smtpd/smtpd.h:530:19: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                            hostname[HOST_NAME_MAX+1];
                                                 ^
../../smtpd/smtpd.h:572:19: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                     hostname[HOST_NAME_MAX+1];
                                          ^
../../smtpd/smtpd.h:623:22: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                            sc_hostname[HOST_NAME_MAX+1];
                                                    ^
../../smtpd/smtpd.h:1084:14: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                    name[HOST_NAME_MAX+1];
                                     ^
../../smtpd/smtpd.h:1096:17: error: use of undeclared identifier 'HOST_NAME_MAX'
        char                    pkiname[HOST_NAME_MAX+1];

And similar in dns.c, filter.c, mta.c, parse.y - as OS X doesn’t have 
HOST_NAME_MAX, but if you switch it to _POSIX_HOST_NAME_MAX - that resolves 
that issues ( it’s a long standing OS X-ism - though this also is a problem on 
FreeBSD-current, and the fix is the same - so again, super easy ). This is a 
super easy fix. I have a patch to handle that. But once that is corrected - and 
this is only on OS X - they same parser error:

../../smtpd/parse.y:169:13: error: typedef redefinition with different types 
('int' vs 'struct YYSTYPE')
typedef int YYSTYPE;
            ^
../../smtpd/parse.y:146:3: note: previous definition is here
} YYSTYPE;
  ^
1 error generated.

That parser error rears it’s ugly head again. So it appears to at least be 
consistent across the latest snapshot and the full releases under yosemite. 

Any ideas? I know OS X’s built in yacc/bison version is ancient ( 2.3, IIRC ), 
but even using a modern version of Bison ( 3.0.4 via homebrew or macports ), 
the same error occurs. 

Any help would be appreciated. The only opensmptd version I have for OS X is 
ancient and I would love to get a modern version so it, so, like every other 
box I care and feed for - it has the option of running the best mail server 
around. 

cheers and thanks,
-bp
==============================
Ben Perrault
email: [email protected]
twitter: @creepingfur





--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]

Reply via email to