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:
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:
142s] g++: /usr/lib/libboost_thread.so: No such file or directory
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.
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?
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.
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!