From owner-freebsd-questions@FreeBSD.ORG Sat Jul 1 10:52:31 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76BDD16A403 for ; Sat, 1 Jul 2006 10:52:31 +0000 (UTC) (envelope-from btt@impcp.com) Received: from dev.nethouse.com (dev.nethouse.com [66.89.149.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5030F43D76 for ; Sat, 1 Jul 2006 10:52:30 +0000 (GMT) (envelope-from btt@impcp.com) Received: from [192.168.1.42] (pool-71-101-2-20.tampfl.dsl-w.verizon.net [71.101.2.20]) (authenticated bits=0) by dev.nethouse.com (8.13.6/8.13.6) with ESMTP id k61AsEEc099348 for ; Sat, 1 Jul 2006 06:54:19 -0400 (EDT) (envelope-from btt@impcp.com) Mime-Version: 1.0 (Apple Message framework v750) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: freebsd-questions@freebsd.org From: bill Date: Sat, 1 Jul 2006 06:52:19 -0400 X-Mailer: Apple Mail (2.750) X-Spam-Status: No, score=4.0, required=8.0 tests=BAYES_50=0.001, RCVD_IN_NJABL_DUL=1.946,RCVD_IN_SORBS_DUL=2.046 autolearn=no version=3.1.1 X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on xsd.g-d.com Subject: Linux shared libs on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2006 10:52:31 -0000 Hello everyone, We have a third-party php extension that we need to use for a specific application here. The extension is compiled for Linux, but it appears that its possible to use them in FreeBSD under the Linux emulation. Its not working out so well for us, unfortunately. Here's what I've done, and hopefully someone can point out where we've gone wrong and maybe suggest a fix: 1) the PHP .so has been branded using: brandelf -t Linux 2) linux compatibility is enabled, linprocfs is mounted, etc. 3) the port linux_base-8-8.0_14 is installed and seems to be working properly. I think that should about do it, no? Here's what happens when apachectl start runs: PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/ lib/php/20020429/php4_cybersource.so' - Shared object "libgcc_s.so.1" not found, required by "php4_cybersource.so" in Unknown on line 0 PHP Warning: Unknown(): Unable to load dynamic library '/usr/local/ lib/php/20020429/php4_cybersource.so' - Shared object "libgcc_s.so.1" not found, required by "php4_cybersource.so" in Unknown on line 0 [Thu Jun 29 04:51:29 2006] [notice] Apache/1.3.36 (Unix) PHP/4.4.2 mod_ssl/2.8.27 OpenSSL/0.9.7e-p1 configured -- resuming normal operations [Thu Jun 29 04:51:29 2006] [notice] Accept mutex: flock (Default: flock) And so, libgcc_s.so.1 really exists at /usr/compat/linux/lib/ libgcc_s.so.1. If I go as far as symlink it into the native freebsd ld path, then it finds it and doesn't complain. I end up having to do this with about 4 or 5 other libraries until eventually it stops complaining about missing libraries and starts complaining about missing symbols within the libraries. That's about when I stop trying to accommodate it because that's just getting out of hand, eh? I'm thinking that linux compatibility is not even playing a role in what's going on. So that's where we are now. It would be nice to use this library, but the company also has a java implementation, so we might have to use that in a pinch. But it really would be nice to get it running within php. Thanks for any help. I am not subscribed to this list for followup purposes. Best wishes, William