Boost logo

Boost-Build :

From: Ali Azarbayejani (ali_at_[hidden])
Date: 2003-03-11 11:54:07


Vladimir,

Vladimir Prus wrote:
>
> The problem is that <find-shared-library> is not supposed to be used by
> users -- it's not even feature in V2. The docs should describe prebuilt
> libraries, and the <library> property, which are the solution.
>
> lib X11 : : <name>X11 ;
> exe hello : hello.cpp : <os>LINUX:<library>X11 ;
>
> Let me know if this works for you.

Thanks for the clarification. I will use the Prebuilt Libraries
protocol for this case.

The above works (i.e. the conditional property is in the Requirements
of "hello", where "hello"->"X11").

However, what I am trying to do does NOT work, i.e. put the same
Conditional Property in the Usage Requirements of a library,
i.e. "myhello"->"mylib"->"X11", where "mylib" has the Usage
Requirement of library "X11".

Here is the Jamfile. I have attached the entire use case as well so
you can try it. Please let me know if this is improper usage or if it
is a bug.

Thanks,
--Ali

--------------------------------------------------

# Jamfile to illustrate bug in Conditional Property in Usage
Requirements

# "Prebuilt Target"
lib X11 : : <name>X11 <search>/usr/X11R6/lib ;

# Executable uses the Prebuilt Target as Requirement either directly
# or conditionally (works)
exe hello : hello.cxx : <library>X11 ;
exe hello2 : hello.cxx : <os>LINUX:<library>X11 ;

# Library specifies Prebuilt as conditional Usage Requirement
lib mylib : myclass.cxx : : : <library>X11 ;
lib mylib2 : myclass.cxx : : : <os>LINUX:<library>X11 ;

# Executable uses the Library with direct Usage Requirement (works)
exe myhello : myhello.cxx mylib : <hardcode-dll-paths>true ;

# Executable uses the Library with conditional Usage Requirement (DON"T
WORK)
# See bjam output below
exe myhello2 : myhello.cxx mylib2 : <hardcode-dll-paths>true ;

# > bjam
# ...found 28 targets...
# ...updating 14 targets...
# MkDir1 bin
# MkDir1 bin/gcc
# MkDir1 bin/gcc/debug
# gcc.compile bin/gcc/debug/hello.o
# gcc.link bin/gcc/debug/hello
# gcc.link bin/gcc/debug/hello2
# gcc.compile bin/gcc/debug/myclass.o
# gcc.link-dll bin/gcc/debug/mylib.so
# gcc.link-dll bin/gcc/debug/mylib2.so
# gcc.compile bin/gcc/debug/myhello.o
# gcc.link bin/gcc/debug/myhello
# MkDir1 bin/gcc/debug/os-LINUX:<library>X11
# /bin/sh: library: No such file or directory

# mkdir bin/gcc/debug/os-LINUX:<library>X11

# ...failed MkDir1 bin/gcc/debug/os-LINUX:<library>X11...
# ...skipped <./gcc/debug/os-LINUX:<library>X11>myhello.o for lack of
bin/gcc/debug/os-LINUX:<library>X11...
# ...skipped <./gcc/debug/os-LINUX:<library>X11>myhello2 for lack of
bin/gcc/debug/os-LINUX:<library>X11...
# ...failed updating 1 target...
# ...skipped 2 targets...
# ...updated 11 targets... --------------B03F078E5B745C479A0872F6 Content-Type: application/x-gzip;
name="cond-prop-bug.tar.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="cond-prop-bug.tar.gz"

[Attachment content not displayed.] --------------B03F078E5B745C479A0872F6--


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