Bjam Update error in actualize?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Bjam Update error in actualize?

Kcarr
I am currently updating a very old project which use to use bjam 3.1.16 and boost-build_2.0-m12.  Those are now gone and bjam seems to be in liboost-tools-dev debians. I installed the latest 1.55 version and am trying to run our old build process which uses bjam.

We have our own generator class we created for some different file types that needed special attention.  I am getting the error in that.  Here is the command line output when i run bjam:

/usr/share/boost-build/tools/symlink.jam:115: in symlink.ln
*** argument error
* rule path.make ( native )
* called with: (  )
* missing argument native
/usr/share/boost-build/util/path.jam:508:see definition of rule 'path.make' being called
/usr/share/boost-build/kernel/modules.jam:107: in modules.call-in
/usr/share/boost-build/util/indirect.jam:98: in indirect.call
/usr/share/boost-build/build/virtual-target.jam:794: in class@action.actualize
/usr/share/boost-build/build/virtual-target.jam:311: in actualize-action
/usr/share/boost-build/build/virtual-target.jam:493: in actualize-no-scanner
/usr/share/boost-build/build/virtual-target.jam:134: in class@virtual-target.actualize
/home/camt/dev/glbranch/avionics/glsgen.jam:292: in class@gls-generator.run
/usr/share/boost-build/build/generators.jam:994: in try-one-generator-really
/usr/share/boost-build/build/generators.jam:1056: in try-one-generator
/usr/share/boost-build/build/generators.jam:1294: in construct-really
/usr/share/boost-build/build/generators.jam:1378: in construct
/usr/share/boost-build/build/generators.jam:1069: in generators.construct-types
/usr/share/boost-build/build/generators.jam:609: in convert-to-consumable-types
/usr/share/boost-build/build/generators.jam:405: in run-really
/usr/share/boost-build/build/generators.jam:386: in class@generator.run
/usr/share/boost-build/build/generators.jam:994: in try-one-generator-really
/usr/share/boost-build/build/generators.jam:1056: in try-one-generator
/usr/share/boost-build/build/generators.jam:1294: in construct-really
/usr/share/boost-build/build/generators.jam:1378: in construct
/usr/share/boost-build/build/generators.jam:1069: in generators.construct-types
/usr/share/boost-build/build/generators.jam:652: in convert-multiple-sources-to-consumable-types
/usr/share/boost-build/build/generators.jam:400: in run-really
/usr/share/boost-build/build/generators.jam:386: in generator.run
/usr/share/boost-build/tools/builtin.jam:798: in linking-generator.run
/usr/share/boost-build/tools/unix.jam:41: in unix-linking-generator.run
/usr/share/boost-build/tools/gcc.jam:689: in class@gcc-linking-generator.run
/usr/share/boost-build/build/generators.jam:994: in try-one-generator-really
/usr/share/boost-build/build/generators.jam:1056: in try-one-generator
/usr/share/boost-build/build/generators.jam:1294: in construct-really
/usr/share/boost-build/build/generators.jam:1378: in generators.construct
/usr/share/boost-build/tools/builtin.jam:482: in class@lib-generator.run
/usr/share/boost-build/build/generators.jam:994: in try-one-generator-really
/usr/share/boost-build/build/generators.jam:1056: in try-one-generator
/usr/share/boost-build/build/generators.jam:1294: in construct-really
/usr/share/boost-build/build/generators.jam:1378: in generators.construct
/usr/share/boost-build/build/targets.jam:1532: in construct
/usr/share/boost-build/build/targets.jam:1332: in class@basic-target.generate
/usr/share/boost-build/build/targets.jam:757: in generate-really
/usr/share/boost-build/build/targets.jam:729: in class@main-target.generate
/usr/share/boost-build/build/targets.jam:272: in class@project-target.generate
/usr/share/boost-build/build/targets.jam:874: in targets.generate-from-reference
/usr/share/boost-build/build/targets.jam:1245: in generate-dependencies
/usr/share/boost-build/build/targets.jam:1299: in class@basic-target.generate
/usr/share/boost-build/build/targets.jam:757: in generate-really
/usr/share/boost-build/build/targets.jam:729: in class@main-target.generate
/usr/share/boost-build/build/targets.jam:272: in class@project-target.generate
/usr/share/boost-build/build/targets.jam:874: in targets.generate-from-reference
/usr/share/boost-build/build/targets.jam:1245: in generate-dependencies
/usr/share/boost-build/build/targets.jam:1302: in class@basic-target.generate
/usr/share/boost-build/build/targets.jam:757: in generate-really
/usr/share/boost-build/build/targets.jam:729: in class@main-target.generate
/usr/share/boost-build/build/targets.jam:272: in class@project-target.generate
/usr/share/boost-build/build/targets.jam:874: in targets.generate-from-reference
/usr/share/boost-build/build/targets.jam:1245: in generate-dependencies
/usr/share/boost-build/build/targets.jam:1302: in class@basic-target.generate
/usr/share/boost-build/build/targets.jam:757: in generate-really
/usr/share/boost-build/build/targets.jam:729: in class@main-target.generate
/usr/share/boost-build/build/targets.jam:272: in class@project-target.generate
/usr/share/boost-build/build-system.jam:707: in load
/usr/share/boost-build/kernel/modules.jam:289: in import
/usr/share/boost-build/kernel/bootstrap.jam:139: in boost-build
/usr/share/boost-build/boost-build.jam:8: in module scope


I bolded the only file that isnt in the boost-build set.  This is the code block around that line error:

for local force_gen_file in $(force_gen_files)
        {
            local vt = [ virtual-target.register $(force_gen_file) ] ;

            DEPENDS all : [ $(vt).actualize ] ;

            virtual_targets += $(vt) ;
        }

Since I am new at bjam and boost build I am unclear of everything we are doing but at this point I think we are trying to force generated files to be compiled.  Any help onwhy this would no longer work would be great.

System info:
Ubuntu 14.04 64bit
libboost1.54-tools-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bjam Update error in actualize?

Kcarr
All I have been able to get a little further.  It seems the problem lies with calling the $(vt).actualize.  What gets.  So in this loop:

for local force_gen_file in $(force_gen_files)
        {
            local vt = [ virtual-target.register $(force_gen_file) ] ;

            DEPENDS all : [ $(vt).actualize ] ;

            virtual_targets += $(vt) ;
        }

A symlink file gets passed in which causes the error on the .actualize.  Here is how i generate the symlink:

                    local header_symlink =
                        [ new file-target
                              $(base_name)
                            : H
                            : $(project)
                            : [ new action
                                  $(generated_h)
                                : symlink.ln
                                : $(property-set) ]
                            : $(project_inc_dir) ] ;

The header_symlink is added to the force_gen_files list that is passed in to the for loop.  generated_h is created by this code before the previous code:

                local generated_h =
                    [ new file-target $(base_name)
                        : H
                        : $(project)
                        : $(generate_h_action)
                        : $(project_src_dir) ] ;

When it hits the symlink it crashes with the below.

/usr/share/boost-build/tools/symlink.jam:115: in symlink.ln
*** argument error
* rule path.make ( native )
* called with: (  )
* missing argument native
/usr/share/boost-build/util/path.jam:508:see definition of rule 'path.make' being called
/usr/share/boost-build/kernel/modules.jam:107: in modules.call-in
/usr/share/boost-build/util/indirect.jam:98: in indirect.call

As I mentioned this worked before so I dont know if there is a bug in the symlink generation code now?  The only way I know how to make it actually create the symlink is to call actualize on it.  Is there another way?
Reply | Threaded
Open this post in threaded view
|

Re: Bjam Update error in actualize?

Vladimir Prus
On 05/23/2014 09:51 PM, Kcarr wrote:

> All I have been able to get a little further.  It seems the problem lies with
> calling the $(vt).actualize.  What gets.  So in this loop:
>
> for local force_gen_file in $(force_gen_files)
>          {
>              local vt = [ virtual-target.register $(force_gen_file) ] ;
>
>              DEPENDS all : [ $(vt).actualize ] ;
>
>              virtual_targets += $(vt) ;
>          }
>
> A symlink file gets passed in which causes the error on the .actualize.
> Here is how i generate the symlink:
>
>                      local header_symlink =
>                          [ new file-target
>                                $(base_name)
>                              : H
>                              : $(project)
>                              : [ new action
>                                    $(generated_h)
>                                  : symlink.ln
>                                  : $(property-set) ]
>                              : $(project_inc_dir) ] ;
>
> The header_symlink is added to the force_gen_files list that is passed in to
> the for loop.  generated_h is created by this code before the previous code:
>
>                  local generated_h =
>                      [ new file-target $(base_name)
>                          : H
>                          : $(project)
>                          : $(generate_h_action)
>                          : $(project_src_dir) ] ;
>
> When it hits the symlink it crashes with the below.
>
> /usr/share/boost-build/tools/symlink.jam:115: in symlink.ln
> *** argument error
> * rule path.make ( native )
> * called with: (  )
> * missing argument native
> /usr/share/boost-build/util/path.jam:508:see definition of rule 'path.make'
> being called
> /usr/share/boost-build/kernel/modules.jam:107: in modules.call-in
> /usr/share/boost-build/util/indirect.jam:98: in indirect.call
>
> As I mentioned this worked before so I dont know if there is a bug in the
> symlink generation code now?  The only way I know how to make it actually
> create the symlink is to call actualize on it.  Is there another way?

Hi,

as I've said on IRC (possibly the message got lost due to disconnect on either side),
you better first try to remove your loop altogether - using explicit DEPENDS should
not be necessary and if it is, it's best to fix the real problem.

Otherwise, the error appears to be caused by the fact that the expression

        [ on $(>) return $(LOCATE) ]

where $(>) is source of symlink action returns empty string. May I suggest you modify
symlink.jam:ln to have this:

        if ! [ on $(>) return $(LOCATE) ] {
                ECHO "NO LOCATE: $(>)" ;
        }

and confirm it's indeed you generated_h target that is problematic?


- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Bjam Update error in actualize?

Kcarr
Volodya,

I had responded in IRC but as you mentioned Im sure it got lost in a DC somewhere.  I tried to remove the loop but the actualize is what causes the call to be made later for the actions.  The DEPENDS seems to be needed otherwise it doesn't think the target to build is dependent on the generated files.  So without the depends it wont compile as the cpp/h files don't get generated first.

I added your comments in the symlink.jam file and did some compares to the old boost build.  You were right the source doesn't exist when it gets into the path checking.  The problem is the source is the generated file.  Until the action is ran from bjam the source will not exist.  It looks like the old boost build did not do this check for the path.  The path will exist once the action takes place and the generator creates the cpp and h.  Is there a way to work around this?

Thanks again for all the help.

Kip Carr Jr.
Sr. Software Engineer and Gaming
407.381.5311 ext. 114 (office)
863.221.2022 (cell)
[hidden email]

-----Original Message-----
From: Boost-build [mailto:[hidden email]] On Behalf Of Vladimir Prus
Sent: Monday, May 26, 2014 12:44 AM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] Bjam Update error in actualize?

On 05/23/2014 09:51 PM, Kcarr wrote:

> All I have been able to get a little further.  It seems the problem
> lies with calling the $(vt).actualize.  What gets.  So in this loop:
>
> for local force_gen_file in $(force_gen_files)
>          {
>              local vt = [ virtual-target.register $(force_gen_file) ]
> ;
>
>              DEPENDS all : [ $(vt).actualize ] ;
>
>              virtual_targets += $(vt) ;
>          }
>
> A symlink file gets passed in which causes the error on the .actualize.
> Here is how i generate the symlink:
>
>                      local header_symlink =
>                          [ new file-target
>                                $(base_name)
>                              : H
>                              : $(project)
>                              : [ new action
>                                    $(generated_h)
>                                  : symlink.ln
>                                  : $(property-set) ]
>                              : $(project_inc_dir) ] ;
>
> The header_symlink is added to the force_gen_files list that is passed
> in to the for loop.  generated_h is created by this code before the previous code:
>
>                  local generated_h =
>                      [ new file-target $(base_name)
>                          : H
>                          : $(project)
>                          : $(generate_h_action)
>                          : $(project_src_dir) ] ;
>
> When it hits the symlink it crashes with the below.
>
> /usr/share/boost-build/tools/symlink.jam:115: in symlink.ln
> *** argument error
> * rule path.make ( native )
> * called with: (  )
> * missing argument native
> /usr/share/boost-build/util/path.jam:508:see definition of rule 'path.make'
> being called
> /usr/share/boost-build/kernel/modules.jam:107: in modules.call-in
> /usr/share/boost-build/util/indirect.jam:98: in indirect.call
>
> As I mentioned this worked before so I dont know if there is a bug in
> the symlink generation code now?  The only way I know how to make it
> actually create the symlink is to call actualize on it.  Is there another way?

Hi,

as I've said on IRC (possibly the message got lost due to disconnect on either side), you better first try to remove your loop altogether - using explicit DEPENDS should not be necessary and if it is, it's best to fix the real problem.

Otherwise, the error appears to be caused by the fact that the expression

        [ on $(>) return $(LOCATE) ]

where $(>) is source of symlink action returns empty string. May I suggest you modify symlink.jam:ln to have this:

        if ! [ on $(>) return $(LOCATE) ] {
                ECHO "NO LOCATE: $(>)" ;
        }

and confirm it's indeed you generated_h target that is problematic?


- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Bjam Update error in actualize?

Kcarr
In reply to this post by Vladimir Prus
Sorry to reply again but I am still trying stuff while I see about responses.  I added my print statements to the old boost build as well as the new and here are the differences.  Perhaps this could help explain the problem some:

NEW BOOST:
in LOCATE: <p../../ah64/common/virtual_grips/include>AH64_GripCollective.h
out LOCATE: <p../../ah64/common/virtual_grips/src-object(c-scanner)@1248>AH64_GripCollective.h
NO LOCATE: <p../../ah64/common/virtual_grips/src-object(c-scanner)@1248>AH64_GripCollective.h
/usr/share/boost-build/tools/symlink.jam:130: in symlink.ln
*** argument error
* rule path.make ( native )
* called with: (  )
* missing argument native

OLD BOOST:
in LOCATE: <p../../ah64/common/virtual_grips/include>AH64_GripCollective.h
out LOCATE: <p../../ah64/common/virtual_grips/src>AH64_GripCollective.h


Not sure what all the c-scanner stuff is in there now.

-Kip


-----Original Message-----
From: Boost-build [mailto:[hidden email]] On Behalf Of Vladimir Prus
Sent: Monday, May 26, 2014 12:44 AM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] Bjam Update error in actualize?

On 05/23/2014 09:51 PM, Kcarr wrote:

> All I have been able to get a little further.  It seems the problem
> lies with calling the $(vt).actualize.  What gets.  So in this loop:
>
> for local force_gen_file in $(force_gen_files)
>          {
>              local vt = [ virtual-target.register $(force_gen_file) ]
> ;
>
>              DEPENDS all : [ $(vt).actualize ] ;
>
>              virtual_targets += $(vt) ;
>          }
>
> A symlink file gets passed in which causes the error on the .actualize.
> Here is how i generate the symlink:
>
>                      local header_symlink =
>                          [ new file-target
>                                $(base_name)
>                              : H
>                              : $(project)
>                              : [ new action
>                                    $(generated_h)
>                                  : symlink.ln
>                                  : $(property-set) ]
>                              : $(project_inc_dir) ] ;
>
> The header_symlink is added to the force_gen_files list that is passed
> in to the for loop.  generated_h is created by this code before the previous code:
>
>                  local generated_h =
>                      [ new file-target $(base_name)
>                          : H
>                          : $(project)
>                          : $(generate_h_action)
>                          : $(project_src_dir) ] ;
>
> When it hits the symlink it crashes with the below.
>
> /usr/share/boost-build/tools/symlink.jam:115: in symlink.ln
> *** argument error
> * rule path.make ( native )
> * called with: (  )
> * missing argument native
> /usr/share/boost-build/util/path.jam:508:see definition of rule 'path.make'
> being called
> /usr/share/boost-build/kernel/modules.jam:107: in modules.call-in
> /usr/share/boost-build/util/indirect.jam:98: in indirect.call
>
> As I mentioned this worked before so I dont know if there is a bug in
> the symlink generation code now?  The only way I know how to make it
> actually create the symlink is to call actualize on it.  Is there another way?

Hi,

as I've said on IRC (possibly the message got lost due to disconnect on either side), you better first try to remove your loop altogether - using explicit DEPENDS should not be necessary and if it is, it's best to fix the real problem.

Otherwise, the error appears to be caused by the fact that the expression

        [ on $(>) return $(LOCATE) ]

where $(>) is source of symlink action returns empty string. May I suggest you modify symlink.jam:ln to have this:

        if ! [ on $(>) return $(LOCATE) ] {
                ECHO "NO LOCATE: $(>)" ;
        }

and confirm it's indeed you generated_h target that is problematic?


- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Bjam Update error in actualize?

Kcarr
In reply to this post by Vladimir Prus
Hi,

Found out a bit more info.  I was able to get a PC loaded up with Ubuntu 13 which has more versions of boost build available.  I have isolated the problem to something in 1.54 and up.  The .jam file I sent works in 1.49, 1.51, and 1.53.  I tried to look at the changelist for 1.54 but I cannot see any differences related to symlinks, paths or any other file that gets called out in the error dump.  I am going to try and do some diffs on the boost directory and see if I can find anything that might point to the problem.  I don't know if this is a bug in the latests builds or if it was a change to how something is called that wasn't listed in the changelist.  If anyone has any ideas I would appreciate them :)  
Thanks!

- Kip
-----Original Message-----
From: Boost-build [mailto:[hidden email]] On Behalf Of Vladimir Prus
Sent: Monday, May 26, 2014 12:44 AM
To: Boost.Build developer's and user's list
Subject: Re: [Boost-build] Bjam Update error in actualize?

On 05/23/2014 09:51 PM, Kcarr wrote:

> All I have been able to get a little further.  It seems the problem
> lies with calling the $(vt).actualize.  What gets.  So in this loop:
>
> for local force_gen_file in $(force_gen_files)
>          {
>              local vt = [ virtual-target.register $(force_gen_file) ]
> ;
>
>              DEPENDS all : [ $(vt).actualize ] ;
>
>              virtual_targets += $(vt) ;
>          }
>
> A symlink file gets passed in which causes the error on the .actualize.
> Here is how i generate the symlink:
>
>                      local header_symlink =
>                          [ new file-target
>                                $(base_name)
>                              : H
>                              : $(project)
>                              : [ new action
>                                    $(generated_h)
>                                  : symlink.ln
>                                  : $(property-set) ]
>                              : $(project_inc_dir) ] ;
>
> The header_symlink is added to the force_gen_files list that is passed
> in to the for loop.  generated_h is created by this code before the previous code:
>
>                  local generated_h =
>                      [ new file-target $(base_name)
>                          : H
>                          : $(project)
>                          : $(generate_h_action)
>                          : $(project_src_dir) ] ;
>
> When it hits the symlink it crashes with the below.
>
> /usr/share/boost-build/tools/symlink.jam:115: in symlink.ln
> *** argument error
> * rule path.make ( native )
> * called with: (  )
> * missing argument native
> /usr/share/boost-build/util/path.jam:508:see definition of rule 'path.make'
> being called
> /usr/share/boost-build/kernel/modules.jam:107: in modules.call-in
> /usr/share/boost-build/util/indirect.jam:98: in indirect.call
>
> As I mentioned this worked before so I dont know if there is a bug in
> the symlink generation code now?  The only way I know how to make it
> actually create the symlink is to call actualize on it.  Is there another way?

Hi,

as I've said on IRC (possibly the message got lost due to disconnect on either side), you better first try to remove your loop altogether - using explicit DEPENDS should not be necessary and if it is, it's best to fix the real problem.

Otherwise, the error appears to be caused by the fact that the expression

        [ on $(>) return $(LOCATE) ]

where $(>) is source of symlink action returns empty string. May I suggest you modify symlink.jam:ln to have this:

        if ! [ on $(>) return $(LOCATE) ] {
                ECHO "NO LOCATE: $(>)" ;
        }

and confirm it's indeed you generated_h target that is problematic?


- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Bjam Update error in actualize?

Kcarr
In reply to this post by Vladimir Prus
I have found the cause of my problem but I am unsure of what it was added.  In 1.54 in the virtual-target.jam file in the rule actualize-location (target) there was an added check at the beginning for scanner-target.

    if $(self.action) && ! $(is-scanner-target)

This new code causes LOCATE var to never be set.  If I comment out the new check as it was in 1.53 and it works again.  There is a huge comment in the code about scanner targets but I am not sure what it is refering to.  I have setup a simple test case that will recreate the jam crash.  Create a folder and copy the below into a jam file.  I have an empty Jamroot.  This will run in 1.53 but fail in 1.54:

ECHO "This will test symlink...." ;
import "class" : new ;
import virtual-target ;

#setup vars
local base_name = base ;
local project = test_proj ;
local project_src_dir  = src ;
local project_inc_dir  = include ;

local h_action = [ new null-action $(property-set) ] ;

local h_file =
        [ new file-target $(base_name)
                : H
                : $(project)
                : $(h_action)
                : $(project_src_dir) ] ;

local header_symlink =
        [ new file-target
                  $(base_name)
                : H
                : $(project)
                : [ new action
                          $(h_file)
                        : symlink.ln
                        : $(property-set) ]
                : $(project_inc_dir) ] ;

local vt = [ virtual-target.register $(header_symlink) ] ;

$(vt).actualize ;


I had a blank .h file in a src folder and an empty include folder but that didnt seem to change anything for the run.

This seems to be a bug in the new build with using LOCATE in the symlink.jam file when it shouldnt be used and instead SEARCH var should be used.  But again I am not sure, there seems to be more to it.

-Kip
Reply | Threaded
Open this post in threaded view
|

Re: Bjam Update error in actualize?

Steven Watanabe-4
AMDG

On 06/02/2014 02:31 PM, Kcarr wrote:

> I have found the cause of my problem but I am unsure of what it was added.
> In 1.54 in the virtual-target.jam file in the rule actualize-location
> (target) there was an added check at the beginning for scanner-target.
>
>     if $(self.action) &&* ! $(is-scanner-target)*
>
> This new code causes LOCATE var to never be set. <snip>
>
> <snip>
> This seems to be a bug in the new build with using LOCATE in the symlink.jam
> file when it shouldnt be used and instead SEARCH var should be used.  But
> again I am not sure, there seems to be more to it.
>

Right.  Can you create a ticket at https://svn.boost.org/
It should actually check both SEARCH and LOCATE

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build