Thread: Anyone has nls activated on Mac OS X?
Hi all, I'm trying to compile PostgreSQL from scratch on Mac OS X 10.3.2 with national language support activated (so that I can work better on the French translation of PostgreSQL). Marc Liyanage's package doesn't have nls. I installed gettext using Fink and then gave it a go. The configure part went ok, but make complained that it couldn't find msgfmt. I downloaded Peter Eisentraut's package of utilities, but I can't get it to make. It complains as follows: Macbeth:~/Desktop/bsd-gettext-20011206 root# make make all-recursive Making all in sup /bin/sh ../libtool --mode=link gcc -g -O2 -o libsup.la rm -fr .libs/libsup.la .libs/libsup.* .libs/libsup.* ar cru .libs/libsup.a ar: no archive members specified usage: ar -d [-TLsv] archive file ... ar -m [-TLsv] archive file ... ar -m [-abiTLsv] position archive file ... ar -p [-TLsv] archive [file ...] ar -q [-cTLsv] archive file ... ar -r [-cuTLsv] archive file ... ar -r [-abciuTLsv] position archive file ... ar -t [-TLsv] archive [file ...] ar -x [-ouTLsv] archive [file ...] make[2]: *** [libsup.la] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive-am] Error 2 Thanks for any help. --------------- Francois Home page: http://www.monpetitcoin.com/ "Would Descartes have programmed in Pascal?" - Umberto Eco
Francois Suter wrote: > I installed gettext using Fink and then gave it a go. The configure > part went ok, but make complained that it couldn't find msgfmt. Either the package is split up into a run-time and a devel package, or it's just plain broken, because msgfmt certainly belongs into any "gettext" package. I would ask the packagers. > downloaded Peter Eisentraut's package of utilities, but I can't get > it to make. It complains as follows: I will investigate that.
>> I installed gettext using Fink and then gave it a go. The configure >> part went ok, but make complained that it couldn't find msgfmt. > > Either the package is split up into a run-time and a devel package, or > it's just plain broken, because msgfmt certainly belongs into any > "gettext" package. I would ask the packagers. Ah, that was it. I installed only part of the thing. Also forgot to include the Fink bin directory in my path... I still get an error though. Here is how I am trying to compile: ./configure --with-java --with-includes=/sw/include/ --with-libraries=/sw/lib --enable-nls --bindir=/usr/local/bin --mandir=/usr/local/share/man/ And here is the error I get some way down the making process: ranlib libecpg.a gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -bundle execute.o typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o -L../../../../src/port -L/sw/lib -L../pgtypeslib -lpgtypes -L../../../../src/interfaces/libpq -lpq -lm -o libecpg.so.4.1 ld: Undefined symbols: _bindtextdomain _dgettext gnumake[4]: *** [libecpg.so.4.1] Error 1 gnumake[3]: *** [all] Error 2 gnumake[2]: *** [all] Error 2 gnumake[1]: *** [all] Error 2 gnumake: *** [all] Error 2 It seems to be connected to gettext. Any ideas? Thanks in advance. --------------- Francois Home page: http://www.monpetitcoin.com/ "Would Descartes have programmed in Pascal?" - Umberto Eco
Francois Suter <dba@paragraf.ch> writes: > gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes > -Wmissing-declarations -bundle execute.o typename.o descriptor.o > data.o error.o prepare.o memory.o connect.o misc.o > -L../../../../src/port -L/sw/lib -L../pgtypeslib -lpgtypes > -L../../../../src/interfaces/libpq -lpq -lm -o libecpg.so.4.1 > ld: Undefined symbols: > _bindtextdomain > _dgettext > gnumake[4]: *** [libecpg.so.4.1] Error 1 > It seems to be connected to gettext. Any ideas? Mmm. The darwin linker is strict about requiring the link command for a shared library to include all the other shlibs it references. During the 7.4 beta cycle I made sure everything built in the standard configuration, but I did *not* test with --enable-nls, so naturally it's broken. The link for libecpg, at least, needs to refer to the gettext library when building with nls. Could you run through the make with -k and see what else might be missing the reference? regards, tom lane
On Feb 4, 2004, at 16:52, Tom Lane wrote: > Mmm. The darwin linker is strict about requiring the link command for > a > shared library to include all the other shlibs it references. During > the 7.4 beta cycle I made sure everything built in the standard > configuration, but I did *not* test with --enable-nls, so naturally > it's > broken. The link for libecpg, at least, needs to refer to the gettext > library when building with nls. Could you run through the make with -k > and see what else might be missing the reference? I ran the make again with -k, but it didn't seem to go any further. Here is the end of the output, where the error occurs: make -C ecpglib all gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -bundle execute.o typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o -L../../../../src/port -L/sw/lib -L../pgtypeslib -lpgtypes -L../../../../src/interfaces/libpq -lpq -lm -o libecpg.so.4.1 ld: Undefined symbols: _bindtextdomain _dgettext make[4]: *** [libecpg.so.4.1] Error 1 make[4]: Target `all' not remade because of errors. make[3]: *** [all] Error 2 make[2]: *** [all] Error 2 make[1]: *** [all] Error 2 make: *** [all] Error 2 Would you have liked to see the whole output? Also I am not very familiar with make. It seems like it caches the results of previous makes, because most things are not "re-made". I have checked the man page, but couldn't find an option to tell make to really start from the ground up again. Is there any way of doing this or is it meaningless anyway? Thanks. --------------- Francois Home page: http://www.monpetitcoin.com/ "Would Descartes have programmed in Pascal?" - Umberto Eco
Francois Suter said: > Also I am not very familiar with make. It seems like it caches the > results of previous makes, because most things are not "re-made". I > have checked the man page, but couldn't find an option to tell make to > really start from the ground up again. Is there any way of doing this > or is it meaningless anyway? Try make clean this should clear the previously compiled stuff away. John Sidney-Woollett
> Could you run through the make with -k > and see what else might be missing the reference? OK. I ran through it again, doing a make clean beforehand (thanks John). The make -k and it still stalls at the same place: make -C ecpglib all gcc -no-cpp-precomp -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes -Wmissing-declarations -bundle execute.o typename.o descriptor.o data.o error.o prepare.o memory.o connect.o misc.o -L../../../../src/port -L/sw/lib -L../pgtypeslib -lpgtypes -L../../../../src/interfaces/libpq -lpq -lm -o libecpg.so.4.1 ld: Undefined symbols: _bindtextdomain _dgettext make[4]: *** [libecpg.so.4.1] Error 1 make[4]: Target `all' not remade because of errors. make[3]: *** [all] Error 2 make[2]: *** [all] Error 2 make[1]: *** [all] Error 2 make: *** [all] Error 2 Any help will be greatly appreciated. --------------- Francois Home page: http://www.monpetitcoin.com/ "Would Descartes have programmed in Pascal?" - Umberto Eco
Francois Suter wrote: > I ran the make again with -k, but it didn't seem to go any further. Try make -i. I can't guarantee it will work, but sometimes I get better results from it than make -k. > Also I am not very familiar with make. It seems like it caches the > results of previous makes, because most things are not "re-made". That is kind of the point of 'make'.
Francois Suter <dba@paragraf.ch> writes: > I installed gettext using Fink and then gave it a go. The configure > part went ok, but make complained that it couldn't find msgfmt. The attached patch seems to help with building --enable-nls on Darwin. regards, tom lane Index: src/interfaces/ecpg/compatlib/Makefile =================================================================== RCS file: /cvsroot/pgsql-server/src/interfaces/ecpg/compatlib/Makefile,v retrieving revision 1.13 diff -c -r1.13 Makefile *** src/interfaces/ecpg/compatlib/Makefile 30 Nov 2003 06:09:42 -0000 1.13 --- src/interfaces/ecpg/compatlib/Makefile 10 Feb 2004 07:15:11 -0000 *************** *** 18,24 **** override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS)$(THREAD_CPPFLAGS) SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \ ! $(filter -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(THREAD_LIBS) OBJS= informix.o --- 18,24 ---- override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS)$(THREAD_CPPFLAGS) SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \ ! $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(THREAD_LIBS) OBJS= informix.o Index: src/interfaces/ecpg/ecpglib/Makefile =================================================================== RCS file: /cvsroot/pgsql-server/src/interfaces/ecpg/ecpglib/Makefile,v retrieving revision 1.12 diff -c -r1.12 Makefile *** src/interfaces/ecpg/ecpglib/Makefile 30 Nov 2003 06:09:46 -0000 1.12 --- src/interfaces/ecpg/ecpglib/Makefile 10 Feb 2004 07:15:11 -0000 *************** *** 22,28 **** connect.o misc.o SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \ ! $(filter -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(THREAD_LIBS) all: all-lib --- 22,28 ---- connect.o misc.o SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \ ! $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt -lm, $(LIBS)) $(THREAD_LIBS) all: all-lib Index: src/interfaces/libpgtcl/Makefile =================================================================== RCS file: /cvsroot/pgsql-server/src/interfaces/libpgtcl/Makefile,v retrieving revision 1.35 diff -c -r1.35 Makefile *** src/interfaces/libpgtcl/Makefile 30 Nov 2003 06:09:48 -0000 1.35 --- src/interfaces/libpgtcl/Makefile 10 Feb 2004 07:15:11 -0000 *************** *** 21,27 **** OBJS= pgtcl.o pgtclCmds.o pgtclId.o SHLIB_LINK = $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) \ ! $(filter -lssl -lcrypto -lkrb5 -lcrypt, $(LIBS)) $(THREAD_LIBS) all: submake-libpq all-lib --- 21,27 ---- OBJS= pgtcl.o pgtclCmds.o pgtclId.o SHLIB_LINK = $(libpq) $(TCL_LIB_SPEC) $(TCL_LIBS) \ ! $(filter -lintl -lssl -lcrypto -lkrb5 -lcrypt, $(LIBS)) $(THREAD_LIBS) all: submake-libpq all-lib Index: src/pl/plpgsql/src/Makefile =================================================================== RCS file: /cvsroot/pgsql-server/src/pl/plpgsql/src/Makefile,v retrieving revision 1.24 diff -c -r1.24 Makefile *** src/pl/plpgsql/src/Makefile 29 Nov 2003 19:52:12 -0000 1.24 --- src/pl/plpgsql/src/Makefile 10 Feb 2004 07:15:11 -0000 *************** *** 20,26 **** SO_MINOR_VERSION= 0 override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) ! SHLIB_LINK = $(BE_DLLLIBS) rpath := OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o --- 20,26 ---- SO_MINOR_VERSION= 0 override CPPFLAGS := -I$(srcdir) $(CPPFLAGS) ! SHLIB_LINK = $(filter -lintl, $(LIBS)) $(BE_DLLLIBS) rpath := OBJS = pl_gram.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o
On Feb 10, 2004, at 8:55, Tom Lane wrote: > The attached patch seems to help with building --enable-nls on Darwin. Wow, thanks a lot Tom! I got to the end of making and installing flawlessly with your patch. I have another question yet, but will post it in a new thread. Thanks again. --------------- Francois Home page: http://www.monpetitcoin.com/ "Would Descartes have programmed in Pascal?" - Umberto Eco