From owner-freebsd-questions@FreeBSD.ORG Mon Apr 12 02:55:13 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 A794516A4CF for ; Mon, 12 Apr 2004 02:55:13 -0700 (PDT) Received: from iteso.mx (iteso.mx [148.201.1.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 233B843D2F for ; Mon, 12 Apr 2004 02:55:13 -0700 (PDT) (envelope-from eric@iteso.mx) Received: from iteso.mx (localhost [127.0.0.1]) by iteso.mx (8.12.3/8.12.3/Debian-6.6) with ESMTP id i3C9o3gx020552 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 12 Apr 2004 04:55:07 -0500 Received: (from www-data@localhost) by iteso.mx (8.12.3/8.12.3/Debian-6.6) id i3C6SliD025790 for freebsd-questions@freebsd.org; Mon, 12 Apr 2004 01:28:47 -0500 From: Eric De la Cruz Lugo X-Authentication-Warning: iteso.mx: www-data set sender to eric@iteso.mx using -f Received: from dup-148-233-218-129.prodigy.net.mx (dup-148-233-218-129.prodigy.net.mx [148.233.218.129]) by iteso.mx (IMP) with HTTP for ; Mon, 12 Apr 2004 01:28:47 -0500 Message-ID: <1081751327.407a371fa817f@iteso.mx> Date: Mon, 12 Apr 2004 01:28:47 -0500 To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 148.233.218.129 Subject: Porting software 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 09:55:13 -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. ---