[Freeciv-Dev] Re: (PR#10140) generator.a linker error on OSX
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#10140) generator.a linker error on OSX |
From: |
"Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx> |
Date: |
Wed, 15 Sep 2004 22:48:09 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10140 >
On Wed, Sep 15, 2004 at 08:25:55PM -0700, Jason Short wrote:
> First, see if a make clean solves the problem.
It didn't (I did that before trying to debug this).
> If it doesn't I suspect this is another case where we have to list the
> .a files multiple times. Which linking is it that fails? civserver?
> civmanual?
civserver is failing. But even if I list the .a file repeatedly, it
still fails. I can largely replicate the issue with:
foo1.c:
extern int x;
int x;
foo2.c:
extern int x;
int main() { return x; }
$ gcc -c foo1.c foo2.c
$ ar cr libfoo.a foo1.o
$ ranlib libfoo.a
ranlib: warning for library: libfoo.a the table of contents is empty (no
object file members in the library define global symbols)
$ gcc foo1.o libfoo.a
ld: warning empty table of contents: libfoo.a (can't load from it)
ld: Undefined symbols:
_x
With freeciv, I only see the undefined symbol errors, not the empty ToC
errors. Anyway, it seems to be another moronic ar on MacOS issue. The
patch on my original bug report fixes it, somehow.
-- Benoît
|
|