From owner-freebsd-questions@FreeBSD.ORG Sun Apr 11 23:35:01 2004 Return-Path: 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 C294416A4CE for ; Sun, 11 Apr 2004 23:35:01 -0700 (PDT) Received: from web61110.mail.yahoo.com (web61110.mail.yahoo.com [216.155.196.112]) by mx1.FreeBSD.org (Postfix) with SMTP id 3E04643D3F for ; Sun, 11 Apr 2004 23:35:01 -0700 (PDT) (envelope-from eric_delacruz@yahoo.com) Message-ID: <20040412063500.69834.qmail@web61110.mail.yahoo.com> Received: from [148.233.218.129] by web61110.mail.yahoo.com via HTTP; Sun, 11 Apr 2004 23:35:00 PDT Date: Sun, 11 Apr 2004 23:35:00 -0700 (PDT) From: Eric De La Cruz Lugo To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Porting software from Linux to FreeBSD 5.2.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2004 06:35:01 -0000 Hi All: Am trying to modify a code in order to run it in FreeBSD, this code was intendend for Linux only, after several days modifying code a mannaged to compile it "successfully" and ended with a binary, called "post" this program is a client side of a systema called BhPos, the server side is working ok, but this client is dying every time with a segmentation fault. debugging the core file from the post excecution I found the following: terra# gdb /usr/bin/post GNU gdb 5.2.1 (FreeBSD) Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... (gdb) core-file post.core Core was generated by `post'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/local/lib/libgtkmm-1.2.so.3...done. Loaded symbols for /usr/local/lib/libgtkmm-1.2.so.3 Reading symbols from /usr/local/lib/libgdkmm-1.2.so.2...done. Loaded symbols for /usr/local/lib/libgdkmm-1.2.so.2 Reading symbols from /usr/X11R6/lib/libgtk12.so.2...done. Loaded symbols for /usr/X11R6/lib/libgtk12.so.2 Reading symbols from /usr/X11R6/lib/libgdk12.so.2...done. Loaded symbols for /usr/X11R6/lib/libgdk12.so.2 Reading symbols from /usr/local/lib/libgmodule12.so.3...done. Loaded symbols for /usr/local/lib/libgmodule12.so.3 Reading symbols from /usr/local/lib/libglib12.so.3...done. Loaded symbols for /usr/local/lib/libglib12.so.3 Reading symbols from /usr/local/lib/libintl.so.5...done. Loaded symbols for /usr/local/lib/libintl.so.5 Reading symbols from /usr/X11R6/lib/libXi.so.6...done. Loaded symbols for /usr/X11R6/lib/libXi.so.6 Reading symbols from /usr/X11R6/lib/libXext.so.6...done. Loaded symbols for /usr/X11R6/lib/libXext.so.6 Reading symbols from /usr/X11R6/lib/libX11.so.6...done. Loaded symbols for /usr/X11R6/lib/libX11.so.6 Reading symbols from /usr/local/lib/libsigc.so.1...done. Loaded symbols for /usr/local/lib/libsigc.so.1 Reading symbols from /usr/local/lib/libxml2.so.5...done. Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /lib/libz.so.2...done. Loaded symbols for /lib/libz.so.2 Reading symbols from /usr/local/lib/libiconv.so.3...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /usr/lib/bhpos/libbhtrans.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhtrans.so.1 Reading symbols from /usr/lib/bhpos/libbhcash.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhcash.so.1 Reading symbols from /usr/lib/bhpos/libbhcfg.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhcfg.so.1 Reading symbols from /usr/lib/bhpos/libbhwgt.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhwgt.so.1 Reading symbols from /usr/lib/bhpos/libbhkmap.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhkmap.so.1 Reading symbols from /usr/lib/bhpos/libbhgrp.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhgrp.so.1 Reading symbols from /usr/lib/bhpos/libbhlocale.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhlocale.so.1 ---Type to continue, or q to quit--- Reading symbols from /usr/lib/bhpos/libbhdev.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhdev.so.1 Reading symbols from /usr/lib/bhpos/libbhbc.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhbc.so.1 Reading symbols from /usr/lib/bhpos/libbhkeyb.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhkeyb.so.1 Reading symbols from /usr/lib/bhpos/libbhkeyl.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhkeyl.so.1 Reading symbols from /usr/lib/bhpos/libbhdisp.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhdisp.so.1 Reading symbols from /usr/lib/bhpos/libbhms.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhms.so.1 Reading symbols from /usr/lib/bhpos/libbhcashd.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhcashd.so.1 Reading symbols from /usr/lib/bhpos/libbhcustd.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhcustd.so.1 Reading symbols from /usr/lib/bhpos/libbhprinter.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhprinter.so.1 Reading symbols from /usr/lib/bhpos/libbhmicr.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhmicr.so.1 Reading symbols from /usr/lib/bhpos/libbhsc.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhsc.so.1 Reading symbols from /usr/lib/bhpos/libbhdt.so.1...done. Loaded symbols for /usr/lib/bhpos/libbhdt.so.1 Reading symbols from /usr/lib/libstdc++.so.4...done. Loaded symbols for /usr/lib/libstdc++.so.4 Reading symbols from /lib/libm.so.2...done. Loaded symbols for /lib/libm.so.2 Reading symbols from /usr/lib/libc_r.so.5...done. Loaded symbols for /usr/lib/libc_r.so.5 Reading symbols from /lib/libc.so.5...done. Loaded symbols for /lib/libc.so.5 Reading symbols from /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2...done. Loaded symbols for /usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x288c3c75 in strdup () from /lib/libc.so.5 (gdb) hope this helps a bit to understand what is happening with the post program. still working on my side. Eric. I recieved the following answer from the creator of this software: Re: Still can't get client to connect to server Sun, 11 April 2004 11:19 You probably know that libc is the library that includes all the standard C commands (such as printf, read, open, etc.and so on) as well as system calls. Up until 1997, the only library available was the GNU libc v1, which since the move to ELF binary format was given major number 5 (/lib/libc.so.5). In 1997, the Free Software Foundation developed GNU libc v2, with the intention of being cleaner, more portable, and more standard (POSIX compliant). Under Linux, this version got major number 6, hence it's called libc6. These two libraries are incompatible - if a program is compiled with one libc's headers and stubs, it can't be used with the other. any one knows how i can use the libc6 in the linux compat directory? i have checked on my sistem and in fact i have it! /usr/compat/linux/lib/libc.so.6 thanks in advance for your help on this. __________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html