- 主题:[求助]cygwin下的apache编译静态php模块的错误
按照安装说明几经辗转,终于到了最后一步——重新编译apache
但是出错信息实在是不明白了
系统环境:winxp sp2+cygwin 20041102(1.5.11-1)
kbs版本:最新的kbsbbs-2.0dev
libtool版本:1.4.3(同时请问一下,安装要求这个版本,但是kbsbbs里面却是1.5.6的)
apache:1.3.34
php: 4.3.11
apache config通过,编译apache出错信息如下:
(不知是libxml的问题,还是bbs_sendmail.c的问题,php重新编译时都通过了)
gcc -DCYGWIN -DNO_DL_NEEDED `./apaci` \
-o httpd buildmark.o modules.o modules/standard/libstandard.a modules/ph
/libphp4.a main/libmain.a ./os/cygwin/libos.a ap/libap.a -Wl,-rpath,/home/h
lo/kbsbbs-2.0dev/libsystem -Wl,-rpath,/home/hallo/kbsbbs-2.0dev/libBBS -Wl,-rp
h,/home/hallo/kbsbbs-2.0dev/bbs2www/lib -L/home/hallo/kbsbbs-2.0dev/libsystem
L/home/hallo/kbsbbs-2.0dev/libBBS -L/home/hallo/kbsbbs-2.0dev/bbs2www/lib -Lmo
les/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -L/home/hallo/kbs
s-2.0dev/libsystem -L/home/hallo/kbsbbs-2.0dev/libBBS -L/home/hallo/kbsbbs-2.0
v/bbs2www/lib -lcrypt -lcrypt -lbbslib -lBBS -lsystem -lz -lz -lm -lxml2 -l
-liconv -lm -lcrypt -lcrypt -lcrypt -lgdbm -lexpat
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x1213):bbs_se
mail.c: undefined reference to `_smtp_recipient_status'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x136b):bbs_se
mail.c: undefined reference to `_smtp_create_session'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x137f):bbs_se
mail.c: undefined reference to `_smtp_add_message'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x13dc):bbs_se
mail.c: undefined reference to `_smtp_set_server'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x13f3):bbs_se
mail.c: undefined reference to `_smtp_set_hostname'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x1566):bbs_se
mail.c: undefined reference to `_smtp_set_reverse_path'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x1584):bbs_se
mail.c: undefined reference to `_smtp_set_header'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x161e):bbs_se
mail.c: undefined reference to `_smtp_set_header'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x1652):bbs_se
mail.c: undefined reference to `_smtp_set_header_option'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x169e):bbs_se
mail.c: undefined reference to `_smtp_set_messagecb'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x16b3):bbs_se
mail.c: undefined reference to `_smtp_add_recipient'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x16da):bbs_se
mail.c: undefined reference to `_smtp_dsn_set_notify'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x16e8):bbs_se
mail.c: undefined reference to `_smtp_start_session'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x16f6):bbs_se
mail.c: undefined reference to `_smtp_message_transfer_status'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x171a):bbs_se
mail.c: undefined reference to `_smtp_enumerate_recipients'
/home/hallo/kbsbbs-2.0dev/libBBS/libBBS.a(bbs_sendmail.o)(.text+0x1728):bbs_se
mail.c: undefined reference to `_smtp_destroy_session'
Info: resolving _xmlFree by linking to __imp__xmlFree (auto-import)
Info: resolving _xmlGenericErrorContext by linking to __imp__xmlGenericErrorCo
ext (auto-import)
Info: resolving _xmlParserVersion by linking to __imp__xmlParserVersion (auto-
port)
Info: resolving _xmlSubstituteEntitiesDefaultValue by linking to __imp__xmlSub
ituteEntitiesDefaultValue (auto-import)
Info: resolving _xmlIndentTreeOutput by linking to __imp__xmlIndentTreeOutput
uto-import)
Info: resolving _optarg by linking to __imp__optarg (auto-import)
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/home/hallo/apache_1.3.34/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/home/hallo/apache_1.3.34'
make: *** [build] Error 2
--
修改:hallos FROM 202.115.52.*
FROM 202.115.52.*
我是这样进行到最后编译的
xp下新建bbs和apache两个用户,cygwin下用id取两个用户的uid和gid
devel.h和httpd.conf要用到
按帮助编译php和apache,kbs两项测试ok
重新编译php,除了拷贝3个文件外
还需要更改config.m4中的@WWWSRCDIR@为bbs2www所在路径
这样configure的时候,路径的问题就解决了
接下来,修改库的连接文件
把kbs libsystem,libBBS,bbs2www/lib,bbs2www/phplib
编译好后的.lib目录下的.a文件复杂到上级目录,更改对应.la文件中installed=no为yes
或者直接修改\apache_1.3.34\src\modules\php4\libphp4.module中kbs3个相关的lib路径
为/usr/local/bbs/lib
这样编译ld的时候就不会出错
shm的错误我没有留意,这个好像不影响编译,不过对程序有没有影响就不清楚了
才接触cygwin,只在freebsd下面编译过kbs
cygwin下编译这个的确很复杂,我都想尝试一下apache2的动态模块
【 在 flyriver (江~~忙碌生活) 的大作中提到: 】
: 精神可嘉,赞一下。现在在看如何解决,初步解决方案是完全放弃 libesmtp,
: 也就是在 configure kbs 时,加上 --without-libesmtp,这样应该就不会对
: libesmtp 库形成依赖。
: ...................
--
FROM 202.115.52.*
总算编译成功了,phpinfo也显示smth_bbs enable了
现在telnet都ok了,web还有点问题,自己再研究一下好了
非常感谢,总算看见署光了^_^
【 在 flyriver (江~~忙碌生活) 的大作中提到: 】
: 也可以编辑一下 apache 的 src/modules/php4/libphp4.module 文件,
: 在 -lsystem 之后加上 -L/usr/local/lib -lesmtp,然后重新
: configure 和 make apache
: ...................
--
FROM 202.115.52.*
我这里是“无法显示网页”
不过我的apache make install的时候有问题,我是手动把执行文件拷贝过去的
开始第一次编译apache也是这样,我准备下次换个cygwin重新试一下
【 在 sb (1和2) 的大作中提到: 】
: 我也刚根据你们的方法编译通过了
: 不过web登陆后显示:
: Method Not Allowed
: ...................
--
FROM 202.115.52.*