[jamming] Jam warning "using independent target"
Diane Holt
holt.diane at gmail.com
Mon Mar 12 18:44:15 PST 2007
Get rid of this bit: bind LFLAGS
"bind" tells the actions to use the bound path of the value(s) of the var.
Eg., if NEEDLIBS is set to foo.so, in the actions it would be
/path/to/your/foo.so -- if EXTRAOBJECTS is set to foo.o, in the actions it
would be /path/to/your/foo.o -- but I can't think what sort of value LFLAGS
would be that would have an unbound value in the var and a bound value in
the actions :)
And if you ask Jam to bind it, and it can't, then it warns you about that.
It will also issue that warning for a file that it can bind, if you don't
have a dependency for the file on the target. Your NEEDLIBS and EXTRAOBJECTS
are both bound and dependencies of your LinkApplication target, so it
doesn't warn about those -- but LFLAGS is neither bound nor a dependency --
it's just some string getting passed to the linker (the particular value of
which is "attached" -- ie., set "on" -- the target, not "bind"ed to it,
since "bind" doesn't mean that.)
Diane
On 3/12/07, Brendon Costa <bcosta at avdat.com.au> wrote:
>
> Thanks for the reply,
>
> The flags are being passed to the action using the on binding. The
> action I thought was relevant I decided to echo the parameters passed
> to it like:
>
> actions LinkApplication bind NEEDLIBS bind EXTRAOBJECTS bind LFLAGS
> {
> echo "1: " $(<)
> echo "2: " $(>)
> echo "EO: " $(EXTRAOBJECTS)
> echo "NL: " $(NEEDLIBS)
> echo "LF: " $(LFLAGS)
> echo "LL: " $(LINKLIBS)
> $(CMD.LINK) -o $(<) $(>) $(EXTRAOBJECTS) $(NEEDLIBS) $(LFLAGS)
> $(LINKLIBS)
> }
>
> An this displays what i would expect. The LFLAGS are being passed into
> the action using the on target format...
>
> ...patience...
> ...found 1120 target(s)...
> ...updating 1 target(s)...
> warning: using independent target -L/home/bcosta/build/install/lib
> -lADS_Utils -Wl,--rpath -Wl,/usr/pkg/lib -lfreetype
> -Wl,-rpath,/usr/pkg/lib -lSDL -lossaudio -lpthread -Wl,-R/usr/pkg/lib
> -Wl,-R/usr/X11R6/lib -lXext -laa-x11 -lm -L/usr/X11R6/lib -lX11
> -lusbhid -L/usr/pkg/lib -lpng -lz
> LinkApplication io_module_simulator
> 1: io_module_simulator
> 2:
> ./out/i386-unknown-netbsdelf3.0
> /debug/src/apps/io_module_simulator/IOModuleServerLCDCallbackImpl.o
> ./out/i386-unknown-netbsdelf3.0
> /debug/src/apps/io_module_simulator/iomodule_sdl_canvas.o
> ./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/main.o
> ./out/i386-unknown-netbsdelf3.0/debug/src/apps/io_module_simulator/misc.o
> EO:
> NL: ./out/i386-unknown-netbsdelf3.0/debug/libs/libADS_MPRTInterface.a
> LF: -L/home/bcosta/build/install/lib -lADS_Utils -Wl,--rpath
> -Wl,/usr/pkg/lib -lfreetype -Wl,-rpath,/usr/pkg/lib -lSDL -lossaudio
> -lpthread -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R6/lib -lXext -laa-x11 -lm
> -L/usr/X11R6/lib -lX11 -lusbhid -L/usr/pkg/lib -lpng -lz
> LL:
>
>
> Is this particular warning specific to actions or can it occur as a
> result of passing arguments to a rule? (Just trying to narrow down
> location that could be causing the problem).
>
> Is there a method of finding a list of all actions and what are being
> passed to them? Maybe I can search through those to see if any other
> actions are somehow being invoked with those LFLAGS as a second parameter.
>
> Thanks,
> Brendon.
>
>
> Diane Holt wrote:
> > Are you passing the flags themselves to the actions? If you are, don't
> :)
> > Set them "on" the target instead.
> >
> > Diane
> >
> > On 3/8/07, Brendon Costa <bcosta at avdat.com.au> wrote:
> >>
> >> Hi All,
> >>
> >> I have a set of jam scripts (I am using a modified version of Crystal
> >> Spaces jam build system). I just made a few changes and they seem to
> >> work fine, but while compiling I get a number of messages like:
> >>
> >> warning: using independent target -lADS_VDLm2 -L/usr/local/lib ...
> >>
> >> I read on the web that this has something to do with jam assuming that
> >> either the first or second parameters to a rule are actually targets.
> >> If for example I have a rule: AppendNonDupFlags
> >>
> >> Where the first arg $(<) is a list of strings of flags that exist for
> >> a current target and the second arg $(>) is a single string containing
> >> a set of flags that I want to append to $(<) but removing duplicates
> >> from $(<) that exist in $(>) I.e. keeping the rightmost duplicate
> >> after appending.
> >>
> >> Will jam treat the second argument $(>) as a target and thus cause
> >> this warning or should I be looking elsewhere for the problem?
> >>
> >> If so how can I get jam to treat $(>) as a non-target. I.e. it is just
> >> a string of linker flags that is being manipulated not a target?
> >>
> >>
> >> P.s. I tried using jam -d4 and see what occurs around this warning,
> >> but it did not show anything useful...
> >>
> >> Thanks,
> >> Brendon.
> >>
> >>
> >>
> >> _______________________________________________
> >> jamming mailing list - jamming at perforce.com
> >> http://maillist.perforce.com/mailman/listinfo/jamming
> >>
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://maillist.perforce.com/pipermail/jamming/attachments/20070312/912cf83d/attachment.html
More information about the jamming
mailing list