Boost logo

Boost-Build :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-04-15 15:20:46


Mat Marcus wrote:
> So far you have:
> 1) asked me whether I can build hello world

Since your compiler failed and I was not aware of the other thread.
Also this was the first I wanted to make sure.

> 2) asked me to repeat what I have written earlier in the thread

Hmm you posted to two lists and started two threads with seemingly
closely related problem. Sorry didn't notice fast enough.

> 3) suggested that what I want to do, and was able to do in 1.34.1, is
> cross-compilation and therefore an unreasonable thing to ask for

Really?

This is what I said:

> I think what you are trying to do is some kind of cross building
> with the mingw compiler for the cygwin environment, yes?
>
> I am not sure the toolchain (support in boost-build) supports

If you deduce from this that I meant it is
unreasonable, well it migt be due to my lackk of english (I am not
native speaker). For me this reads more as a question than a statement
of you having requested somthing unreasonable. In contrary I strongly
believe croos compile should be a very reasonable thing to expect from
boost-build.

> 4) asked me further questions about my build configuration
> 5) suggested that I need to use <flavor>mingw in my user-config.jam
Ok, This is only a issue when specifying the mingw compiler. Usually
this is detected by auto-configuration.

> 6) asked anthony not to fix what he might have regarded as a bug in
> his thread jamfile without talking to you first

I asked this because 1) I wrote it. 2) I still believe there is no bug.
3) I want to have things discussed and cleared up, before hacking
away and breaking other things.

> I haven't found them to be very helpful so far.

Sorry for this, I am not perfect. But I also had problems
understanding your questions. The more detail you provide the better
the answer. (Please also keep in mind that you don't pay me, so
complaining is not the most efficient way to get help.)

> I understand that
> tools may primarily support use cases other than my own. But when
> replying to me, please also consider this use case that was formerly
> supported.

Given. But in order to add back in the ability to build for pthreads
_or_ win32 api with msvc some changes were necessary. You even can
get two variants of the library side by side.

> Reading between the lines, it sounds like some flexibility
> was added to the boost build system to better support mingw users.

No, this was not my main goal.

> If
> so, great. My question is, what must I do to restore the ability to
> use the following command line in 1.35.0:
>
> bjam debug release gcc-4.2.0 msvc-8.0 msvc-9.0

This indeed is possible, but 1) you need to decide which threading api
you want. For the following I assume you want win32. 2) you need
to separate the case whether you build from bash or from cmd.

>From your previous posts I deduce you have only msvc built bjam. This
implies one important consequence: It determines the OS boost-build
thinks it is on. Even when you invoke from bash. You really be better
off to get your cygwin built bjam and get it picked up from e.g.
/usr/local/bin.

I continue with building from cmd. Again from your previous posts
I have learned that the gcc you are using is not a mingw. And there
the next problem arises: gcc wants to use cygwin dll by default.
You can switch this off however: The switch (which is unfortuantely
undocumented, don't aks me why) is -mno-cygwin. This should make
your gcc try to link against mingw dll and msvc rt dlls.

To sum up:
While your setup should work in principle it is not very solid
when you are not exactly trying to find out what is going on under the
hoods.

I recommend

1) Using the mingw compilers and mingw (or msvc) built bjam
   when compiling from cmd.

2) Using cygwin gcc and bjam built from bash with cygwing gcc.

These settings are intended to work out of the box.

Other is possible but _need_ the additional specification of
threadapi. Please note that this seemed not necessary before,
while in fact it was. You just had no control over it.
Please follow Renes suggestion. This will be necessary and I
consider this not only as a work around. Possibly it will go away when
cross compiling is easier to use with boost-build, but I cannot
promise ;-)

>
> If it is necessary to ad something to my user-config.jam line for
> gcc-4.2.0, then so be it. Are there release notes explaining the
> changes since 1.34.1 that indicate what I must do?

Did you look into the Jamfile? Btw. It is good resource to learn
boost-build. The comments in the files at times are much better than
user doc.

-- 
_________________________________________
  _  _  | Roland Schwarz
 |_)(_  | aka. speedsnail
 | \__) | mailto:roland.schwarz_at_[hidden]
________| http://www.blackspace.at

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk