g++ and ld 4.1 for QuantLib: build speed, or lack thereof

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

g++ and ld 4.1 for QuantLib: build speed, or lack thereof

Dirk Eddelbuettel

QuantLib'ers,

Did anybody notice that build times seem to have increased quite a bit under
gcc/g++/binutils 4.1?  I am trying to update RQuantLib and the final link
step [ for the comparatively small RQuantLib ] alone is running five or more
minutes on my home development machine (which us is a few years old, but has
plenty of ram).

Are there any known shortcuts, other than 'downgrade to g++ 4.0 or earlier' ?

It also appears that the gcc/g++ bug we noticed on hppa following the QL
0.3.13 release is now present in Debian testing. Until that bug is fixed I
can't even build RQL on testing, see below for the link errors.  Luckily, the
problem is fixed in unstable and g++ upstream, but I can't currently install
the Debian unstable toolchain on testing (due to conflicts with other
packages which we'll need to sort out first).

Thanks, Dirk


* Installing *source* package 'RQuantLib' ...
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for quantlib-config... yes
Building libRcpp.a in RcppSrc...
g++ -I/usr/share/R/include -I/usr/share/R/include  -DUSING_QUANTLIB -I/usr/include   -fpic  -g -O2 -c Rcpp.cpp -o Rcpp.o
ar crs libRcpp.a Rcpp.o
checking for Boost development files... yes
checking Boost version... yes
configure: creating ./config.status
config.status: creating src/Makevars
Completed configuration and ready to build.
** libs
g++ -I/usr/share/R/include -I/usr/share/R/include    -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic  -g -O2 -c barrier_binary.cpp -o barrier_binary.o
g++ -I/usr/share/R/include -I/usr/share/R/include    -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic  -g -O2 -c bermudan.cpp -o bermudan.o
g++ -I/usr/share/R/include -I/usr/share/R/include    -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic  -g -O2 -c curves.cpp -o curves.o
g++ -I/usr/share/R/include -I/usr/share/R/include    -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic  -g -O2 -c discount.cpp -o discount.o
g++ -I/usr/share/R/include -I/usr/share/R/include    -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic  -g -O2 -c implieds.cpp -o implieds.o
g++ -I/usr/share/R/include -I/usr/share/R/include    -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic  -g -O2 -c utils.cpp -o utils.o
g++ -I/usr/share/R/include -I/usr/share/R/include    -g -O2 -DUSING_QUANTLIB -I/usr/include -I../RcppSrc -fpic  -g -O2 -c vanilla.cpp -o vanilla.o
g++ -shared  -o RQuantLib.so barrier_binary.o bermudan.o curves.o discount.o implieds.o utils.o vanilla.o -L../RcppSrc -lRcpp -L/usr/lib -lQuantLib-0.3.13   -L/usr/lib/R/lib -lR
bermudan.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
bermudan.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
curves.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
curves.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
discount.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
discount.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
implieds.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
implieds.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
utils.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
utils.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
vanilla.o:(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
vanilla.o:(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
../RcppSrc/libRcpp.a(Rcpp.o):(.data+0x0): multiple definition of `_ZN8QuantLib8McPricerIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x0): first defined here
../RcppSrc/libRcpp.a(Rcpp.o):(.data+0x4): multiple definition of `_ZN8QuantLib12McSimulationIT_T0_E10minSample_E'
barrier_binary.o:(.data+0x4): first defined here
collect2: ld returned 1 exit status
make: *** [RQuantLib.so] Error 1
chmod: cannot access `/var/autofs/net/chibud/home/edd/src/progs/R/RQuantLib/RQuantLib.Rcheck/RQuantLib/libs/*': No such file or directory
ERROR: compilation failed for package 'RQuantLib'
** Removing '/var/autofs/net/chibud/home/edd/src/progs/R/RQuantLib/RQuantLib.Rcheck/RQuantLib'


--
Hell, there are no rules here - we're trying to accomplish something.
                                                  -- Thomas A. Edison


Reply | Threaded
Open this post in threaded view
|

Re: g++ and ld 4.1 for QuantLib: build speed, or lack thereof

eric ehlers
Hello,

On 8/15/06, Dirk Eddelbuettel <[hidden email]> wrote:
>
> QuantLib'ers,
>
> Did anybody notice that build times seem to have increased quite a bit under
> gcc/g++/binutils 4.1?

Yes.

> I am trying to update RQuantLib and the final link
> step [ for the comparatively small RQuantLib ] alone is running five or more
> minutes on my home development machine (which us is a few years old, but has
> plenty of ram).

I get a similar problem when compiling QuantLibAddin - the final link
takes several times longer than it used to.

> Are there any known shortcuts, other than 'downgrade to g++ 4.0 or earlier' ?

I'm not aware of a solution but if you discover one I'd love to hear about it.

Regards,
Eric