* [RFC] Build on OSX
@ 2007-02-12 9:19 Masaki Muranaka
2007-02-27 16:57 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Masaki Muranaka @ 2007-02-12 9:19 UTC (permalink / raw)
To: gdb-patches
Hello,
I've trying to build cross-gdb on OSX host from CVS head.
And the build was failed with following message:
/usr/bin/ld: warning multiple definitions of symbol _locale_charset
./../intl/libintl.a(localcharset.o) definition of _locale_charset in
section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libiconv.dylib
(localcharset.o) definition of _locale_charset
It is well known issue. OSX (maybe also Darwin) hosts
need to link 'resolv' library beforge libintl.a.
Here is a brute-forced patch. But I don't think this is
the good solution.
Any comments appreciated.
- - - - - - -
Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.42
diff -u -p -r1.42 configure.ac
--- configure.ac 2 Feb 2007 22:54:09 -0000 1.42
+++ configure.ac 12 Feb 2007 08:55:46 -0000
@@ -1591,6 +1591,13 @@ AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "ISO
AM_ICONV
+# Darwin (MacOSX Tiger) needs -lresolv before libintl.a.
+if test x"$LIBINTL" != x; then
+ case ${host} in
+ *darwin*) LIBINTL="-lresolv $LIBINTL";
+ esac
+fi
+
AC_OUTPUT(Makefile .gdbinit:gdbinit.in,
[
dnl Autoconf doesn't provide a mechanism for modifying definitions
--
Masaki Muranaka
Monami software
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Build on OSX
2007-02-12 9:19 [RFC] Build on OSX Masaki Muranaka
@ 2007-02-27 16:57 ` Daniel Jacobowitz
2007-02-28 10:18 ` Masaki Muranaka
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2007-02-27 16:57 UTC (permalink / raw)
To: Masaki Muranaka; +Cc: gdb-patches
On Mon, Feb 12, 2007 at 06:19:26PM +0900, Masaki Muranaka wrote:
> Hello,
>
> I've trying to build cross-gdb on OSX host from CVS head.
> And the build was failed with following message:
>
> /usr/bin/ld: warning multiple definitions of symbol _locale_charset
> ./../intl/libintl.a(localcharset.o) definition of _locale_charset in
> section (__TEXT,__text)
> /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libiconv.dylib
> (localcharset.o) definition of _locale_charset
>
>
> It is well known issue. OSX (maybe also Darwin) hosts
> need to link 'resolv' library beforge libintl.a.
>
> Here is a brute-forced patch. But I don't think this is
> the good solution.
I know that people built GCC on this platform all the time. GCC
doesn't explicitly do this, so why does it work for GCC but not for
GDB? I would recommend building GCC and trying to figure out what's
different.
(You can build just a C compiler with --enable-languages=c, that's
much quicker.)
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Build on OSX
2007-02-27 16:57 ` Daniel Jacobowitz
@ 2007-02-28 10:18 ` Masaki Muranaka
0 siblings, 0 replies; 3+ messages in thread
From: Masaki Muranaka @ 2007-02-28 10:18 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On 2007/02/28, at 1:56, Daniel Jacobowitz wrote:
>> /usr/bin/ld: warning multiple definitions of symbol _locale_charset
>> ./../intl/libintl.a(localcharset.o) definition of _locale_charset in
>> section (__TEXT,__text)
>> /usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libiconv.dylib
>> (localcharset.o) definition of _locale_charset
>>
>>
>> It is well known issue. OSX (maybe also Darwin) hosts
>> need to link 'resolv' library beforge libintl.a.
>>
>> Here is a brute-forced patch. But I don't think this is
>> the good solution.
>
> I know that people built GCC on this platform all the time. GCC
> doesn't explicitly do this, so why does it work for GCC but not for
> GDB? I would recommend building GCC and trying to figure out what's
> different.
I have an mistake. In fact, there is warning already shown, but
binaries (gdb, gdbtui) are generated successfully.
> (You can build just a C compiler with --enable-languages=c, that's
> much quicker.)
I can't build GCC immediately because I don't have darwin version of
GMP/MPFR. So I'm not sure, but it is posible that GCC developers
regard this issue as harmless.
--
Masaki Muranaka
Monami software
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-02-28 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 9:19 [RFC] Build on OSX Masaki Muranaka
2007-02-27 16:57 ` Daniel Jacobowitz
2007-02-28 10:18 ` Masaki Muranaka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox