Armin Rauch <arauch@yline-esolutions.de> writes:
> I try to compile PostgreSQL after configuring with
> ./configure --with-java --enable-locale --enable-multibyte
> and get the following error message during compile:
> gmake[4]: Leaving directory
> `/home/arauch/postgresql-7.1.1/src/interfaces/libpq'
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations pg_encoding.o
> -L../../../src/interfaces/libpq -lpq -Wl,-rpath,/usr/local/pgsql/lib
> -lz -lcrypt -lresolv -lnsl -ldl -lm -lreadline -lncurses -o pg_encoding
> pg_encoding.o: In function `main':
> pg_encoding.o(.text+0x36): undefined reference to `pg_char_to_encoding'
> pg_encoding.o(.text+0x7e): undefined reference to `pg_encoding_to_char'
> collect2: ld returned 1 exit status
> gmake[3]: *** [pg_encoding] Error 1
Curious. It looks like pg_encoding is being linked with a non-MULTIBYTE
version of libpq (which is the library that ought to supply those two
subroutines to it). But given the -L switch, you should have been
linking to the same libpq that you just built. (You did just build
libpq, right, not reuse one that was built without --enable-multibyte?)
If you did do any midstream reconfiguration, a "make distclean" at top
level, followed by configure and make all is probably the best way to
ensure everything's in sync.
regards, tom lane