[英]apxs on MacOSX having trouble with architecture
I'm trying to set up a development environment on my aging Macbook Pro that matches my Linux EC2 production environment. 我正在尝试在老化的Macbook Pro上设置与Linux EC2生产环境匹配的开发环境。 I'm on the home stretch now, need only to get the mod_auth_mysql plugin for apache working.
我现在在家中,只需要获取用于Apache工作的mod_auth_mysql插件即可。 After a few hours of googling and patching and scratching my head, I think I'm almost there, but I've hit something that nothing I've found online has been able to solve.
经过数小时的谷歌搜索,修补和划伤我的头后,我想我已经快到了,但是我遇到了一些我在网上找不到的解决方法。
nathan@ichigo:/usr/local/mod_auth_mysql-2.9.0$ sudo apxs -c -L/usr/local/mysql/lib -I/usr/local/mysql/include/ -lmysqlclient -lm -lz mod_auth_mysql.c
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -I/usr/local/include -I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apr-1 -I/usr/local/mysql/include/ -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
/usr/share/apr-1/build-1/libtool --silent --mode=link gcc -o mod_auth_mysql.la -L/usr/local/mysql/lib -lmysqlclient -lm -lz -rpath /usr/libexec/apache2 -module -avoid-version mod_auth_mysql.lo
ld: warning: in /usr/local/mysql/lib/libmysqlclient.dylib, file is not of required architecture
ld: warning: in /usr/local/mysql/lib/libz.a, file is not of required architecture
warning: no debug symbols in executable (-arch x86_64)
I think this is complaining because it's trying to build for 64-bit, but I'm on a 32-bit platform? 我认为这是在抱怨,因为它正在尝试为64位构建,但是我在32位平台上? I'm not entirely sure.
我不太确定。 I've tried forcing a 32-bit build with env ARCHFLAGS and -D arch on apxs, to no avail.
我尝试过在apxs上使用env ARCHFLAGS和-D arch强制进行32位构建,但无济于事。
FWIW, I also tried mod_auth_mysql-3.0.0, and hit more or less the same result. FWIW,我也尝试了mod_auth_mysql-3.0.0,并获得了几乎相同的结果。
Alternatively, is there a more modern way to auth against mysql in Apache? 另外,是否有更现代的方法可以在Apache中针对mysql进行身份验证? I didn't find anything else, but this module hasn't gotten any love in a good 5 years, and I had to apply some patches I found scattered about the 'net to even get this far.
我什么也没找到,但是这个模块已经有5年没有得到任何热爱了,我不得不应用一些我发现的散布在“网络”上的补丁才能达到目标。
首先,使用file /usr/local/mysql/lib/libmysqlclient.dylib
等检查您的库支持的架构。一旦知道,我认为您可以通过添加-Wc,"-arch i386" -Wl,"-arch i386"
等标志来控制apxs的构建-Wc,"-arch i386" -Wl,"-arch i386"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.