Thread: error compiling 8.2 in debian sarge

error compiling 8.2 in debian sarge

From
"Jaime Casanova"
Date:
Hi...

i'm using debian sarge and when trying to compile 8.2beta3 got this fail...

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
-Wendif-labels -fno-strict-aliasing -g -Wno-error
-L../../../../src/port  -Wl,-rpath,'/usr/local/pgsql/pgsql/lib'
preproc.o type.o ecpg.o ecpg_keywords.o output.o keywords.o
c_keywords.o ../ecpglib/typename.o descriptor.o variable.o -lpgport
-lz -lreadline -lcrypt -ldl -lm   -o ecpg
/usr/lib/libc_nonshared.a(elf-init.oS)(.text.__i686.get_pc_thunk.bx+0x0):
In function `__i686.get_pc_thunk.bx':
: multiple definition of `__i686.get_pc_thunk.bx'

../ecpglib/typename.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0):/home/postgres/PG_RELEASES/pgsql-8.2beta2/src/interfaces/ecpg/ecpglib/typename.c:18:
first defined here
collect2: ld returned 1 exit status
make[4]: *** [ecpg] Error 1
make[4]: Leaving directory
`/home/postgres/PG_RELEASES/pgsql-8.2beta2/src/interfaces/ecpg/preproc'


a bug or my fault (maybe some lib missing)?

-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."                                      Richard Cook


Re: error compiling 8.2 in debian sarge

From
Chris Mair
Date:
> i'm using debian sarge and when trying to compile 8.2beta3 got this fail...

Just checked: no problems here on a stock 3.1.
What ./configure switches did you use?

Bye, Chris.



Re: error compiling 8.2 in debian sarge

From
Martijn van Oosterhout
Date:
On Sun, Nov 12, 2006 at 02:31:24PM -0500, Jaime Casanova wrote:
> Hi...
>
> i'm using debian sarge and when trying to compile 8.2beta3 got this fail...

<snip>

> /usr/lib/libc_nonshared.a(elf-init.oS)(.text.__i686.get_pc_thunk.bx+0x0):
> In function `__i686.get_pc_thunk.bx':
> : multiple definition of `__i686.get_pc_thunk.bx'
>
../ecpglib/typename.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0):/home/postgres/PG_RELEASES/pgsql-8.2beta2/src/interfaces/ecpg/ecpglib/typename.c:18:
> first defined here
> collect2: ld returned 1 exit status

I had that error once and it was caused by a dodgy version of the C
compiler, or it was installed incorrectly, so that part of the project
was built with one version and part with another. Make sure you've got
the C compiler correctly installed and that everything is being
compiled/linked with the same version.

Have a ncie day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Re: error compiling 8.2 in debian sarge

From
"Jaime Casanova"
Date:
On 11/12/06, Chris Mair <chrisnospam@1006.org> wrote:
> > i'm using debian sarge and when trying to compile 8.2beta3 got this fail...
>
> Just checked: no problems here on a stock 3.1.
> What ./configure switches did you use?
>

./configure --prefix=/usr/local/pgsql/pgsql
--enable-debug--enable-cassert --enable-depend


-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."                                      Richard Cook


Re: error compiling 8.2 in debian sarge

From
"Jaime Casanova"
Date:
On 11/12/06, Martijn van Oosterhout <kleptog@svana.org> wrote:
> On Sun, Nov 12, 2006 at 02:31:24PM -0500, Jaime Casanova wrote:
> > Hi...
> >
> > i'm using debian sarge and when trying to compile 8.2beta3 got this fail...
>
> <snip>
>
> > /usr/lib/libc_nonshared.a(elf-init.oS)(.text.__i686.get_pc_thunk.bx+0x0):
> > In function `__i686.get_pc_thunk.bx':
> > : multiple definition of `__i686.get_pc_thunk.bx'
> >
../ecpglib/typename.o(.gnu.linkonce.t.__i686.get_pc_thunk.bx+0x0):/home/postgres/PG_RELEASES/pgsql-8.2beta2/src/interfaces/ecpg/ecpglib/typename.c:18:
> > first defined here
> > collect2: ld returned 1 exit status
>
> I had that error once and it was caused by a dodgy version of the C
> compiler, or it was installed incorrectly, so that part of the project
> was built with one version and part with another. Make sure you've got
> the C compiler correctly installed and that everything is being
> compiled/linked with the same version.
>

gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)

i haven't upgraded it lately, at least not by myself. any idea how to
know if is that?

-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."                                      Richard Cook


Re: error compiling 8.2 in debian sarge

From
Martijn van Oosterhout
Date:
On Sun, Nov 12, 2006 at 04:06:03PM -0500, Jaime Casanova wrote:
> >> /usr/lib/libc_nonshared.a(elf-init.oS)(.text.__i686.get_pc_thunk.bx+0x0):
> >> In function `__i686.get_pc_thunk.bx':
> >> : multiple definition of `__i686.get_pc_thunk.bx'

> >I had that error once and it was caused by a dodgy version of the C
> >compiler, or it was installed incorrectly, so that part of the project
> >was built with one version and part with another. Make sure you've got
> >the C compiler correctly installed and that everything is being
> >compiled/linked with the same version.
> >
>
> gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
>
> i haven't upgraded it lately, at least not by myself. any idea how to
> know if is that?

How many versions of GCC do you have installed?
Do the versions of 'gcc -V', 'ld -V' all match?
Given the versions numbers, when you run "dpkg -l 'gcc*'" is that
version properly installed?
How about versions of g++?

When I had that problem I uninstalled all old versions of gcc/g++, did
a make clean and recompiled from scratch and that fixed it. I also
upgraded glibc to the same date as gcc, since the error is based (I
think) on a mismatch between the expectations of the compiler and of
the C library.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Re: error compiling 8.2 in debian sarge

From
"Jaime Casanova"
Date:
On 11/12/06, Martijn van Oosterhout <kleptog@svana.org> wrote:
> On Sun, Nov 12, 2006 at 04:06:03PM -0500, Jaime Casanova wrote:
> > >> /usr/lib/libc_nonshared.a(elf-init.oS)(.text.__i686.get_pc_thunk.bx+0x0):
> > >> In function `__i686.get_pc_thunk.bx':
> > >> : multiple definition of `__i686.get_pc_thunk.bx'
>
> > >I had that error once and it was caused by a dodgy version of the C
> > >compiler, or it was installed incorrectly, so that part of the project
> > >was built with one version and part with another. Make sure you've got
> > >the C compiler correctly installed and that everything is being
> > >compiled/linked with the same version.
> > >
> >
> > gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
> >
> > i haven't upgraded it lately, at least not by myself. any idea how to
> > know if is that?
>
> How many versions of GCC do you have installed?
> Do the versions of 'gcc -V', 'ld -V' all match?
> Given the versions numbers, when you run "dpkg -l 'gcc*'" is that
> version properly installed?
> How about versions of g++?
>
> When I had that problem I uninstalled all old versions of gcc/g++, did
> a make clean and recompiled from scratch and that fixed it. I also
> upgraded glibc to the same date as gcc, since the error is based (I
> think) on a mismatch between the expectations of the compiler and of
> the C library.
>

the problem should be there (i tried to compile 8.1 and failed the
same) i will have to fix all this version problem...

thanks

-- 
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."                                      Richard Cook


Re: error compiling 8.2 in debian sarge

From
Chris Mair
Date:
> > > i'm using debian sarge and when trying to compile 8.2beta3 got this fail...
> >
> > Just checked: no problems here on a stock 3.1.
> > What ./configure switches did you use?
> >
> 
> ./configure --prefix=/usr/local/pgsql/pgsql
> --enable-debug--enable-cassert --enable-depend
> 

Again, no problem here.
Some version infos are below.

Bye,
Chris.


postgres@guest05:~$ uname -a
Linux guest05 2.4.27-3-386 #1 Mon May 29 23:50:41 UTC 2006 i686 GNU/Linux

postgres@guest05:~$ gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

postgres@guest05:~$ ld --version
GNU ld version 2.15
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.

postgres@guest05:~$ dpkg -l | grep gcc
ii  gcc            3.3.5-3        The GNU C compiler
ii  gcc-3.3        3.3.5-13       The GNU C compiler
ii  gcc-3.3-base   3.3.5-13       The GNU Compiler Collection (base package)
ii  gcc-3.4-base   3.4.3-13sarge1 The GNU Compiler Collection (base package)
ii  libgcc1        3.4.3-13sarge1 GCC support library


Re: error compiling 8.2 in debian sarge

From
Martijn van Oosterhout
Date:
On Sun, Nov 12, 2006 at 10:31:17PM +0100, Chris Mair wrote:
> Again, no problem here.
> Some version infos are below.

Ok, here's a long shot: the error involves /usr/lib/libc_nonshared.a
which is supplied by libc6-dev. Does the dev package you have match the
actual C library. (bit hard to see how it couldn't, but maybe...).

Another tack: http://gcc.gnu.org/ml/gcc/2004-09/msg01528.html
suggests an out-of-date binutils as the cause.

This suggests a non-clean target build directory.
http://gcc.gnu.org/ml/gcc/2004-09/msg01539.html

And this debian bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=351629

Google around, many people have run into this and not nailed down the
problem. At the very least it appears gcc 3.3 is most susceptable. Are
you using straight Debian Stable or a partially upgraded system? Maybe
a full upgrade would help.

Have a ncie day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.