You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by David C Ross <dc...@cryogen.com> on 1999/10/19 21:02:13 UTC
os-osf/5169: apxs does not create DSO properly
>Number: 5169
>Category: os-osf
>Synopsis: apxs does not create DSO properly
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: support
>Submitter-Id: apache
>Arrival-Date: Tue Oct 19 12:10:01 PDT 1999
>Last-Modified:
>Originator: dcross@cryogen.com
>Organization:
apache
>Release: 1.3.9
>Environment:
Digital UNIX 4.0D version 878. gcc 2.95.1, gnu make 3.78.1, and default
version of sed (unknown version: 'sed -V' generates an error.)
>Description:
When trying to compile a shared module, apxs generates bad commands. Here
is a sample of the error:
> /usr/local/bin/make APXS=/usr/local/apache/bin/apxs
/usr/local/apache/bin/apxs -o mod_ip_forwarding.so -c mod_ip_forwarding.c
gcc -DOSF1 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -fpic -DSHARED_MODULE -I/usr/local/apache/include -c mod_ip_forwarding.c
ld -shared -expect_unresolved * -s -o mod_ip_forwarding.so mod_ip_forwarding.o
ld:
Object file format error in: Makefile: read_cur_obj_info: bad file magic number(0x440a)
apxs:Break: Command failed with rc=65536
make: *** [mod_ip_forwarding.so] Error 1
>How-To-Repeat:
I built and installed apache_1.3.9 and apache-contrib-1.0.7 from ftp.apache.org
on a DEC UNIX machine. The problem occurs whenever I try to build any of the
modules in apache-contrib.
>Fix:
It looks like apxs is trying to issue the command
"ld -shared -expect_unresolved * -s -o mod_ip_forwarding.so mod_ip_forwarding.o".
The man page for ld warns that any wildcards following -expect_unresolved should
be shell-escaped.
I was able to fix this by fixing the definition of $CFG_LDFLAGS_SHLIB in apxs.
It should be:
my $CFG_LDFLAGS_SHLIB = '-shared -expect_unresolved \* -s'; # substituted via Makefile.tmpl
instead of:
my $CFG_LDFLAGS_SHLIB = '-shared -expect_unresolved * -s'; # substituted via Makefile.tmpl
With this change I was able to build and link everything without troubles.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database automatically because of the potential for mail ]
[loops. If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request from a ]
[developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]