[Alpine-info] Problems building alpine 2.00 for Mac OS X 10.6
Andrew Carter
ascarter at gmail.com
Fri Oct 9 00:50:28 PDT 2009
On Oct 8, 2009, at 5:06 PM, Matt Ackeret wrote:
> On Thu, 8 Oct 2009, Andrew Carter wrote:
>> ./configure --enable-osx-universal-binaries --disable-dependency-
>> tracking
>>
>> The error seems to be related to generating PPC code (I guess for
>> the universal
>> binary). I don't need that but not sure how to get it to build for
>> mac without
>> it. At any rate, haven't been able to find anything that explains
>> how to fix
>> it.
>
> Well, if you don't want it to build PPC, then don't pass the
> --enable-osx-universal-binaries option!
>
When I do that, I got a different error related to finding pam/
pam_appl.h header file:
Building c-client for osx...
echo `cat SPECIALS` SSLCERTS=/System/Library/OpenSSL/certs
EXTRAAUTHENTICATORS=gss > c-client/SPECIALS
cd c-client;make osx EXTRACFLAGS='-DMAC_OSX_KLUDGE=1'\
EXTRALDFLAGS=''\
EXTRADRIVERS='mbox'\
EXTRAAUTHENTICATORS='gss'\
PASSWDTYPE=pam SSLTYPE=nopwd IP=6\
SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/System/
Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private
GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMDLFLAGS=-lpam SSLCERTS=/
System/Library/OpenSSL/certs EXTRAAUTHENTICATORS=gss
make build EXTRACFLAGS='-DMAC_OSX_KLUDGE=1' EXTRALDFLAGS=''
EXTRADRIVERS='mbox' EXTRAAUTHENTICATORS='gss' PASSWDTYPE=pam
SSLTYPE=nopwd IP=6 `cat SPECIALS` OS=osx \
CRXTYPE=nfs \
SPOOLDIR=/var/spool MAILSPOOL=/var/mail \
RSHPATH=/usr/bin/rsh \
BASECFLAGS="-g -O2 -pipe -fno-omit-frame-pointer -Wno-pointer-sign"
sh -c 'rm -rf auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c
osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE c-client.a || true'
Once-only environment setup...
echo cc > CCTYPE
echo -g -O2 -pipe -fno-omit-frame-pointer -Wno-pointer-sign '-
DMAC_OSX_KLUDGE=1' -DCHUNKSIZE=65536 > CFLAGS
echo -DCREATEPROTO=unixproto -DEMPTYPROTO=unixproto \
-DMD5ENABLE=\"/etc/cram-md5.pwd\" -DMAILSPOOL=\"/var/mail\" \
-DANONYMOUSHOME=\"/var/mail/anonymous\" \
-DACTIVEFILE=\"/usr/lib/news/active\" -DNEWSSPOOL=\"/var/spool/news
\" \
-DRSHPATH=\"/usr/bin/rsh\" -DLOCKPGM=\"\" \
-DLOCKPGM1=\"/usr/libexec/mlock\" -DLOCKPGM2=\"/usr/sbin/mlock\" \
-DLOCKPGM3=\"/etc/mlock\" > OSCFLAGS
echo > LDFLAGS
echo "ar rc c-client.a osdep.o mail.o misc.o newsrc.o smanager.o
utf8.o utf8aux.o siglocal.o dummy.o pseudo.o netmsg.o flstring.o
fdstring.o rfc822.o nntp.o smtp.o imap4r1.o pop3.o unix.o mbx.o mmdf.o
tenex.o mtx.o news.o phile.o mh.o mx.o mix.o;ranlib c-client.a" >
ARCHIVE
echo osx > OSTYPE
./drivers mbox imap nntp pop3 mix mx mbx tenex mtx mh mmdf unix news
phile dummy
./mkauths gss ext md5 pla log
echo -I/usr/include -DGSS_C_NT_HOSTBASED_SERVICE=gss_nt_service_name -
DKRB5_DEPRECATED=1 >> OSCFLAGS
sh -c '(test -f /usr/lib/libk5crypto.a) && echo -L/usr/lib -
lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err || echo -L/usr/lib -
lgssapi_krb5 -lkrb5 -lcrypto -lcom_err' >> LDFLAGS
echo "#include \"kerb_mit.c\"" >> auths.c
echo " mail_versioncheck (CCLIENTVERSION);" >> linkage.c
ln -s os_osx.h osdep.h
ln -s os_osx.c osdepbas.c
ln -s log_std.c osdeplog.c
ln -s sig_bsd.c siglocal.c
ln -s crx_nfs.c crexcl.c
ln -s ip6_unix.c ip_unix.c
sh -c '(test osx = sc5 -o osx = sco -o ! -f /usr/include/sys/
statvfs.h) && echo -DNOFSTATVFS >> OSCFLAGS || fgrep statvfs64 /usr/
include/sys/statvfs.h > /dev/null || echo -DNOFSTATVFS64 >> OSCFLAGS'
PAM password authentication
echo -lpam -ldl >> LDFLAGS
ln -s ckp_pam.c osdepckp.c
Building with SSL
ln -s ssl_unix.c osdepssl.c
echo -I/usr/include/openssl -I/usr/include/openssl/openssl -
DSSL_CERT_DIRECTORY=\"/System/Library/OpenSSL/certs\" -
DSSL_KEY_DIRECTORY=\"/System/Library/OpenSSL/private\" >> OSCFLAGS
echo " ssl_onceonlyinit ();" >> linkage.c
echo -L/usr/lib -lssl -lcrypto >> LDFLAGS
Building with SSL and plaintext passwords disabled unless SSL/TLS
echo " mail_parameters (NIL,SET_DISABLEPLAINTEXT,(void *) 2);" >>
linkage.c
cat osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
Building OS-dependent module
If you get No such file error messages for files x509.h, ssl.h,
pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
is not installed on your system. Either install OpenSSL first
or build with command: make osx SSLTYPE=none
`cat CCTYPE` -c `cat CFLAGS` `cat OSCFLAGS` -c osdep.c
osdep.c:85:26: error: pam/pam_appl.h: No such file or directory
osdep.c:104: warning: ‘struct pam_response’ declared inside parameter
list
osdep.c:104: warning: its scope is only this definition or
declaration, which is probably not what you want
osdep.c:104: warning: ‘struct pam_message’ declared inside parameter
list
osdep.c: In function ‘checkpw_conv’:
osdep.c:108: error: invalid application of ‘sizeof’ to incomplete type
‘struct pam_response’
osdep.c:109: error: dereferencing pointer to incomplete type
osdep.c:110: error: ‘PAM_PROMPT_ECHO_ON’ undeclared (first use in this
function)
osdep.c:110: error: (Each undeclared identifier is reported only once
osdep.c:110: error: for each function it appears in.)
osdep.c:111: error: invalid use of undefined type ‘struct pam_response’
osdep.c:111: error: dereferencing pointer to incomplete type
osdep.c:111: error: ‘PAM_SUCCESS’ undeclared (first use in this
function)
osdep.c:112: error: invalid use of undefined type ‘struct pam_response’
osdep.c:112: error: dereferencing pointer to incomplete type
osdep.c:114: error: ‘PAM_PROMPT_ECHO_OFF’ undeclared (first use in
this function)
osdep.c:115: error: invalid use of undefined type ‘struct pam_response’
osdep.c:115: error: dereferencing pointer to incomplete type
osdep.c:116: error: invalid use of undefined type ‘struct pam_response’
osdep.c:116: error: dereferencing pointer to incomplete type
osdep.c:118: error: ‘PAM_TEXT_INFO’ undeclared (first use in this
function)
osdep.c:119: error: ‘PAM_ERROR_MSG’ undeclared (first use in this
function)
osdep.c:120: error: invalid use of undefined type ‘struct pam_response’
osdep.c:120: error: dereferencing pointer to incomplete type
osdep.c:121: error: invalid use of undefined type ‘struct pam_response’
osdep.c:121: error: dereferencing pointer to incomplete type
osdep.c:125: error: ‘PAM_CONV_ERR’ undeclared (first use in this
function)
osdep.c: At top level:
osdep.c:136: error: expected ‘)’ before ‘*’ token
osdep.c: In function ‘Checkpw’:
osdep.c:153: error: ‘pam_handle_t’ undeclared (first use in this
function)
osdep.c:153: error: ‘hdl’ undeclared (first use in this function)
osdep.c:154: error: storage size of ‘conv’ isn’t known
osdep.c:162: error: ‘PAM_SUCCESS’ undeclared (first use in this
function)
osdep.c:163: error: ‘PAM_RHOST’ undeclared (first use in this function)
osdep.c:166: error: ‘PAM_ESTABLISH_CRED’ undeclared (first use in this
function)
osdep.c:182: error: ‘checkpw_cleanup’ undeclared (first use in this
function)
make[4]: *** [osdep.o] Error 1
make[3]: *** [osx] Error 2
make[2]: *** [OSTYPE] Error 2
make[1]: *** [oxp] Error 2
make: *** [c-client] Error 2
So, investigating this, it appears there is a special case for
pre-10.6 that has the pam includes in a non-standard location (imap/
src/osdep/unix/ckp_pam.c). This is governed by a macro MAC_OSX_KLUDGE.
So if I simply remove this line in the Makefile:
imap/Makefile:
421: EXTRACFLAGS="$(EXTRACFLAGS) -DMAC_OSX_KLUDGE=1" \
It will build an intel only version.
It seems are two issues on 10.6:
1. Universal binary build is broken by the previous undefined symbol
(_fopen$UNIX2003)
2. The MAC_OSX_KLUDGE macro should *not* be set for 10.6
I created a patch that solves #2 (finding the right pam_appl.h file).
I don't have Tiger up and running so I was unable to test that I
didn't break it. But it does compile for me on Snow Leopard. And I
could force the old behavior by touching the old file location and
make picked it up.
Index: imap/Makefile
===================================================================
--- imap/Makefile (revision 1267)
+++ imap/Makefile (working copy)
@@ -417,11 +417,19 @@
oxp: an
$(TOUCH) ip6
+ @$(SH) -c '(test ! -f /usr/include/pam/pam_appl.h ) || make
osxpamkludge'
$(BUILD) BUILDTYPE=osx IP=$(IP6) EXTRAAUTHENTICATORS="$
(EXTRAAUTHENTICATORS) gss" \
PASSWDTYPE=pam \
- EXTRACFLAGS="$(EXTRACFLAGS) -DMAC_OSX_KLUDGE=1" \
SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/
System/Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private
GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMDLFLAGS=-lpam"
+
+osxpamkludge:
+ @echo Building for pre-Mac OSX Snow Leopard
+ $(BUILD) BUILDTYPE=osx IP=$(IP6) EXTRAAUTHENTICATORS="$
(EXTRAAUTHENTICATORS) gss" \
+ EXTRACFLAGS="$(EXTRACFLAGS) -DMAC-OSX_KLUDGE=1"\
+ PASSWDTYPE=pam \
+ SPECIALS="SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib SSLCERTS=/
System/Library/OpenSSL/certs SSLKEYS=/System/Library/OpenSSL/private
GSSINCLUDE=/usr/include GSSLIB=/usr/lib PAMDLFLAGS=-lpam"
+
osx: osxok an
$(TOUCH) ip6
$(BUILD) BUILDTYPE=$@ IP=$(IP6) EXTRAAUTHENTICATORS="$
(EXTRAAUTHENTICATORS) gss" \
@@ -446,7 +454,6 @@
@echo % make clean
@echo % make oxp
-
# Linux shadow password support doesn't build on traditional
systems, but most
# Linux systems are shadow these days.
I tried this patch both on 2.00 tar ball and svn HEAD.
> Though I admit I don't know the real underlying problem.
>
> BTW, your previous binaries should still just work. Is there some
> particular
> reason you're recompiling rather than "just because"?
I did a clean install of Snow Leopard and didn't think to backup
anything I built from source previously.
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2415 bytes
Desc: not available
Url : http://mailman2.u.washington.edu/pipermail/alpine-info/attachments/20091009/607a237f/smime.bin
More information about the Alpine-info
mailing list