public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* libintl on Mac OS X
@ 2014-10-05 17:32 Valentina Manea
  2014-10-08 12:35 ` Valentina Manea
  0 siblings, 1 reply; 2+ messages in thread
From: Valentina Manea @ 2014-10-05 17:32 UTC (permalink / raw)
  To: crossgcc

Hi,

I am trying to build arm-unknown-linux-gnueabi toolchain on Mac OS X
10.9.4 with crosstool-ng and have a problem with libintl. On Linux,
this library is part of libc but on Mac, it comes in a separate
package. I've installed the package and am able to link with -lintl.

When building the toolchain, if I don't link explicitly with -lintl, I get this:
[EXTRA]    Installing C library headers
[ERROR]    collect2: error: ld returned 1 exit status
[ERROR]    make[3]: ***
[/Volumes/extra/arm-unknown-linux-gnueabi/.build/arm-unknown-linux-gnueabi/build/build-libc-startfiles/sunrpc/cross-rpcgen]
Error 1

From build.log:
[ALL  ]    Undefined symbols for architecture x86_64:
[ALL  ]      "_libintl_setlocale", referenced from:
[ALL  ]          _main in cross-rpc_main.o
[ALL  ]    ld: symbol(s) not found for architecture x86_64

I tried adding it as build linker flag, host linker flag and gcc extra
flag (in C library category of menuconfig). In each of these
situations, the above file compiles fine, however, it seems the flag
is overused:

[ERROR]    configure: error: Need linker with .init_array/.fini_array support.

In config.log:
/Volumes/extra/arm-unknown-linux-gnueabi/.build/arm-unknown-linux-gnueabi/buildtools/lib/gcc/arm-unknown-linux-gnueabi/4.9.1/../../../../arm-unknown-linux-gnueabi/bin/ld.bfd:
cannot find -lintl
collect2: error: ld returned 1 exit status

As I can see, this flag is also used by the toolchain itself, which
doesn't use system paths and can't find the library.

Is there any way to add this flag *only* when using the system
compiler? I would have expected build/host flags to do the trick but
it seems they don't.

Any help is greatly appreciated.

Thanks,
Valentina

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libintl on Mac OS X
  2014-10-05 17:32 libintl on Mac OS X Valentina Manea
@ 2014-10-08 12:35 ` Valentina Manea
  0 siblings, 0 replies; 2+ messages in thread
From: Valentina Manea @ 2014-10-08 12:35 UTC (permalink / raw)
  To: crossgcc

Hi,

In case anyone googles this and finds this email, I solved the problem
by adding:

-L/usr/lib -lintl

as LDFLAGS to .build/src/glibc-2.19/sunrpc/Makefile. I'm reasonably
sure it could have been solved in a cleaner manner, by adding the same
thing as build/host LDFLAGS but I forgot to specify the library path.
This is a general problem for Mac OS X, as this library is not
included in glibc. Maybe we could add this to LDFLAGS after checking
that the system type?

Valentina

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-08 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-05 17:32 libintl on Mac OS X Valentina Manea
2014-10-08 12:35 ` Valentina Manea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).