Boost logo

Boost Users :

From: Rob Desbois (rob.desbois_at_[hidden])
Date: 2008-02-07 10:27:00


On Feb 6, 2008 7:01 PM, Vladimir Prus <ghost_at_[hidden]> wrote:
> Rob Desbois wrote:
>
> > On Feb 6, 2008 12:07 PM, Vladimir Prus <ghost_at_[hidden]> wrote:
> >> [generally, boost.build questions are better asked
> >> a boost-build_at_[hidden] mailing list]
> >
> > Ok thanks for that. I guessed as my problem is with building boost
> > with boost-build, not with the boost-build project itself, that it
> > would be better here. If this is still off-topic and likely to annoy
> > then please let me know and I'll take it there.
>
> So far, nothing in this thread is specific to building Boost,
> as opposed to some other C++ library ;-) However, this time
> we can continue it here.

Ok, thanks. I'm unfamiliar with Boost.Build so it's not easy to tell
whether errors are caused by the build system or not!

> >> Are you 100% sure you've placed user-config.jam in a location that
> >> Boost.Build looks in? You can use --debug-configuration option
> >> to print the location of user-config.jam that is actually loaded.
> >
> > Thanks - that was the problem. The documentation mentions
> > user-config.jam, and there was one in my boost_1_34_1 folder so I
> > assumed that was the one to use. It's a bit confusing having several
> > around. I've found the one it was using and modified that instead.
>
> Did you run configure? I think that's the only way a user-config.jam
> can be generated in the root folder. I'm meaning to raise the
> issue of 'configure' doing slightly confusing things on the devel list.

I don't think so - I'm using the guide "Boost: Getting Started on Unix
Variants" following 5.2 instead of 5.1
I've started on a freshly extracted archive to make sure.

> >> Also, the above is not fully correct, per documentation you should have:
> >>
> >> using gcc : : arm-none-linux-gnueabi-g++ ;
> >>
> >> If you use:
> >>
> >> using g++ : .......
> >>
> >> you should see an error, and if you don't see it it really means
> >> some other user-config.jam is loaded.
> >
> > Done. It's using the correct toolchain now, however won't compile.
> > At the offset it passes an invalid option to `ld`, even if I let it
> > run after that I get a horrendous number of compiler errors and lots
> > of failure lines.
> > I currently get this output:
> ...
> > gcc.link.dll bin.v2/libs/regex/build/gcc-4.2.1/debug/boost_regex-gcc42-d-1_34_1.dll.a
> > bin.v2/libs/regex/build/gcc-4.2.1/debug/boost_regex-gcc42-d-1_34_1.dll
> > c:/program files/codesourcery/sourcery g++
> > lite/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld.exe:
> > unrecognized option '--out-implib'
>
> I'm afraid this will require some manual work -- as presently,
> when running on windows, boost.build assumes you're targeting windows.
> For quick result, go to
>
> tools/build/v2/tools/gcc.jam
>
> and locate code fragment that goes like:
>
> if [ os.on-windows ]
> {
> .IMPLIB-COMMAND = "-Wl,--out-implib," ;
> ...
> }
> else
> {
> }
>
> Remove everything starting from "if" up until, and including, the "else".
> Let me know what errors, if any, remain after that.

That solved the problem -- there was a similar section lower down the
same file for which I commented out the [ os.on-windows ] code block:
  if [ os.on-windows ]
  {
      flags gcc OPTIONS <threading>multi : -mthreads ;
  }
  else if [ modules.peek : UNIX ]

Thank you for your help :-)
--rob


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net