[C++-sig] Link trouble on OS X

David Abrahams david.abrahams at rcn.com
Thu May 23 14:40:28 CEST 2002


----- Original Message -----
From: "Scott A. Smith" <ssmith at magnet.fsu.edu>

> OK, then it is a problem with knowing where the libraries are. There was
an
>
>                        export LD_LIBRARY_PATH
>
> command issued prior to the linking

Yes.

> which would no be accepted before I tried to do the linking with by hand.

Huh? I can't understand what that means.

> This must be the problem. I don't know what
> that was set to, or I could just set and export it by hand too.

It gets set by the build command as it runs. If you're not seeing
LD_LIBRAY_PATH=... on the immediately preceding line, it's getting set to
something empty, which is probably a bug.

> The build command
>
>                   bjam -sTOOLS=gcc -sBUILD=release -d+2
>
> pretty much echoed the same thing. It does the export command shown above
> then tries to link all of the object files to generate an so library but
> cannot find the util library.


> > I'll tell you what; if you "hold my hand" with getting set up with OS X
> > development, I'll try to get the build working there. My wife has an
ibook
> > I can use. What do I need to do to get the tools in place, including
> > Python?
>
> Well, I thought it would be the other way around! Here is what I did on
> a fresh OS X machine (bear in mind that I am not a Mac expert)
>
> 1.) Installed the "Darwin Collection" which has the Gnu Tools in it.
>     This is on the Apple Developer Tools CD or you can download it from
>
>
http://www.apple.com/downloads/macosx/unix_apps_utilities/thedarwincollecti
o
> n.html
>
>     if you have a good internet connection. If you already have all of
this
>     installed then you may not need this step.
>
> 2.) Next I installed both Fink and Fink Commander. The former is a
package
>     manager that ties into SourceForge and the latter is a nice GUI that
>     you can run to simplify installation of packages. These are at
>
> http://www.apple.com/downloads/macosx/unix_apps_utilities/fink.html
>
http://www.apple.com/downloads/macosx/unix_apps_utilities/finkcommander.htm
l
>
>     repectively.
>
> 3.) Using Fink Commander I installed (from sources) Python.

What about CVS? I'd like to get the boost CVS state there.

> At this point I have a working GCC compiler and a working Python so I
build
> Jam and then tried BOOST.

> I don't mind rebuilding Jam with some simple changes if you could give me
a
> clue as to what I might try changing.

There's absolutely no need for rebuilding Jam. All of the logic is
happening in (interpreted) .jam files.

> Perhaps this would be a good thing
> for me to look over in light of the troubles I am having with the CygWin
> build.
>
> > bjam doesn't currently have a working Cygwin version. To build with
your
> > cygwin compiler, you just use it from your regular command-shell;
> > I do that all the time.
>
> For clarification: Are you saying I should rebuild jam/bjam with GCC
under
>                    CygWin (as I did with Mac OS X), then the
Boost(.Python)
> build
>                    will work just fine?

No, I'm saying that if you rebuild it under cygwin, the bjam executable
won't work (for some reason). If you want to build cygwin versions of your
other software, just use the prebuilt version of bjam you already have from
your regular Windows command-shell.

> At the moment, I tried the pre-build jam but the build of Boost.Python
fails
> because it never figures out where the Python includes are. It always
looks
> in /usr/local/include regardless of what environment variables are set.

I don't believe it. What environment variables are you setting?
(Note that the pre-built bjam won't see any cygwin bash environment
variables)

-Dave







More information about the Cplusplus-sig mailing list