From owner-freebsd-emulation@FreeBSD.ORG Mon Jan 16 23:03:21 2006 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC0D216A41F for ; Mon, 16 Jan 2006 23:03:21 +0000 (GMT) (envelope-from knezour@weboutsourcing.cz) Received: from out.smtp.cz (ender.smtp.cz [81.95.97.119]) by mx1.FreeBSD.org (Postfix) with ESMTP id A305E43D4C for ; Mon, 16 Jan 2006 23:03:20 +0000 (GMT) (envelope-from knezour@weboutsourcing.cz) Received: from vbmailshield.smtp.cz (jane.smtp.cz [81.95.97.121]) by out.smtp.cz (Postfix) with SMTP id A9A4D4CD9A for ; Tue, 17 Jan 2006 00:03:19 +0100 (CET) Received: from [192.168.35.8] (gw.weboutsourcing.cz [82.208.3.19]) by out.smtp.cz (Postfix) with ESMTP id 358F84CD9A for ; Tue, 17 Jan 2006 00:03:19 +0100 (CET) Message-ID: <43CC25BD.3070100@weboutsourcing.cz> Date: Tue, 17 Jan 2006 00:01:17 +0100 From: Ondra Knezour User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-emulation@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Using Linux shared libraries X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 23:03:21 -0000 Dear all, I have some comercial Linux application, which I'm able to run on FreeBSD using linux emulation. However, there are two linux shared libraries for Firebird database and I'm looking for some way how to use them. Not too successfully yet. Tried to brand them as linux binaries as first step, but this solution wasn't successfull, as expected. Later I found some discussion confirming my expectation, that this mixing of bsd and linux binaries is simply impossible. Then I tried to make plugin wrapper using www/linuxpluginwrapper port with make dummy.c TARGET_PLUGIN=target_plugin_path mv dummy.c debug/dummy_plugin_name.c add plugin to Makefile and debug/Makefile.inc make target_plugin install for both plugin files. I got two requested files installed, created symlink to them form Firebird UDF directory, but I haven't any succes to run Firebird server with them. Server is randomly not responding, dying silently, sometimes with ERR10 - No child process (watched with truss). My questions: Is there some usefull reading about using linux plugins for bsd applications? Is there any how-to for linuxpluginwrapper or usefull discussion thread? I looked at some port which use this plugin, but I don't feel myself fully understanding this tool, especially how to found which additional files should be specified in plugin_nameOBJ variable in Makefile. Which way is sugested for watching calls and responses between executed binary and shared library? I use truss -fae, but there must be something more usefull for this situation. GDB will probably do what I expect, but if there is wide consensus about debugging this scenario, I want to know which one it is. Another way may be possible - decompile linux file and compile it on FreeBSD. I have some asm-like decompiled files for mentioned libraries, but assembler isn't my best friend, so I want to ask, if this way may be successfull and if can, which method and tools can lead to success. Versions used: FreeBSD server 6.0-SECURITY FreeBSD 6.0-SECURITY #0: Mon Dec 19 23:46:33 UTC 2005 root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 Firebird TCP/IP server version FB-V1.5.2.4731 Firebird 1.5 Some additional sources: modified LPW Makefile http://gw.weboutsourcing.cz/fb/Makefile modified LPW debug/Makefile.inc http://gw.weboutsourcing.cz/fb/Makefile.inc dummy.c files generated for libraries http://gw.weboutsourcing.cz/fb/dummy_udfs_00.c http://gw.weboutsourcing.cz/fb/dummy_udfs_01.c some disassembled sources http://gw.weboutsourcing.cz/fb/udfs_00res.zip http://gw.weboutsourcing.cz/fb/udfs_00dis.zip Thanks for your time -- Best Regards Ondra Knezour