[MacPorts] #17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain
#17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: recode, gettext -------------------------------------+-------------------------------------- Trying to install recode @3.6_3+universal fails with messages that gettext-related symbols could not be found, even though gettext @0.17_3+universal is installed: {{{ /bin/sh ../libtool --mode=link /usr/bin/gcc-4.0 -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -L/opt/local/lib -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -o recode main.o freeze.o mixed.o librecode.la ../lib/libreco.a /usr/bin/gcc-4.0 -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -L/opt/local/lib -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -o recode main.o freeze.o mixed.o .libs/librecode.a ../lib/libreco.a /usr/bin/ld: for architecture i386 /usr/bin/ld: Undefined symbols: _libintl_bindtextdomain _libintl_gettext _libintl_textdomain collect2: ld returned 1 exit status /usr/bin/ld: for architecture ppc /usr/bin/ld: Undefined symbols: _libintl_bindtextdomain _libintl_gettext _libintl_textdomain collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccYkcFNd.out (No such file or directory) make[2]: *** [recode] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive-am] Error 2 }}} This was originally [http://lists.macosforge.org/pipermail/macports- users/2009-January/013175.html reported on macports-users by Jerry]. -- Ticket URL: <http://trac.macports.org/ticket/17925> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: recode, gettext -------------------------------------+-------------------------------------- Comment(by ryandesign@…): When not building universal, recode's configure script finds gettext and therefore adds -lintl to the build commands and it works. But when building universal, recode's configure script doesn't find gettext so it doesn't add -lintl to the build commands so it fails. Now we need to examine why recode's configure script behaves like that, or perhaps, we just need to autoreconf recode. -- Ticket URL: <http://trac.macports.org/ticket/17925#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: recode, gettext -------------------------------------+-------------------------------------- Comment(by ryandesign@…): See also #18276 for similar problems with wget +universal. -- Ticket URL: <http://trac.macports.org/ticket/17925#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: recode, gettext -------------------------------------+-------------------------------------- Comment(by ryandesign@…): I tried using the muniversal portgroup; no change. I tried using autoreconf; that causes configure to fail: {{{ checking whether ln -s works... yes loading cache /dev/null within ltconfig ltconfig: you must specify a host type if you use `--no-verify' Try `ltconfig --help' for more information. configure: error: libtool configure failed }}} Googling that error message reveals that this was fixed in libtool 1.4; based on recode's README, it seems to include libtool 1.3.4. Maybe if we can make it use the immensely newer libtool in the libtool port we can get further. -- Ticket URL: <http://trac.macports.org/ticket/17925#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: recode, gettext -------------------------------------+-------------------------------------- Comment(by ryandesign@…): It looks like this is specific to Tiger; it builds fine universal on Leopard. -- Ticket URL: <http://trac.macports.org/ticket/17925#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: recode, gettext | --------------------------------------+------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: I finally tried to compile [http://oriya.sarovar.org/docs/gettext_single.html a simple gettext example program] I found: {{{ #include <libintl.h> #include <locale.h> #include <stdio.h> #include <stdlib.h> int main(void) { setlocale(LC_ALL, ""); bindtextdomain("hello", "/opt/local/share/locale"); textdomain("hello"); printf(gettext("Hello, world!\n")); exit(0); } }}} It builds with: {{{ gcc -I/opt/local/include -L/opt/local/lib -lintl -o hello hello.c }}} Then I tried to build universal: {{{ gcc -I/opt/local/include -L/opt/local/lib -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -lintl -o hello hello.c }}} It fails when trying to find libiconv, which gettext uses: {{{ /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: for architecture i386 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libiconv.2.dylib referenced from: /opt/local/lib/libintl.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2) /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _libiconv referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib _libiconv_open referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib _libiconv_set_relocation_prefix referenced from libintl expected to be defined in /opt/local/lib/libiconv.2.dylib collect2: ld returned 1 exit status }}} Because I specified `-isysroot` but not `-liconv` it thinks it's supposed to look for libiconv in the MacPorts prefix ''inside the sysroot'' -- inside /Developer/SDKs/MacOSX10.4u.sdk -- but of course there isn't any MacPorts prefix inside the SDK. If I add `-liconv` it knows not to prepend the sysroot and works fine: {{{ gcc -I/opt/local/include -L/opt/local/lib -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -lintl -liconv -o hello hello.c }}} So I imagine that the configure script is doing the same thing, is not using `-liconv`, and when the program fails to compile, it assumes this is because gettext doesn't exist. The easy fix is to add `-liconv` to the `configure.ldflags` which I did in r46175. -- Ticket URL: <http://trac.macports.org/ticket/17925#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#17925: recode +universal: Undefined symbols _libintl_bindtextdomain _libintl_gettext _libintl_textdomain --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: ryandesign@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: recode, gettext | --------------------------------------+------------------------------------- Comment(by ryandesign@…): Replying to [comment:5 ryandesign@…]:
The easy fix is to add `-liconv` to the `configure.ldflags` which I did in r46175. Which is the same fix that was done for dcraw in #13575.
-- Ticket URL: <http://trac.macports.org/ticket/17925#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts