Subject: pkg/13743: ap-php4 is badly linked and this causes php4-sablot to fail at run time.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <manu@netbsd.org>
List: netbsd-bugs
Date: 08/17/2001 11:50:34
>Number:         13743
>Category:       pkg
>Synopsis:       ap-php4 is badly linked and this causes php4-sablot to fail at run time.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 17 11:48:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Emmanuel Dreyfus
>Release:        NetBSD-current/i386
>Organization:
The NetBSD Project
>Environment:
>Description:
the php4-sablot module references symbols in libgcc.a, such as __get_eh_context. Theses symbols are not defined in mod_php4.so, nor in httpd. As a result, php4-sablot builds sucessfully, but there is a dynamic link failure when you actually try to use it.



>How-To-Repeat:
Just try to actually use xslt with PHP4.
>Fix:
The solution seems to include the libgcc.a symbols in mod_php4.so, since this is what is already done for mod_perl.so (mod_perl.so contains __get_eh_context). THis can be done by some dirty hacking, linking all the .a files in the build directory, with a -Wl,-whole-archive -lgcc -Wl,-export-dynamic.

The correct fix is probably to have libtool linking the stuff correctly, but this is beyond my knowledge.

Additionnaly, the Makefile for the php4-sablot package contains a --export-dynamic that is probably a -export-dynamic (a signle minus), but this does not causes the problem.

>Release-Note:
>Audit-Trail:
>Unformatted: