Thread: postgresql-7.3.4 - undefined reference to `libintl_gettext'

postgresql-7.3.4 - undefined reference to `libintl_gettext'

From
blue
Date:
Being aware that this might be a lame question, I shall ask it
nevertheless... I just hope it's the correct list...

I've been trying to compile postgresql 7.3.4 on my machine (linux 2.2.25
(debian/potato)) and after satysfying postgresql's configure script by
compiling gettext-0.12.1, readline-4.3 and zlib-1.1.3 I'm now getting a
problem while doing 'make' ...

I'm launching configure with:

./configure --enable-recode --enable-nls --with-perl
--with-libraries=/usr/local/lib --with-includes=/usr/local/include

(i have gettext, readline and zlib installed in /usr/local/)

and it finishes without a flaw...

but then when make-ing i get this:

[snip]
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -L/usr/local/lib
-Wl,-rpath,/usr/local/pgsql/lib -export-dynamic access/SUBSYS.o
bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o
executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o
optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o
rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o -lz
-lreadline -ltermcap -lcrypt -lresolv -lnsl -ldl -lm  -o postgres
bootstrap/SUBSYS.o: In function `usage':
bootstrap/SUBSYS.o(.text+0x1b06): undefined reference to `libintl_gettext'
bootstrap/SUBSYS.o: In function `BootstrapMain':
bootstrap/SUBSYS.o(.text+0x1cd9): undefined reference to `libintl_gettext'
main/SUBSYS.o: In function `main':
main/SUBSYS.o(.text+0xcc): undefined reference to `libintl_bindtextdomain'
main/SUBSYS.o(.text+0xd9): undefined reference to `libintl_textdomain'
main/SUBSYS.o(.text+0x16f): undefined reference to `libintl_gettext'
main/SUBSYS.o(.text+0x1b1): undefined reference to `libintl_gettext'
main/SUBSYS.o(.text+0x26d): undefined reference to `libintl_gettext'
postmaster/SUBSYS.o: In function `checkDataDir':
postmaster/SUBSYS.o(.text+0x25): undefined reference to `libintl_gettext'
postmaster/SUBSYS.o(.text+0x101): undefined reference to `libintl_gettext'
postmaster/SUBSYS.o(.text+0x4e8): more undefined references to
`libintl_gettext' follow
collect2: ld returned 1 exit status
make[2]: *** [postgres] Error 1
make[2]: Leaving directory `/usr/local/src/postgresql-7.3.4/src/backend'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/postgresql-7.3.4/src'
make: *** [all] Error 2


I'm not sure what to do about it... The problem may lay in not being able
to find my custom-built libraries... but I thought that should be fixed by
adding those --with-libraries and --with-includes...

Another thing that I suspect is that even though I did

ldconfig -v -n /usr/local/bin

(and it looked like it _did_ find my new libraries)

it still does not see them when i do 'ldconfig -p' ... i.e.:

ldconfig -p | grep /usr/local

produces nothing :(

Anyway - I'm not sure that this should cause a problem at compile
stage..

I'd appreciate some help ...

Thanks in advance,
   blueshade.


--
'There really is a big sign hanging from it readin "we ran out of time, so
had to stop making the game, instead made boring hack&slash levels from
halfway to the end."' - about 'Lionheart' - Tomi Heteaho on c.s.i.p.g.rpg


Re: postgresql-7.3.4 - undefined reference to `libintl_gettext'

From
Tom Lane
Date:
blue <blue@DELETETHISwave460.net> writes:
> main/SUBSYS.o(.text+0xcc): undefined reference to `libintl_bindtextdomain'
> main/SUBSYS.o(.text+0xd9): undefined reference to `libintl_textdomain'
> main/SUBSYS.o(.text+0x16f): undefined reference to `libintl_gettext'
> main/SUBSYS.o(.text+0x1b1): undefined reference to `libintl_gettext'
> main/SUBSYS.o(.text+0x26d): undefined reference to `libintl_gettext'
> [etc]

Hm, that's interesting, because in the sources those calls are just
'bindtextdomain' etc.  It looks like you are including files that define
bindtextdomain et al as macros for libintl_bindtextdomain et al.  The
copy of <libintl.h> I have here doesn't do that, but there may be other
versions that do.  I'd say that you have header files that don't match
up with your library that defines gettext --- or at least, configure
managed to find an implementation of gettext that didn't match the
headers.  Check your inclusion and search paths.

Peter: is our configure stuff actually able to cope with this?  It looks
to me like configure will look for a library providing "gettext", when
it would need to look for "libintl_gettext".  Or should we just state
that such-and-such an implementation is too broken to use?

            regards, tom lane

Re: postgresql-7.3.4 - undefined reference to `libintl_gettext'

From
Peter Eisentraut
Date:
Tom Lane writes:

> Peter: is our configure stuff actually able to cope with this?  It looks
> to me like configure will look for a library providing "gettext", when
> it would need to look for "libintl_gettext".  Or should we just state
> that such-and-such an implementation is too broken to use?

Well, if it looks for 'gettext' and the library actually contains
'libintl_gettext', then it wouldn't get picked up.  We should wait for
details about the users installation.

--
Peter Eisentraut   peter_e@gmx.net