You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by François Bérard <fr...@imag.fr> on 2004/12/12 18:22:21 UTC
pb compiling as Apache2 module under OS X 10.3
Hi All,
I've been fighting trying to compile websh-3.5.0 as an apache2.0.52
module under Mac OS X 10.3.5 to no avail. Maybe someone on this list
could help ?
So, here's what I do: after unpacking the websh distribution:
cd src/unix
autoconf
./configure --with-tcl=/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib
--with-tclinclude=/Users/fberard/soft/tcltk8.3.4/include
--with-httpdinclude=/Library/Apache2/include --enable-threads
here, configure starts and then fails, because it can't find
config.sub. So I find them, make a link in the current directory:
ln -s /usr/share/libtool/config.guess /usr/share/libtool/config.sub .
I rerun the above configure command, this time it runs ok and the
Makefile is generated. I then do
make mod_websh.so
the compilation goes fine, except for the last link command:
cc -dynamiclib -o mod_websh3.5.0.dylib args.o cfg.o checksum.o
command.o conv.o crypt.o nca_d.o dispatch.o filecounter.o filelock.o
formdata.o hashutl.o htmlify.o log.o logtocmd.o logtochannel.o
logtofile.o logtosyslog.o logutl.o messages.o messagesCmd.o paramlist.o
querystring.o request.o script.o uricode.o url.o web.o webout.o
weboutint.o webutl.o webutlcmd.o varchannel.o apchannel.o interpool.o
logtoap.o mod_websh.o modwebsh_ap.o request_ap.o response_ap.o
-L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
ld: Undefined symbols:
_ap_get_client_block
_ap_rwrite
_ap_should_client_block
_ap_log_error
_ap_server_root_relative
_ap_log_rerror
_ap_add_cgi_vars
_ap_add_common_vars
_ap_hook_child_init
_ap_hook_handler
_ap_setup_client_block
_apr_palloc
_apr_pool_cleanup_null
_apr_pool_cleanup_register
_ap_document_root
_ap_server_root
_apr_table_elts
_apr_pstrdup
_apr_table_add
_apr_table_set
/usr/bin/libtool: internal link edit command failed
make: *** [mod_websh3.5.0.dylib] Error 1
So, I'm surprised that the Makefile doesn't use the Apache "apxs"
command for the final linking of the module. So I try to do it manually
with:
/Library/Apache2/bin/apxs -c -o mod_websh3.5.0.dylib args.o cfg.o
checksum.o command.o conv.o crypt.o nca_d.o dispatch.o filecounter.o
filelock.o formdata.o hashutl.o htmlify.o log.o logtocmd.o
logtochannel.o logtofile.o logtosyslog.o logutl.o messages.o
messagesCmd.o paramlist.o querystring.o request.o script.o uricode.o
url.o web.o webout.o weboutint.o webutl.o webutlcmd.o varchannel.o
apchannel.o interpool.o logtoap.o mod_websh.o modwebsh_ap.o
request_ap.o response_ap.o
-L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
/Library/Apache2/build/libtool --silent --mode=link gcc -o
mod_websh3.5.0.dylib -rpath /Library/Apache2/modules -module
-avoid-version args.o cfg.o checksum.o command.o conv.o crypt.o
nca_d.o dispatch.o filecounter.o filelock.o formdata.o hashutl.o
htmlify.o log.o logtocmd.o logtochannel.o logtofile.o logtosyslog.o
logutl.o messages.o messagesCmd.o paramlist.o querystring.o request.o
script.o uricode.o url.o web.o webout.o weboutint.o webutl.o
webutlcmd.o varchannel.o apchannel.o interpool.o logtoap.o mod_websh.o
modwebsh_ap.o request_ap.o response_ap.o
-L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
ld: Undefined symbols:
_main
_ap_get_client_block
_ap_rwrite
_ap_should_client_block
_ap_log_error
_ap_server_root_relative
_ap_log_rerror
_ap_add_cgi_vars
_ap_add_common_vars
_ap_hook_child_init
_ap_hook_handler
_ap_setup_client_block
_apr_palloc
_apr_pool_cleanup_null
_apr_pool_cleanup_register
_ap_document_root
_ap_server_root
_apr_table_elts
_apr_pstrdup
_apr_table_add
_apr_table_set
apxs:Error: Command failed with rc=65536
.
...and to this is even worse, because now the link phase looks for a
_main symbol, which is obviously wrong. I can solve for the _apr_*
symbols by adding "-L/Library/Apache2/lib -lapr-0 -laprutil-0" to the
link command, but I still have all the _ap_* undefined symbols, and I
don't know where to find them.
Am I doing something wrong somewhere ? Any help would be appreciated.
Thanks,
François
Re: pb compiling as Apache2 module under OS X 10.3
Posted by Ronnie Brunner <ro...@netcetera.ch>.
François
> Ronnie, I understand you are one of the maintainer of websh, any
> chance to add Mac OS X specific build rules in the distribution ?
If someone has enough knowledge to provide and maintain the necessary
changes / enhancements, sure. However, I doubt that we find
someone. (You didn't even get an answer from anyone who knows OSX, so
chances are pretty small, I guess ...)
Regards
Ronnie
----------------------------------------------------------------------
Ronnie Brunner ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 79 79 fax +41 1 247 70 75
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-user-help@tcl.apache.org
Re: pb compiling as Apache2 module under OS X 10.3
Posted by François Bérard <fr...@imag.fr>.
Ronnie,
Thanks for answering so quickly.
After your answer, I decided to try again. I downloaded and compiled
php5, only to see how they were doing the final link command. And that
worked ! I managed to compile mod_websh and it seems to work (at least
on the simple examples for the web site). For those interested, here's
the link command:
gcc -bundle -bundle_loader /Library/Apache2/bin/httpd -o mod_websh.so
args.o cfg.o checksum.o command.o conv.o crypt.o nca_d.o dispatch.o
filecounter.o filelock.o formdata.o hashutl.o htmlify.o log.o
logtocmd.o logtochannel.o logtofile.o logtosyslog.o logutl.o messages.o
messagesCmd.o paramlist.o querystring.o request.o script.o uricode.o
url.o web.o webout.o weboutint.o webutl.o webutlcmd.o varchannel.o
apchannel.o interpool.o logtoap.o mod_websh.o modwebsh_ap.o
request_ap.o response_ap.o
-L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
-L/Library/Apache2/lib -lapr-0
On Mac OS X, plug-in shared code is called a bundle, and you have to
tell the compiler which executable will load the plug-in with
-bundle_loader. Note also that I had to add the -lapr-0 directive to
find the apr* symbols.
Ronnie, I understand you are one of the maintainer of websh, any
chance to add Mac OS X specific build rules in the distribution ?
François
On 13 déc. 04, at 16:00, Ronnie Brunner wrote:
> Hi François
>
> I have no experience with OSX but your commandline for the linking
> looks OK. The only difference I see is the shared library extension:
>
> ... -dynamiclib -o mod_websh3.5.0.dylib
>
> The Unices I know (Linux/Solaris) use:
>
> ... -shared -o mod_websh3.5.1a1.so
>
> But as I said: no clue about OSX ... And we don't need to link against
> Apache in the other Unices. It's good enough to have the *.o (object)
> files compiled with the proper headers. (But that seems to work in
> your case, otherwise you couldn't even compile mod_websh.o and the
> files depending on Apache ...)
>
> And sorry about the config.sub. A long standing problem with some
> autoconf versions... (I finally added the missing files to the head of
> the CVS, but that doesn't really help your case either.)
>
> Anyone else using OSX?
>
> Regards
> Ronnie
>
>> I've been fighting trying to compile websh-3.5.0 as an apache2.0.52
>> module under Mac OS X 10.3.5 to no avail. Maybe someone on this list
>> could help ?
>>
>> So, here's what I do: after unpacking the websh distribution:
>>
>> cd src/unix
>> autoconf
>> ./configure --with-tcl=/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib
>>
>> here, configure starts and then fails, because it can't find
>> config.sub. So I find them, make a link in the current directory:
>>
>> ln -s /usr/share/libtool/config.guess /usr/share/libtool/config.sub .
>>
>> I rerun the above configure command, this time it runs ok and the
>> Makefile is generated. I then do
>>
>> make mod_websh.so
>>
>> the compilation goes fine, except for the last link command:
>>
>> cc -dynamiclib -o mod_websh3.5.0.dylib args.o cfg.o checksum.o
>> command.o conv.o crypt.o nca_d.o dispatch.o filecounter.o filelock.o
>> formdata.o hashutl.o htmlify.o log.o logtocmd.o logtochannel.o
>> logtofile.o logtosyslog.o logutl.o messages.o messagesCmd.o
>> paramlist.o
>> querystring.o request.o script.o uricode.o url.o web.o webout.o
>> weboutint.o webutl.o webutlcmd.o varchannel.o apchannel.o interpool.o
>> logtoap.o mod_websh.o modwebsh_ap.o request_ap.o response_ap.o
>> -L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
>> ld: Undefined symbols:
>> _ap_get_client_block
>> _ap_rwrite
>> _ap_should_client_block
>> _ap_log_error
>> _ap_server_root_relative
>> _ap_log_rerror
>> _ap_add_cgi_vars
>> _ap_add_common_vars
>> _ap_hook_child_init
>> _ap_hook_handler
>> _ap_setup_client_block
>> _apr_palloc
>> _apr_pool_cleanup_null
>> _apr_pool_cleanup_register
>> _ap_document_root
>> _ap_server_root
>> _apr_table_elts
>> _apr_pstrdup
>> _apr_table_add
>> _apr_table_set
>> /usr/bin/libtool: internal link edit command failed
>> make: *** [mod_websh3.5.0.dylib] Error 1
>>
>> So, I'm surprised that the Makefile doesn't use the Apache "apxs"
>> command for the final linking of the module. So I try to do it
>> manually
>> with:
>>
>> /Library/Apache2/bin/apxs -c -o mod_websh3.5.0.dylib args.o cfg.o
>> checksum.o command.o conv.o crypt.o nca_d.o dispatch.o filecounter.o
>> filelock.o formdata.o hashutl.o htmlify.o log.o logtocmd.o
>> logtochannel.o logtofile.o logtosyslog.o logutl.o messages.o
>> messagesCmd.o paramlist.o querystring.o request.o script.o uricode.o
>> url.o web.o webout.o weboutint.o webutl.o webutlcmd.o varchannel.o
>> apchannel.o interpool.o logtoap.o mod_websh.o modwebsh_ap.o
>> request_ap.o response_ap.o
>> -L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
>> /Library/Apache2/build/libtool --silent --mode=link gcc -o
>> mod_websh3.5.0.dylib -rpath /Library/Apache2/modules -module
>> -avoid-version args.o cfg.o checksum.o command.o conv.o crypt.o
>> nca_d.o dispatch.o filecounter.o filelock.o formdata.o hashutl.o
>> htmlify.o log.o logtocmd.o logtochannel.o logtofile.o logtosyslog.o
>> logutl.o messages.o messagesCmd.o paramlist.o querystring.o request.o
>> script.o uricode.o url.o web.o webout.o weboutint.o webutl.o
>> webutlcmd.o varchannel.o apchannel.o interpool.o logtoap.o mod_websh.o
>> modwebsh_ap.o request_ap.o response_ap.o
>> -L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
>> ld: Undefined symbols:
>> _main
>> _ap_get_client_block
>> _ap_rwrite
>> _ap_should_client_block
>> _ap_log_error
>> _ap_server_root_relative
>> _ap_log_rerror
>> _ap_add_cgi_vars
>> _ap_add_common_vars
>> _ap_hook_child_init
>> _ap_hook_handler
>> _ap_setup_client_block
>> _apr_palloc
>> _apr_pool_cleanup_null
>> _apr_pool_cleanup_register
>> _ap_document_root
>> _ap_server_root
>> _apr_table_elts
>> _apr_pstrdup
>> _apr_table_add
>> _apr_table_set
>> apxs:Error: Command failed with rc=65536
>> .
>> ...and to this is even worse, because now the link phase looks for a
>> _main symbol, which is obviously wrong. I can solve for the _apr_*
>> symbols by adding "-L/Library/Apache2/lib -lapr-0 -laprutil-0" to the
>> link command, but I still have all the _ap_* undefined symbols, and I
>> don't know where to find them.
>>
>> Am I doing something wrong somewhere ? Any help would be
>> appreciated.
>>
>> Thanks,
>>
>> François
> ----------------------------------------------------------------------
> Ronnie Brunner ronnie.brunner@netcetera.ch
> Netcetera AG, 8040 Zuerich phone +41 1 247 79 79 fax +41 1 247 70 75
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
> For additional commands, e-mail: websh-user-help@tcl.apache.org
>
Re: pb compiling as Apache2 module under OS X 10.3
Posted by Ronnie Brunner <ro...@netcetera.ch>.
Hi François
I have no experience with OSX but your commandline for the linking
looks OK. The only difference I see is the shared library extension:
... -dynamiclib -o mod_websh3.5.0.dylib
The Unices I know (Linux/Solaris) use:
... -shared -o mod_websh3.5.1a1.so
But as I said: no clue about OSX ... And we don't need to link against
Apache in the other Unices. It's good enough to have the *.o (object)
files compiled with the proper headers. (But that seems to work in
your case, otherwise you couldn't even compile mod_websh.o and the
files depending on Apache ...)
And sorry about the config.sub. A long standing problem with some
autoconf versions... (I finally added the missing files to the head of
the CVS, but that doesn't really help your case either.)
Anyone else using OSX?
Regards
Ronnie
> I've been fighting trying to compile websh-3.5.0 as an apache2.0.52
> module under Mac OS X 10.3.5 to no avail. Maybe someone on this list
> could help ?
>
> So, here's what I do: after unpacking the websh distribution:
>
> cd src/unix
> autoconf
> ./configure --with-tcl=/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib
>
> here, configure starts and then fails, because it can't find
> config.sub. So I find them, make a link in the current directory:
>
> ln -s /usr/share/libtool/config.guess /usr/share/libtool/config.sub .
>
> I rerun the above configure command, this time it runs ok and the
> Makefile is generated. I then do
>
> make mod_websh.so
>
> the compilation goes fine, except for the last link command:
>
> cc -dynamiclib -o mod_websh3.5.0.dylib args.o cfg.o checksum.o
> command.o conv.o crypt.o nca_d.o dispatch.o filecounter.o filelock.o
> formdata.o hashutl.o htmlify.o log.o logtocmd.o logtochannel.o
> logtofile.o logtosyslog.o logutl.o messages.o messagesCmd.o paramlist.o
> querystring.o request.o script.o uricode.o url.o web.o webout.o
> weboutint.o webutl.o webutlcmd.o varchannel.o apchannel.o interpool.o
> logtoap.o mod_websh.o modwebsh_ap.o request_ap.o response_ap.o
> -L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
> ld: Undefined symbols:
> _ap_get_client_block
> _ap_rwrite
> _ap_should_client_block
> _ap_log_error
> _ap_server_root_relative
> _ap_log_rerror
> _ap_add_cgi_vars
> _ap_add_common_vars
> _ap_hook_child_init
> _ap_hook_handler
> _ap_setup_client_block
> _apr_palloc
> _apr_pool_cleanup_null
> _apr_pool_cleanup_register
> _ap_document_root
> _ap_server_root
> _apr_table_elts
> _apr_pstrdup
> _apr_table_add
> _apr_table_set
> /usr/bin/libtool: internal link edit command failed
> make: *** [mod_websh3.5.0.dylib] Error 1
>
> So, I'm surprised that the Makefile doesn't use the Apache "apxs"
> command for the final linking of the module. So I try to do it manually
> with:
>
> /Library/Apache2/bin/apxs -c -o mod_websh3.5.0.dylib args.o cfg.o
> checksum.o command.o conv.o crypt.o nca_d.o dispatch.o filecounter.o
> filelock.o formdata.o hashutl.o htmlify.o log.o logtocmd.o
> logtochannel.o logtofile.o logtosyslog.o logutl.o messages.o
> messagesCmd.o paramlist.o querystring.o request.o script.o uricode.o
> url.o web.o webout.o weboutint.o webutl.o webutlcmd.o varchannel.o
> apchannel.o interpool.o logtoap.o mod_websh.o modwebsh_ap.o
> request_ap.o response_ap.o
> -L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
> /Library/Apache2/build/libtool --silent --mode=link gcc -o
> mod_websh3.5.0.dylib -rpath /Library/Apache2/modules -module
> -avoid-version args.o cfg.o checksum.o command.o conv.o crypt.o
> nca_d.o dispatch.o filecounter.o filelock.o formdata.o hashutl.o
> htmlify.o log.o logtocmd.o logtochannel.o logtofile.o logtosyslog.o
> logutl.o messages.o messagesCmd.o paramlist.o querystring.o request.o
> script.o uricode.o url.o web.o webout.o weboutint.o webutl.o
> webutlcmd.o varchannel.o apchannel.o interpool.o logtoap.o mod_websh.o
> modwebsh_ap.o request_ap.o response_ap.o
> -L/Users/fberard/soft/tcltk8.3.4/bin/darwin/lib -ltcl8.3
> ld: Undefined symbols:
> _main
> _ap_get_client_block
> _ap_rwrite
> _ap_should_client_block
> _ap_log_error
> _ap_server_root_relative
> _ap_log_rerror
> _ap_add_cgi_vars
> _ap_add_common_vars
> _ap_hook_child_init
> _ap_hook_handler
> _ap_setup_client_block
> _apr_palloc
> _apr_pool_cleanup_null
> _apr_pool_cleanup_register
> _ap_document_root
> _ap_server_root
> _apr_table_elts
> _apr_pstrdup
> _apr_table_add
> _apr_table_set
> apxs:Error: Command failed with rc=65536
> .
> ...and to this is even worse, because now the link phase looks for a
> _main symbol, which is obviously wrong. I can solve for the _apr_*
> symbols by adding "-L/Library/Apache2/lib -lapr-0 -laprutil-0" to the
> link command, but I still have all the _ap_* undefined symbols, and I
> don't know where to find them.
>
> Am I doing something wrong somewhere ? Any help would be appreciated.
>
> Thanks,
>
> François
----------------------------------------------------------------------
Ronnie Brunner ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 79 79 fax +41 1 247 70 75
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-user-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-user-help@tcl.apache.org