[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Is this a compiler error?



This program worked OK on libc5 and for a while on libc6.  However, it
does not now.  It segfaults every time.  Unfortunately, this is happening
before any of my code gets run and I can't work out what is happening.

Here is the link command:
+++++++++++++++++++++++
g++ addrform.o db.o dbwindow.o funcform.o main.o listpair.o indform.o 
moneyform.o orgform.o subform.o dstring.o combo.o listitem.o listbox.o 
printdlg.o printdlgData.o  mdbwindow.o mlistpair.o mcombo.o mlistbox.o 
maddrform.o mdbform.o mfuncform.o mindform.o mmoneyform.o morgform.o 
msubform.o mprintdlg.o mprintdlgData.o  -o prdb -L/usr/X11R6/lib 
-L/usr/lib/postgresql/lib -shared -lqt -lpq++ -lpq   -L/usr/X11R6/lib -lX11   
-lpub -lcrypt -lc
+++++++++++++++++++++++

This is the gdb output (I don't understand where the missing pathnames
are coming from):
+++++++++++++++++++++++
This GDB was configured as "i586-pc-linux-gnu"...
Warning: /usr/src/pgsql/src/interfaces/libpq: No such file or directory.
Warning: /usr/src/pgsql/src/interfaces/libpq++: No such file or directory.
Warning: /usr/src/pgsql/src/include: No such file or directory.
Warning: /usr/src/qt1-1.2/include: No such file or directory.
Warning: /usr/src/qt1-1.2/src/dialogs: No such file or directory.
Warning: /usr/src/qt1-1.2/src/kernel: No such file or directory.
Warning: /usr/src/qt1-1.2/src/tools: No such file or directory.
Warning: /usr/src/qt1-1.2/src/widgets: No such file or directory.
(gdb) r
Starting program: /usr1/home/olly/cprogs/priory/prdb 

Program received signal SIGSEGV, Segmentation fault.
0x4 in ?? ()
(gdb) bt
#0  0x4 in ?? ()
#1  0x1 in ?? ()
+++++++++++++++++++++++

and this is the shared library information:
+++++++++++++++++++++++
linda:~/cprogs/priory$ ldd prdb 
prdb: error in loading shared libraries
prdb: cannot open shared object file: No such file or directory
+++++++++++++++++++++++
(why did that not work, while the next command did? it is the same executable)
+++++++++++++++++++++++
linda:~/cprogs/priory$ ldd ./prdb
        libqt.so.1 => /usr/X11R6/lib/libqt.so.1 (0x4006a000)
        libpq++.so.1 => /usr/lib/libpq++.so.1 (0x401de000)
        libpq.so.1 => /usr/lib/libpq.so.1 (0x401e8000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401f3000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40293000)
        libstdc++.so.2.8 => /usr/lib/libstdc++.so.2.8 (0x402c0000)
        libm.so.6 => /lib/libm.so.6 (0x40305000)
        libc.so.6 => /lib/libc.so.6 (0x4031e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x403c2000)
        libdl.so.2 => /lib/libdl.so.2 (0x403c8000)
        libreadline.so.2 => /lib/libreadline.so.2 (0x403cb000)
        libhistory.so.2 => /usr/lib/libhistory.so.2 (0x403f6000)
        libncurses.so.3.4 => /lib/libncurses.so.3.4 (0x403fd000)
+++++++++++++++++++++++

Is this a problem caused by mixing libraries compiled with gcc and g++?

How can I find out which library is causing the problem?

Versions:
g++             2.90.28-0.1    The GNU (egcs) C++ compiler.
gcc             2.7.2.3-4.2    The GNU C compiler.
libc6           2.0.7pre3-1    The GNU C library version 2 (run-time files)
libc6-dev       2.0.7pre3-1    The GNU C library version 2 (development fil
libg++27        2.7.2.1-14.2   The GNU C++ libraries (ELF version).
libg++272       2.7.2.8-0.1    The GNU C++ libraries (libc6 version).
[libg++272-dev   2.7.2.8-0.1    The GNU C++ libraries (libc6 version).] config 
files only
libpgsql        6.3.2-9        Shared library for PostgreSQL
libreadlineg2   2.1-9          GNU readline and history libraries, run-time
libstdc++2.8    2.90.28-0.1    The GNU stdc++ library (egcs version)
libstdc++2.8-de 2.90.28-0.1    The GNU stdc++ library (development files)
ncurses3.4      1.9.9g-8.3     Video terminal manipulation - shared librari
postgresql-dev  6.3.2-9        Header files for libpq (postgresql library)
qt1g            1.33-5         Shared Library used by applications linked w
qt1g-dev        1.33-5         Environment for QT GUI development.
xlib6g          3.3.2.1-1      shared libraries required by X clients

/usr/X11R6/lib/libqt.so.1.33: ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/usr/lib/libpq.so.1.1:        ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/usr/X11R6/lib/libX11.so.6.1: ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/lib/libcrypt-2.0.7.so:       ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/usr/lib/libstdc++.so.2.8.0:  ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/lib/libm-2.0.7.so:           ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/lib/libc-2.0.7.so:           ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/lib/ld-2.0.7.so:             ELF 32-bit LSB shared object, Intel 80386, 
version 1, not stripped
/lib/libnsl-2.0.7.so:         ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/lib/libdl-2.0.7.so:          ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/lib/libreadline.so.2.1:      ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped
/usr/lib/libhistory.so.2.1:   ELF 32-bit LSB shared object, Intel 80386, 
version 1, stripped

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "But where shall wisdom be found? And where is the
      place of understanding? It cannot be gotten for gold,
      neither shall silver be weighed for the price thereof.
      Whence then cometh wisdom? and where is the place of
      understanding? ...Behold the fear of the Lord, that is
      wisdom; and to depart from evil is understanding."    
                                         Job 12,15,20,28



--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: