[gambit-list] Building Gambit for recent iOS

Mikael mikael.trash at gmail.com
Wed Dec 22 06:15:30 EST 2010


Aha, I get your question.

This is not my field of expertise. Generally I'd try to debug it from an as
basic approach as possible.

Look at the error message you got -

cairagor:gambit_fun mikel$ gcc -L/usr/local/gambit/MacOSX/lib -bundle m1.o
> m2.o m3.o foo.o1.o -o foo.o1 -lgambc
> ld: duplicate symbol ____G_cons in
> /usr/local/gambit/MacOSX/lib/libgambc.a(_gambc.o) and foo.o1.o


the compiler complains cons is duplicate. That's a runtime library function,
afaik. Perhaps gcc somehow tries to link more than one variant/version of
the runtime library object file (*gambc*.o/.a) at the same time? What files
do you have in /usr/local/gambit/MacOSX/lib?

What are all the symbols defined/exported by the involved object files?

Brgds

2010/12/22 mikel evins <mevins at me.com>

>
> On Dec 22, 2010, at 4:48 AM, Mikael wrote:
>
> > AFAIK there's people who have successfully compiled Gambit on both
> platforms you mention, and documented it quite well in on the ML. I don't
> know exactly though.
>
> Quite so. I'm one of them.
>
> > When you dug out the answer to your question, would you be interested to
> publish your results here?
> >
> > I suppose your question is how to sucessfully do (compile-file) i.e. gcc
> gambit-made C files, and gsc -exe / link object files to an executable, all
> this done outside of the xcode programming environment.
>
> No, that's not my question.
>
> My question is why, when I follow the example given in the Gambit manual
> letter-for-letter, the build fails with a "duplicate symbol" error. Do other
> people who follow that example exactly on recent versions of Mac OS X with
> recent versions of Apple dev tools see the same error? If so, then
> presumably something in a recent Gambit or Apple release has introduced a
> build problem. If not, then presumably some quirk of my local configuration
> is causing a link problem.
>
> The only obvious idiosyncrasy of my build environment is that instead of
> building and installing Gambit in the normal way, I built it from recent
> Gambit sources using a config script that Marc provided for the purpose of
> simultaneously building Gambit for three environments: Mac OS X, the iOS
> Simulator, and iOS devices. Consequently, I have three parallel installs of
> Gambit, and I must, of course, pass suitable -I and -L flags when building,
> so that Gambit finds the right files.
>
> None of this makes it obvious to me why following the instructions on page
> 16 of the manual (while of course adding the appropriate -L to find the
> right gambit library) would result in a "duplicate symbol" error, but it's
> certainly possible that I overlooked something.
>
> --me
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20101222/4ef7b2fe/attachment.htm>


More information about the Gambit-list mailing list