[darwinbuild-dev] How can I build ChatServer? (missing mysqlclient library)

Gerben Wierda Gerben.Wierda at rna.nl
Sun Jan 11 07:07:04 PST 2009

I am trying to build ChatServer using 93FF (9G does not have CF yet).  
However, "darwinbuild ChatServer" ends with

> checking for gcc... (cached) gcc
> checking for C compiler default output file name... configure:  
> error: C compiler cannot create executables
> See `config.log' for more details.
> make: *** [glib/config.status] Error 77
> The following build commands failed:
> ChatServer2:
> 	ExternalBuildToolExecution ChatServer2
> (1 failure)

It turns out CoreServices are needed:

> configure:2918: gcc -arch i386 -I/private/var/tmp/ChatServer/ 
> ChatServer-263.1.obj/gettext.build/install/usr/include -arch i386 -I/ 
> private/var/t
> mp/ChatServer/ChatServer-263.1.obj/gettext.build/install/usr/include  
> -arch i386 -L/private/var/tmp/ChatServer/ChatServer-263.1.obj/ 
> gettext.buil
> d/install/usr/lib -L/System/Library/Frameworks/ 
> CoreFoundation.framework -L/usr/lib -framework CoreServices  
> conftest.c  >&5
> ld: framework not found CoreServices

So, I switch to building -nochroot. This also ends in failure:

> # 2009/01/11 14:29:43 ChatServer: [jabber_od_auth]: ...building;  
> arch=ppc
> jabber_od_auth/apple_authenticate.c:39:30: error: Security/ 
> checkpw.h: No such file or directory
> jabber_od_auth/apple_authenticate.c:54:28: error: membershipPriv.h:  
> No such file or directory
> jabber_od_auth/apple_authenticate.c: In function  
> 'od_auth_check_plain_password':
> jabber_od_auth/apple_authenticate.c:118: error: 'CHECKPW_SUCCESS'  
> undeclared (first use in this function)
> jabber_od_auth/apple_authenticate.c:118: error: (Each undeclared  
> identifier is reported only once
> jabber_od_auth/apple_authenticate.c:118: error: for each function it  
> appears in.)
> jabber_od_auth/apple_authorize.c:37:28: error: membershipPriv.h: No  
> such file or directory
> /usr/bin/libtool: NEXT_ROOT environment variable ignored because - 
> syslibroot specified
> /usr/bin/libtool: -dynamic not specified the following flags are  
> invalid: -F/System/Library/Frameworks -F/System/Library/ 
> PrivateFrameworks
> /usr/bin/libtool: file: /usr/lib/libcrypto.dylib is a dynamic  
> library, not added to the static library
> /usr/bin/libtool: file: /usr/lib/libcrypto.dylib is a dynamic  
> library, not added to the static library
> /usr/bin/libtool: file: /usr/lib/libcrypto.dylib is a dynamic  
> library, not added to the static library
> /usr/bin/libtool: file: /usr/lib/libcrypto.dylib is a dynamic  
> library, not added to the static library
> /usr/bin/libtool: can't open file: /DarwinBuild/9F33/BuildRoot/ 
> private/var/tmp/ChatServer/ChatServer-263.1.obj/jabber_od_auth.build/ 
> ppc/apple_authenticate.o (No such file or directory)
> /usr/bin/libtool: can't open file: /DarwinBuild/9F33/BuildRoot/ 
> private/var/tmp/ChatServer/ChatServer-263.1.obj/jabber_od_auth.build/ 
> ppc/apple_authorize.o (No such file or directory)

So, I tried

darwinbuild "libsecurity_checkpw" which fails, but which does give me  
checkpw.h. This I copied to /usr/include/Security (aside: a find it  
mysterious that Security is unseen when doing "ls /usr/include", it  
does not react to filename completion in the shell, but it does exist.  
How is that? Some sort of extended attribute?)

Next turn: membershipPriv.h was missing. So I found with darwinxref  
that it is part of Libinfo. Hence I tried "darwinbuild Libinfo" which  
failed but gave me membershipPriv.h to copy to /usr/local/include

Next turn:

> gcc -D HAVE_MEMMOVE -g -O2 -arch i386 -framework Security -o c2s  
> authreg.o authreg_anon.o authreg_db.o authreg_ldap.o authreg_mysql.o  
> authreg_pam.o authreg_pgsql.o authreg_pipe.o authreg_sqlite.o bind.o  
> c2s.o main.o sm.o -framework Security -framework  
> DirectoryService  ../sx/.libs/libsx.a -L/DarwinBuild/9F33/BuildRoot/ 
> private/var/tmp/ChatServer/ChatServer-263.1.obj/jabber_od_auth.build/ 
> lib -L/usr/lib -L/usr/lib/mysql -L/DarwinBuild/9F33/BuildRoot/ 
> private/var/tmp/ChatServer/ChatServer-263.1.obj/libidn.build/lib ../ 
> scod/.libs/libscod.a -L/usr/local/lib ../mio/.libs/libmio.a ../ 
> util/.libs/libutil.a ../subst/.libs/libsubst.a ../expat/.libs/ 
> libexpat.a -lsqlite3 -lidn -lxmppodauth -lmysqlclient -lssl -lcrypto  
> -lsasl2 /usr/local/lib/libidn.dylib /usr/local/lib/libintl.dylib - 
> lc /usr/lib/libiconv.dylib
> ld: library not found for -lmysqlclient
> collect2: ld returned 1 exit status
> make[3]: *** [c2s] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all] Error 2
> make: *** [jabberd2/jabberd2] Error 2

Now mysqlclient lib is missing. Having looked around I haven't found a  
solution yet. What should I do at this point in time?



More information about the darwinbuild-dev mailing list