Re: Jam warning "using independent target"
Brendon Costa <bcosta <at> avdat.com.au>
2007-03-13 01:42:26 GMT
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
>>
>
_______________________________________________
jamming mailing list - jamming <at> perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming