Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2006-02-28 11:54:28


Support Requests item #1440458, was opened at 2006-02-28 16:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=207586&aid=1440458&group_id=7586

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Building Boost
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Clifford (jeffclifford)
Assigned to: Nobody/Anonymous (nobody)
Summary: How to pass CXXFLAGS & LDFLAGS

Initial Comment:
Hi,

I have been trying to build the boost libraries on a
Fedora Core 4 machine.

I want to build a specific gcc334 version of the
libraries that is 64-bit.

I have followed the instructions on the Boost web site
on how to configure boost specifically to pass CXXFLAGS
and LDFLAGS. I shall run through what I have done:

I am trying to build boost v1.33.1

1) I cd to BOOST_ROOT/libs/config

2) I run: sh ./configure CC=gcc334 CXX=g++334
CXXFLAGS="-m64 -fPIC" LDFLAGS="-m64 -Wl,-rpath
/apps/Linux64/gcc402/lib64 -fPIC"

3) This creates a user.hpp that I copy to
BOOST_ROOT/boost/config

4) I cd to BOOST_ROOT

5) I run: bjam -sTOOLS=gcc
--builddir=./boost_1_33_1-objdir stage

I then find that any compiler flags that I specified
are simply ignored. Not only that but checking top I
find that the libraries are being built with the
default compiler instead of the one I specified.

So I then tried the following command instead as the
docs aren't clear what you need to specify to bjam
after doing a specific configuration as above.

bjam -sGCC_ROOT_DIRECTORY=/apps/Linux64/gcc334
-sGCC=gcc334 -sGXX=g++334 -sTOOLS=gcc
--builddir=./boost_1_33_1-objdir stage

This at least makes the correct compiler be used but
still the CXXFLAGS and LDFLAGS are ignored.

I notice there are other posts in this group where
people have asked similar questions.

Surely passing CXXFLAGS and LDFLAGS should be quite a
simple thing to be able to do.

I too am confused by the user.hpp containing the
following which is commented:

//
// Use this file to define a site and compiler specific
// configuration policy, this version was
auto-generated by
// configure on Tue Feb 28 16:06:50 GMT 2006
// With the following options:
// CXX = g++334
// CXXFLAGS = -I./../.. -I./../../libs/config/test
-m64 -fPIC -DBOOST_NO_CONFIG
// LDFLAGS = -m64 -Wl,-rpath
/apps/Linux64/gcc402/lib64 -fPIC
// LIBS = -lrt -lm -lpthread
//

Are these options passed to some other file when the
configure script is run? They don't seem to be; in
which case is there some macro that holds these values.
 I have checked the docs but can't find a macro
relating to these and checking the gcc.hpp file etc
doesn't give any clues.

I'd be really grateful if anyone can point to what I'm
doing wrong and how I can get my desired build done.

A specific example of how to do this in the boost
documentation would be ideal.

Many thanks,

Jeff Clifford.

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=207586&aid=1440458&group_id=7586

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk