« Return to Thread: Unable to link with Apache lib

Re: Unable to link with Apache lib

by Vladimir Prus :: Rate this Message:

Reply to Author | View in Thread

On Saturday 27 June 2009 Anant Rao wrote:

> Hi,
>
> I'm unable to get this simple thing working. My requirement is to link with Apache lib. I tried 2, 3 cases, both don't work.
>
> 1.
> path-constant SRC2  : "../shared/processors/src" ;
> path-constant SRC3  : "../shared/processors/phrasecountfeature/src" ;
> path-constant SRC4  : "../../../../ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs" ;
>
> project phrasecountfeature
>    : source-location $(SRC1) $(SRC2) $(SRC3)
>
> searched-lib apr : : <name>libapr-1.a <file>/home/arao/SLDS/Master_Repo/dev/ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs ;

I don't believe that

        /home/arao/SLDS/Master_Repo/dev/ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs

is a file -- it's a directory. Therefore, you have to use:

   searched-lib apr : : <name>libapr-1.a <search>/home/arao/SLDS/Master_Repo/dev/ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs ;

> 2.
> path-constant SRC2  : "../shared/processors/src" ;
> path-constant SRC3  : "../shared/processors/phrasecountfeature/src" ;
> path-constant SRC4  : "../../../../ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs" ;
>
> project phrasecountfeature
>    : source-location $(SRC1) $(SRC2) $(SRC3)
>    : requirements <library>../../../../ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs/libapr-1.a
>    ;
>
> searched-lib apr : : <name>libapr-1.a <file>/home/arao/SLDS/Master_Repo/dev/ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs ;
>
> lib libphrasecountfeature
>    :
>    phrasecountfeaturedll.cpp
>    PhraseCountFeatureExtractor.cpp
>    processor_modules_common.cpp
>    apr
>    : <define>$(DEFINES) : <link>shared ;
>
> RESULT:
> error: Unable to find file or target named
> error:     '/home/arao/SLDS/Master_Repo/dev/ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs'
> error: referred from project at
> error:     '.'

This has the same problem as the first example.

> 3.
> path-constant SRC2  : "../shared/processors/src" ;
> path-constant SRC3  : "../shared/processors/phrasecountfeature/src" ;
> path-constant SRC4  : "../../../../ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs" ;
>
> project phrasecountfeature
>    : source-location $(SRC1) $(SRC2) $(SRC3)
>
> lib libphrasecountfeature
>    :
>    phrasecountfeaturedll.cpp
>    PhraseCountFeatureExtractor.cpp
>    processor_modules_common.cpp
>    /home/arao/SLDS/Master_Repo/dev/ThirdParty/Apache/2.2.11/httpd-2.2.11/srclib/apr/.libs/libapr-1.a
>    : <define>$(DEFINES) : <link>shared ;

Did you actually mean to use <link>shared as the value for the 'default-build' parameter?
 
> RESULT:
> This builds ok, but it doesn't really link in the Apache lib.

I am unsure what is wrong here -- though one likely reason is that you're building
everything statically, and static library cannot use another static library as source.
Anyway, the suggested fix for (1) should work.

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

 « Return to Thread: Unable to link with Apache lib