Boost logo

Boost-Build :

Subject: Re: [Boost-build] Bjam Update error in actualize?
From: Kip Carr (kcarr_at_[hidden])
Date: 2014-05-27 09:52:02


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)
kcarr_at_[hidden]

-----Original Message-----
From: Boost-build [mailto:boost-build-bounces_at_[hidden]] 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


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