Fedora Linux Support Community & Resources Center
Old 10th April 2012, 10:44 AM
icyboy Offline
Registered User
Join Date: May 2011
Posts: 10
[SOLVED]how to use export CXXFLAGS in spec file?

i need to mock rebuild a rb_libtorrent RPM for EL5.8 but here comes the problem,rb_libtorrent requires boost version greater than 1.39 so i get boost1.41 installed in /usr/include/boost141 & boost libs in /usr/lib.

the official rb_libtorrent manual wrote:
Step 2: Running configure

In your shell, change directory to the libtorrent directory and run ./configure. This will look for libraries and C++ features that libtorrent is dependent on. If something is missing or can't be found it will print an error telling you what failed.

The most likely problem you may encounter is that the configure script won't find the boost libraries. Make sure you have boost installed on your system. The easiest way to install boost is usually to use the preferred package system on your platform. Usually libraries and headers are installed in standard directories where the compiler will find them, but sometimes that may not be the case. For example when installing boost on darwin using darwinports (the package system based on BSD ports) all libraries are installed to /opt/local/lib and headers are installed to /opt/local/include. By default the compiler will not look in these directories. You have to set the enviornment variables LDFLAGS and CXXFLAGS in order to make the compiler find those libs. In this example you'd set them like this:

export LDFLAGS=-L/opt/local/lib
export CXXFLAGS=-I/opt/local/include

so how do i add"export CXXFLAGS=-I/usr/include/boost141" in my rb_libtorrent.spec

due to lack of basic linux knowledge and afer reading some docs i finally get this solved

just add these lines in the spec file
%configure \
CPPFLAGS=-I/usr/include/boost141 \
CXXFLAGS=-I/usr/include/boost141 \
LDFLAGS=-L/usr/lib/boost141 \

or like this
export CXXFLAGS="%{optflags} -I/usr/include/boost141"

Last edited by icyboy; 29th April 2012 at 03:50 PM.
Reply With Quote

cxxflags, export, file, spec

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Need help with RPM spec file Hlingler Programming & Packaging 3 18th January 2011 12:24 PM
How to have an RPM replace another in the SPEC file? uncholowapo Using Fedora 0 30th September 2009 05:48 AM
I need help with my FCEUX spec file uncholowapo Gamers' Lounge 4 26th December 2008 06:06 PM
writing spec file munna_dude Servers & Networking 3 18th August 2007 10:54 AM
About the spec file in emacs-21.4-2.src.rpm AlaxMAX Using Fedora 2 19th April 2005 08:41 AM

Current GMT-time: 08:43 (Friday, 18-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat