@James, 

this is my Make directive set for 3.3.2, and it builds.

I did have to make a couple of patches though first. 
Added this:
Then had to add this define to dict_mysql.c
#define MYSQL_OPT_SSL_VERIFY_SERVER_CERT 0

and this patch.

This is the DB fix. Do it by prompt after all.
sed "s:DB_VERSION_MAJOR == 5:DB_VERSION_MAJOR == 6 || &:" -i src/util/dict_db.c


My make directives. I have a number of openssls installed … but only use one of 
course

set -- '-DUSE_TLS -I/usr/local/Cellar/[email protected]/1.1.1/include'
set -- "$@" '-I/usr/local/opt/icu4c/include'
set -- "$@" '-DHAS_MYSQL -I/usr/local/include/mysql'
set -- "$@" '-DHAS_PCRE -I/usr/local/include'
set -- "$@" '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL 
-DDEF_SERVER_SASL_TYPE=\"dovecot\" 
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sasl'
CCARGS="$@"

set -- '-lsasl2'
set -- "$@" '-L/usr/local/Cellar/[email protected]/1.1.1/lib -lssl -lcrypto'
set -- "$@" '-L/usr/lib -lsasl2'
set -- "$@" '-L/usr/local/opt/icu4c/lib -licuuc'
set -- "$@" '-L/usr/local/Cellar/berkeley-db@4/4.8.30/lib -ldb'
AUXLIBS="$@"


make -f Makefile.init shared=yes dynamicmaps=yes \
       config_directory=/usr/local/etc/postfix \
       command_directory=/usr/local/sbin \
       daemon_directory=/usr/local/libexec/postfix \
       queue_directory=/var/spool/postfix \
       data_directory=/var/lib/postfix \
       html_directory=/usr/share/doc/postfix/html \
       manpage_directory=/usr/local/man \
       readme_directory=/usr/share/doc/postfix \
       mailq_path=/usr/local/bin/mailq \
       newaliases_path=/usr/local/bin/newaliases \
       sendmail_path=/usr/local/sbin/sendmail \
       "CCARGS=${CCARGS}" \
       "AUXLIBS=${AUXLIBS}" \
       'AUXLIBS_MYSQL=-L/usr/local/lib -lmysqlclient -lz -lm' \
       'AUXLIBS_PCRE=-L/usr/local/lib -lpcre’



my brew list … You will see the openssl there 

zeus:postfix-3.3.2 robert$ brew list
adns            clamav          freetype        gradle          lame            
libksba         libvo-aacenc    netcdf          pkg-config      sdl2            
unrar
argtable        cmake           gcc             hdf5            ldns            
libmicrohttpd   libvorbis       nettle          protobuf        snappy          
uthash
augeas          cocoapods       gd              hidapi          leveldb         
libmpc          libvpx          ngircd          pth             sox             
webp
autoconf        coreutils       gdbm            hiredis         libassuan       
libogg          little-cms2     node            python          speex           
wget
automake        cryptopp        gettext         icecast         libevent        
libopendkim     llvm            npth            python@2        sphinx-doc      
wine
awscli          curl            ghostscript     icu4c           libffi          
libpng          llvm37          openjpeg        qrencode        sqlite          
winetricks
berkeley-db     d-bus           gmp             imagemagick     libgcrypt       
libsodium       [email protected]        openssl         qt              swftools        
x264
berkeley-db@4   dbus            gnu-sed         imap-uw         libgpg-error    
libtasn1        mad             [email protected]     qt5             szip            
x265
bfgminer        dialog          gnupg           isl             libgphoto2      
libtiff         makedepend      opus            re2c            telnet          
xmrig
boost           dirmngr         gnupg2          jansson         libicns         
libtool         miniupnpc       p11-kit         readline        telnetd         
xvid
cabextract      faac            gnutls          jasper          libident        
libunistring    mpfr            p7zip           redis           texi2html       
xz
cdo             ffmpeg          go              jbig2dec        libidn          
libusb          mysql           pcre            samba           theora          
yarn
certbot         flac            gperftools      jpeg            libidn2         
libusb-compat   nasm            perl            sane-backends   tnftp           
yasm
cgminer         fontconfig      gpg-agent       jsoncpp         libjson-rpc-cpp 
libuv           net-snmp        pinentry        sdl             unbound


Robert

> On 28 Nov 2018, at 12:00, James Brown <[email protected]> wrote:
> 
>> On 28 Nov 2018, at 10:38 pm, Herbert J. Skuhra <[email protected]> wrote:
>> 
>> On Wed, Nov 28, 2018 at 09:55:02PM +1100, James Brown wrote:
>>> I have installed OpenSSL v1.1.1 via Homebrew. I’m trying to install Postfix 
>>> 3.3.2 but it always ends with:
>>> 
>>> cc -I. -I../../include -DUSE_TLS -DUSE_SASL_AUTH 
>>> -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DDEF_COMMAND_DIR=\"/usr/local/sbin\" 
>>> -DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\" 
>>> -DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" -DHAS_PCRE 
>>> -I/usr/local/opt//include -DHAS_SSL 
>>> -I/usr/local/Cellar/[email protected]/1.1.1/include/openssl -DHAS_MYSQL 
>>> -I/usr/local/opt/[email protected]/include/mysql -DBIND_8_COMPAT -DNO_NETINFO 
>>> -DRESOLVE_H_NEEDS_ARPA_NAMESER_COMPAT_H -DNO_EAI 
>>> -DDEF_SMTPUTF8_ENABLE=\"no\" -DHAS_DEV_URANDOM 
>>> -DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\" 
>>> -DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" 
>>> -DDEF_SENDMAIL_PATH=\"/usr/local/sbin/sendmail\" -UUSE_DYNAMIC_LIBS 
>>> -DDEF_SHLIB_DIR=\"no\" -UUSE_DYNAMIC_MAPS -Wmissing-prototypes -Wformat 
>>> -Wno-comment  -g -O -I. -I../../include -DMACOSX -c abounce.c
>>> In file included from abounce.c:187:
>>> ./mail_params.h:20:10: fatal error: 'openssl/opensslv.h' file not found
>>> #include <openssl/opensslv.h>           /* OPENSSL_VERSION_NUMBER */
>>>         ^~~~~~~~~~~~~~~~~~~~
>>> 1 error generated.
>>> make: *** [abounce.o] Error 1
>>> 
>>> opensslv.h is at:
>>> 
>>> $ locate opensslv.h
>>> /usr/local/Cellar/openssl/1.0.2p/include/openssl/opensslv.h
>>> /usr/local/Cellar/openssl/1.0.2q/include/openssl/opensslv.h
>>> /usr/local/Cellar/[email protected]/1.1.1/include/openssl/opensslv.h
>>> /usr/local/Cellar/[email protected]/1.1.1a/include/openssl/opensslv.h
>>> 
>>> My Make script is:
>>> 
>>> $ make -f Makefile.init makefiles CCARGS='-DUSE_TLS -DUSE_SASL_AUTH \
>>> -DDEF_SERVER_SASL_TYPE=\"dovecot\" \
>>> -DDEF_COMMAND_DIR=\"/usr/local/sbin\" \
>>> -DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\" \
>>> -DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\" \
>>> -DHAS_PCRE -I/usr/local/opt//include \
>>> -DHAS_SSL -I/usr/local/opt/[email protected]/1.1.1/include \
>>> -DHAS_MYSQL -I/usr/local/opt/[email protected]/include/mysql' 
>>> AUXLIBS='-L/usr/local/lib -lpcre -lssl -lcrypto 
>>> -L/usr/local/opt/[email protected]/lib \
>>> -lmysqlclient -lz -lm'  sendmail_path=/usr/local/sbin/sendmail 
>>> newaliases_path=/usr/local/bin/newaliases mailq_path=/usr/local/bin/mail
>>> 
>>> I’ve change the DHAS_SSL a few times but keep getting the exact same error. 
>>> I’m sure it’s a simple thing to fix, but can’t get it to work.
>>> 
>>> Any ideas?
>> 
>> Have you really tried -I/usr/local/Cellar/[email protected]/1.1.1/include/ ?
>> The build log shows -I/usr/local/Cellar/[email protected]/1.1.1/include/openssl.
>> 
>> And why do you have multiple versions of openssl (1.0.2p vs 1.0.2q and
>> 1.1.1 vs. 1.1.1a) installed?
> 
> Thanks Herbert.
> 
> Well, I thought that’s what I was using, but I’ve tried so many variations. 
> Removed the ‘/openssl’ and now I get:
> 
> c/postfix\" -DHAS_PCRE -I/usr/local/opt//include -DHAS_SSL 
> -I/usr/local/Cellar/[email protected]/1.1.1/include -DHAS_MYSQL 
> -I/usr/local/opt/[email protected]/include/mysql -DBIND_8_COMPAT -DNO_NETINFO 
> -DRESOLVE_H_NEEDS_ARPA_NAMESER_COMPAT_H -DNO_EAI -DDEF_SMTPUTF8_ENABLE=\"no\" 
> -DHAS_DEV_URANDOM -DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\" 
> -DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" 
> -DDEF_SENDMAIL_PATH=\"/usr/local/sbin/sendmail\" -UUSE_DYNAMIC_LIBS 
> -DDEF_SHLIB_DIR=\"no\" -UUSE_DYNAMIC_MAPS -Wmissing-prototypes -Wformat 
> -Wno-comment -g -O -I. -I../../include -DMACOSX  -o master master.o 
> master_conf.o master_ent.o master_sig.o master_avail.o master_spawn.o 
> master_service.o master_status.o master_listen.o master_vars.o 
> master_wakeup.o master_watch.o master_flow.o master_monitor.o 
> ../../lib/libglobal.a ../../lib/libutil.a -L/usr/local/lib -lpcre -lssl 
> -lcrypto -L/usr/local/opt/[email protected]/lib -lmysqlclient -lz -lm -flat_namespace 
> -lresolv 
> ld: library not found for -lssl
> clang: error: linker command failed with exit code 1 (use -v to see 
> invocation)
> make: *** [master] Error 1
> 
> Homebrew installed openssl 1.0.2 when I installed either stunnel or [email protected] 
> as Homebrew won’t let me uninstall that version as they are using it. Suppose 
> I’ll have to work out how to have Homebrew install them with [email protected] 
> somehow.
> 
> James.

Robert Chalmers
https://robert-chalmers.uk
[email protected]
@R_A_Chalmers

Reply via email to