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

Scott A. Smith ssmith at magnet.fsu.edu
Thu May 23 14:16:09 CEST 2002


Hi again Dave,

> Add -d+2 to your bjam command-line and you'll see all of the commands it
> uses to build the targets.
> Actually, that's the way Jam works if you don't specify -d+2: the command
> used to build the target is hidden unless there's an error, in which case
> it is printed following the error output. In other words, the command-line
> you're seeing there following the error is the right one.

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 which would no be accepted before I
tried
to do the linking with by hand. 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.

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/thedarwincollectio
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.html

    repectively.

3.) Using Fink Commander I installed (from sources) Python.

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. 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?

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.

Thanks a whole lot,
Scott

-----------------------------------------
-----------------------------------------

 Dr. Scott A. Smith
 Associate in Research
 National High Magnetic Field Laboratory
 1800 East Paul Dirac Drive
 Tallahassee, FL 32310

 phone: (850) 644-6348
 FAX:   (850) 644-1366
 email: ssmith at magnet.fsu.edu
 http://www.magnet.fsu.edu
 http://gamma.magnet.fsu.edu

> 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.
>
>
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>






More information about the Cplusplus-sig mailing list