Re: Bjam newbie - questions.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Bjam newbie - questions.

Vladimir Prus
Hi Claudio,

> First at all, thanks for so much for your responses, your help was
> absolutely invaluable and enlightening. Very appreciated. With your
> comments I was able to get the job done, at last! It was pretty depressing
> being stuck at this without a clue.
>
> Volodya, just one tiny, not critical question, regarding this code snippet:
> >    # Get all child Jamfiles
> >    local sub = [ glob */Jamfile ] ;
> >    # Strip filenames, getting just directories;
> >    sub = $(sub:D) ;
> >    for local s in $(sub)
> >    {
> > build-project $(s) ;
> >    }
>
> Do I just put that code inside test's Jamfile and that's it? Do I have to
> import something or put anything else?
> With this code, I'm getting this error:
>
> C:/dev/boost/tools/build/v2/util\path.jam:162: in path.join from module
> path
> error: only first element may be rooted

Sorry, it seems like there's a bug in current code. I've fixed this, and
tested with the following Jamroot (copy-paste of actual working example):

   local sub = [ glob */Jamfile ] ;
   sub = $(sub:D) ;
   for local s in $(sub)
   {
      build-project $(s) ;
   }

Can you update to CVS HEAD and try again?

- Volodya

_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Bjam newbie - questions.

Claudio Pacciarini
Hi Vladimir,

Thanks for your email and sorry for this late response.

I got frustrated with my lack of progress and understanding on bjam that I
temporarily gave up.

It's a wonderful project but I couldn't solve certain things and gave up and
I don’t have much time to loose.

Just in case you are curious about, I’ was trying to build a very simple
project, like a hello world program, but composed of the main program, a
static lib, a dynamic lib and a unit test.

The idea was to build everything using bjam2, using boost test for the unit
testing. The build should be Windows and Linux compatible, passing certain
compiler and linker flags depending on the platform.

I couldn't get this to work on Windows and Linux, with the same set of jam
files. I've tried everything and I was stuck for days until I finally gave
up.

I'm attaching the project files here, just in case you or someone else want
to take a look and make it work. Having this solved will help me and perhaps
many more adopt bjam, as doing what I’ve trying exercises and solves most
common build operations.

Thanks,

Claudio

PS: for the WIndows compiler, I want to pass:

# For windows:

export CXXFLAGS = /nologo /EHsc /GR /Za /W4 /Wp64 /WX /Zc:forScope
/Zc:wchar_t /Od /Ob0 /Z7 /RTC1 /GS /GF # (Debug)
# export CXXFLAGS = /nologo /EHsc /GR /Za /W4 /Wp64 /WX /Zc:forScope
/Zc:wchar_t -O2 -Ob1 /GS /GF # (Release)


# For Linux:

# export CXXFLAGS = Wall -Werror -ansi -pedantic-errors -O0 -fnoinline
-Wpointer-arith -Wstrict-prototypes -Weffc++ # (Debug)
# export CXXFLAGS = Wall -Werror -ansi -pedantic-errors -O3  
-finline-functions -Wpointer-arith -Wstrict-prototypes -Weffc++ # (Release)



>From: Vladimir Prus <[hidden email]>
>Reply-To: "Boost.Build developer's and user's
>list"<[hidden email]>
>To: "Boost.Build developer's and user's list" <[hidden email]>
>Subject: Re: [Boost-build] Bjam newbie - questions.
>Date: Fri, 13 Jan 2006 11:22:50 +0300
>
>Hi Claudio,
>
> > First at all, thanks for so much for your responses, your help was
> > absolutely invaluable and enlightening. Very appreciated. With your
> > comments I was able to get the job done, at last! It was pretty
>depressing
> > being stuck at this without a clue.
> >
> > Volodya, just one tiny, not critical question, regarding this code
>snippet:
> > >    # Get all child Jamfiles
> > >    local sub = [ glob */Jamfile ] ;
> > >    # Strip filenames, getting just directories;
> > >    sub = $(sub:D) ;
> > >    for local s in $(sub)
> > >    {
> > > build-project $(s) ;
> > >    }
> >
> > Do I just put that code inside test's Jamfile and that's it? Do I have
>to
> > import something or put anything else?
> > With this code, I'm getting this error:
> >
> > C:/dev/boost/tools/build/v2/util\path.jam:162: in path.join from module
> > path
> > error: only first element may be rooted
>
>Sorry, it seems like there's a bug in current code. I've fixed this, and
>tested with the following Jamroot (copy-paste of actual working example):
>
>    local sub = [ glob */Jamfile ] ;
>    sub = $(sub:D) ;
>    for local s in $(sub)
>    {
>       build-project $(s) ;
>    }
>
>Can you update to CVS HEAD and try again?
>
>- Volodya
>
>_______________________________________________
>Boost-build mailing list
>[hidden email]
>http://lists.boost.org/mailman/listinfo.cgi/boost-build

*****************************************************************************
**                                                                         **
** WARNING:  This email contains an attachment of a very suspicious type.  **
** You are urged NOT to open this attachment unless you are absolutely     **
** sure it is legitmate.  Opening this attachment may cause irreparable    **
** damage to your computer and your files.  If you have any questions      **
** about the validity of this message, PLEASE SEEK HELP BEFORE OPENING IT. **
**                                                                         **
** This warning was added by the IU Computer Science Dept. mail scanner.   **
*****************************************************************************


_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build

hellobeatles.zip (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bjam newbie - questions.

Vladimir Prus
Hi Claudio,

> I'm attaching the project files here, just in case you or someone else want
> to take a look and make it work. Having this solved will help me and
> perhaps many more adopt bjam, as doing what I▓ve trying exercises and
> solves most common build operations.

I think we can walk over problem you have and solve them one-by-one.

When I just try to build your testcase on Linux, I get this:

  /usr/bin/ld: cannot find -lboost_unit_test_framework-mt-gd

That's because your definitions for boost test do not specify the paths where
the library is to be found. Yes another issue is that standard Boost build
does not create "-gd" targets on Linux, I get just "-d". I've changed your
test/Jamfile to read:

  lib boost_unit_test : : <name>boost_unit_test_framework-mt-d <variant>debug
        <search>/home/ghost/Work/boost-rc/stage/lib ;
  lib boost_unit_test : : <name>boost_unit_test_framework-mt <variant>release
        <search>/home/ghost/Work/boost-rc/stage/lib ;


After that, I've run into a small bug -- the "unit-test" rule does not
property set run-time library search paths. The bug is now fixed, and you can
get the fixed version from CVS, or at:

   http://boost.org/boost-build2/boost-build.zip

(though the latter is painfully slow at the moment).

If you report further issues, or you had different issue to begin with, I'll
take another look.

Thanks for your patience,
Volodya

_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Bjam newbie - questions.

Claudio Pacciarini
Hi Volodya,

Thank you so much for your time help me with this, I'll take a look at this
when I arrive home tonight.

Regards,

Claudio


>From: Vladimir Prus <[hidden email]>
>Reply-To: "Boost.Build developer's and user's
>list"<[hidden email]>
>To: "Boost.Build developer's and user's list" <[hidden email]>
>Subject: Re: [Boost-build] Bjam newbie - questions.
>Date: Tue, 17 Jan 2006 13:07:48 +0300
>
>Hi Claudio,
>
> > I'm attaching the project files here, just in case you or someone else
>want
> > to take a look and make it work. Having this solved will help me and
> > perhaps many more adopt bjam, as doing what I’ve trying exercises and
> > solves most common build operations.
>
>I think we can walk over problem you have and solve them one-by-one.
>
>When I just try to build your testcase on Linux, I get this:
>
>   /usr/bin/ld: cannot find -lboost_unit_test_framework-mt-gd
>
>That's because your definitions for boost test do not specify the paths
>where
>the library is to be found. Yes another issue is that standard Boost build
>does not create "-gd" targets on Linux, I get just "-d". I've changed your
>test/Jamfile to read:
>
>   lib boost_unit_test : : <name>boost_unit_test_framework-mt-d
><variant>debug
>         <search>/home/ghost/Work/boost-rc/stage/lib ;
>   lib boost_unit_test : : <name>boost_unit_test_framework-mt
><variant>release
>         <search>/home/ghost/Work/boost-rc/stage/lib ;
>
>
>After that, I've run into a small bug -- the "unit-test" rule does not
>property set run-time library search paths. The bug is now fixed, and you
>can
>get the fixed version from CVS, or at:
>
>    http://boost.org/boost-build2/boost-build.zip
>
>(though the latter is painfully slow at the moment).
>
>If you report further issues, or you had different issue to begin with,
>I'll
>take another look.
>
>Thanks for your patience,
>Volodya
>
>_______________________________________________
>Boost-build mailing list
>[hidden email]
>http://lists.boost.org/mailman/listinfo.cgi/boost-build


_______________________________________________
Boost-build mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-build