Results 1 to 6 of 6

Thread: Need to specify path to library which is installed by a BuildRequires dependency

  1. #1

    Default Need to specify path to library which is installed by a BuildRequires dependency

    Hey all,

    I'm fairly new to writing spec files and the Open Build Service and I wonder if somebody can clue me in here. I am writing a specfile that requires some libraries from Boost, which is a package I built on the OBS. This package provides a specific library, /usr/lib/libboost_thread.so, which I must specify as a parameter to configure. The relevant lines are:

    Code:
    BuildRequires: boost
    %configure --prefix=/usr/local --with-eigen=/usr/include/eigen --with-boost=/usr/include/boost --with-boost-thread=/usr/lib/libboost_thread.so
    make
    
    Locally, this works because the boost package installs the library to that directory and then it is found during the make; however, on the OBS, I get this:

    Code:
    [  142s] g++: /usr/lib/libboost_thread.so: No such file or directory
    
    Any help is appreciated!


    Mario

  2. #2
    Join Date
    Jun 2008
    Location
    Düsseldorf/Germany
    Posts
    283

    Default Re: Need to specify path to library which is installed by a BuildRequires dependency

    I dont know about boost, but a quick search via zypper shows that there is no package named boost. maybe you have to use boost-devel?

  3. #3

    Default Re: Need to specify path to library which is installed by a BuildRequires dependency

    Quote Originally Posted by DocB View Post
    I dont know about boost, but a quick search via zypper shows that there is no package named boost. maybe you have to use boost-devel?
    Well in this case I've built the boost package using the Open Build Service, so it's hosted in the same project as the new package I'm trying to build -- there is an official package for openSUSE but I'm trying to build for CentOS so I figured I'd build my own. Looks like I could learn a thing or two from the official specfile though in any event.

    Any other ideas welcome!

  4. #4

    Default Re: Need to specify path to library which is installed by a BuildRequires dependency

    Maybe I can rephrase the question:

    Does anyone know how to manually specify the path to a system file from within a spec file?

    Should something like %configure --lib-path=/usr/bin/library.so work properly or do I need to do something special to reference the actual system path? I mean to say, I type %configure --with-boost-thread=/usr/lib/libboost_thread.so but perhaps `/usr` in this context refers to %{_builddir}/usr or something similar -- like my root is not where I think it is?



    Mario

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,325
    Blog Entries
    15

    Default Re: Need to specify path to library which is installed by aBuildRequires dependency

    On Wed 11 Dec 2013 03:36:01 PM CST, mariogiov wrote:


    Maybe I can rephrase the question:

    Does anyone know how to manually specify the path to a system file from
    within a spec file?

    Should something like %configure --lib-path=/usr/bin/library.so work
    properly or do I need to do something special to reference the actual
    system path? I mean to say, I type %configure
    --with-boost-thread=/usr/lib/libboost_thread.so but perhaps `/usr` in
    this context refers to %{_builddir}/usr or something similar -- like my
    root is not where I think it is?



    Mario


    Hi
    If you add the library as a BuildRequires, it will install in the build
    environment 'BuildRoot' is the option to add the library link exist in
    the configure script?

    What arch are you building? If i586 you shouldn't need to do anything
    as it exists in the 'BuildRoot' as defined in the spec file.

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SLED 11 SP3 (x86_64) GNOME 2.28.0 Kernel 3.0.101-0.8-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  6. #6

    Default Re: Need to specify path to library which is installed by a BuildRequires dependency

    Alright well it turns out I was being a moron, was the real problem. I forgot that I was building static boost libraries, so there was no .so file at all. Everybody go about your business, nothing to see here.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •