|
From: Liguo S. <Lig...@va...> - 2003-10-30 21:12:48
|
I am building the RPM package for QuantLib-Ruby-0.3.3. As I know nothing about
ruby, so I might need someone with more experience with this package to help me out.
First of all, the bug report:
README.txt:
line 8: ruby setup.py wrap -> ruby setup.rb wrap
Second, does the test suite of QuantLib-Ruby require something like cppunit to
run? If so, where can I get it?
I encountered the following errors when try to use ruby setup.rb test
*******************************************************************************
ruby setup.rb test
Building extension...
creating Makefile
make: Nothing to be done for `all'.
Testing QuantLib-Ruby...
./QuantLibTestSuite.rb:17:in `require': No such file to load -- test/unit
(LoadError)
from ./QuantLibTestSuite.rb:17
from setup.rb:211:in `load'
from setup.rb:211
from setup.rb:206:in `call'
from setup.rb:137:in `execute'
from setup.rb:268
*******************************************************************************
Third, when building the QuantLib-Ruby package, there are serveral warnings
about the redefinition of macros. The error messages are like the following:
*******************************************************************************
In file included from /usr/include/ql/qldefines.hpp:68,
from /usr/include/ql/quantlib.hpp:23,
from quantlib_wrap.cpp:804:
/usr/include/ql/config.hpp:98:1: warning: "PACKAGE_BUGREPORT" redefined
In file included from /usr/lib/ruby/1.6/i386-linux/ruby.h:21,
from quantlib_wrap.cpp:28:
/usr/lib/ruby/1.6/i386-linux/config.h:6:1: warning: this is the location of the
previous definition
*******************************************************************************
Other macros with this problem are PACKAGE_NAME, PACKAGE_STRING,
PACKAGE_TARNAME, and PACKAGE_VERSION.
After some research, I found that these macros are defined in both
/usr/include/ql/config.hpp and /usr/lib/ruby/1.6/i386-linux/config.h. Would this
cause any surprise in the future?
Thanks for your help.
Liguo (Leo)
|
|
From: Dirk E. <ed...@de...> - 2003-10-31 02:06:37
|
On Thu, Oct 30, 2003 at 03:12:43PM -0600, Liguo Song wrote:
> I am building the RPM package for QuantLib-Ruby-0.3.3. As I know nothing
> about ruby, so I might need someone with more experience with this package
> to help me out.
Luigi helped me years ago, and I recall that I used some small patches of
his in either install.rb or setup.rb, or both. But based on the current
diff.gz, I do no longer. Not sure when those ceased to be required, maybe
around 0.3?
Here is what I do, in a nutshell:
cxxcompiler = g++
compilerflags = -O2
# per Luigi's suggestion
touch quantlib_wrap.cpp
CXX="$(cxxcompiler)" \
CFLAGS="$(compilerflags)" \
CXXFLAGS="$(compilerflags)" $(RUBY) setup.rb build
[...]
CXX="$(cxxcompiler)" \
CFLAGS="$(compilerflags)" \
CXXFLAGS="$(compilerflags)" \
$(RUBY) setup.rb install --prefix=debian/$(package)
You can look at any Debian mirror for QuantLib-Ruby_0.3.3-4.diff.gz (for the
most current release) which is a diff against the pristine QL sources.
> Second, does the test suite of QuantLib-Ruby require something like cppunit
> to run? If so, where can I get it?
It's a Debian package for me, but I cheat and don't run this for QL-Ruby.
You can look at our build-logs if you want to compare warnings:
http://buildd.debian.org/build.php?pkg=quantlib-ruby
for all different build architectures going back to the 0.2.1 release.
BTW I'm all for 0.3.4 -- good idea AFAICT.
Cheers, Dirk
--
Those are my principles, and if you don't like them... well, I have others.
-- Groucho Marx
|
|
From: Luigi B. <lui...@fa...> - 2003-10-31 08:14:01
|
Hi Liguo, On 2003.10.30 22:12, Liguo Song wrote: > I am building the RPM package for QuantLib-Ruby-0.3.3. As I know > nothing about ruby, so I might need someone with more experience with > this package to help me out. > > First of all, the bug report: > README.txt: > line 8: ruby setup.py wrap -> ruby setup.rb wrap Ouch. (aside: you shouldn't need that step, though. The SWIG-generated file is included in the tarball. You can start from "ruby setup.py build".) > Second, does the test suite of QuantLib-Ruby require something like > cppunit to run? If so, where can I get it? You need the Test::Unit framework. You can get it from <http://testunit.talbott.ws>. You'll need version 0.1.8 or above. > Third, when building the QuantLib-Ruby package, there are serveral > warnings about the redefinition of macros. The error messages are > like the following: > ******************************************************************************* > In file included from /usr/include/ql/qldefines.hpp:68, > from /usr/include/ql/quantlib.hpp:23, > from quantlib_wrap.cpp:804: > /usr/include/ql/config.hpp:98:1: warning: "PACKAGE_BUGREPORT" > redefined > In file included from /usr/lib/ruby/1.6/i386-linux/ruby.h:21, > from quantlib_wrap.cpp:28: > /usr/lib/ruby/1.6/i386-linux/config.h:6:1: warning: this is the > location of the previous definition > ******************************************************************************* > Other macros with this problem are PACKAGE_NAME, PACKAGE_STRING, > PACKAGE_TARNAME, and PACKAGE_VERSION. > > After some research, I found that these macros are defined in both / > usr/include/ql/config.hpp and /usr/lib/ruby/1.6/i386-linux/config.h. > Would this cause any surprise in the future? Hmm. I'll look into it. There's probably some way to tell autoconf to add a prefix to the macro names. Thanks, Luigi |
|
From: Liguo S. <Lig...@va...> - 2003-10-31 17:21:15
|
Hi, Luigi, > You need the Test::Unit framework. You can get it from > <http://testunit.talbott.ws>. You'll need version 0.1.8 or above. Just checked the place. And since ruby-1.8, Test::Unit lives inside the main ruby package. My ruby is 1.6.7. I will upgrade it to 1.8. > Hmm. I'll look into it. There's probably some way to tell autoconf to > add a prefix to the macro names. Inside /usr/lib/ruby/1.6/i386-linux/config.h, those macros are all defined as "". It seems a little wierd for me to do something like this. Thanks for check it. Liguo |
|
From: Liguo S. <Lig...@va...> - 2003-10-31 17:09:54
|
Hi, Dirk, Dirk Eddelbuettel wrote: > On Thu, Oct 30, 2003 at 03:12:43PM -0600, Liguo Song wrote: > >>I am building the RPM package for QuantLib-Ruby-0.3.3. As I know nothing >>about ruby, so I might need someone with more experience with this package >>to help me out. > > > Luigi helped me years ago, and I recall that I used some small patches of > his in either install.rb or setup.rb, or both. But based on the current > diff.gz, I do no longer. Not sure when those ceased to be required, maybe > around 0.3? > > Here is what I do, in a nutshell: > > > cxxcompiler = g++ > compilerflags = -O2 > > > # per Luigi's suggestion > touch quantlib_wrap.cpp > CXX="$(cxxcompiler)" \ > CFLAGS="$(compilerflags)" \ > CXXFLAGS="$(compilerflags)" $(RUBY) setup.rb build > > > [...] > > CXX="$(cxxcompiler)" \ > CFLAGS="$(compilerflags)" \ > CXXFLAGS="$(compilerflags)" \ > $(RUBY) setup.rb install --prefix=debian/$(package) > > > > You can look at any Debian mirror for QuantLib-Ruby_0.3.3-4.diff.gz (for the > most current release) which is a diff against the pristine QL sources. Thanks for clarifying the steps for me. It gives me some ideas to improve my spec file to build the rpm package. :) >>Second, does the test suite of QuantLib-Ruby require something like cppunit >>to run? If so, where can I get it? > > > It's a Debian package for me, but I cheat and don't run this for QL-Ruby. The test should be optional. But I'd like to make use of it if the required software is present. It would help to prevent a corrupted build, which happens when I tried to optimized the quantlib compile. But the test-suite saved the day there. :) > > You can look at our build-logs if you want to compare warnings: > http://buildd.debian.org/build.php?pkg=quantlib-ruby > for all different build architectures going back to the 0.2.1 release. I just looked at it. There is no such warning about these macros. Wierd. BTW, which one is i386/i686? Some names of the architectures are not familiar to me. > BTW I'm all for 0.3.4 -- good idea AFAICT. Same here, if I didn't mention before. Frequent bug fixing releases aside from the main developing branch is a great idea. I was just reading The Cathedral and the Bazaar by Eric Steven Raymond. It is some eye-opener for the open source software projects. Have a nice weekend. Liguo |
|
From: Ferdinando A. <na...@am...> - 2003-10-31 17:37:06
|
Liguo: >I was just reading The Cathedral and the Bazaar by Eric Steven Raymond. It >is some eye-opener for the open source software projects. It was february 2000: I just discovered Python and I was amazed that such a great software was free. Then "The Cathedral and the Bazaar" hooked me completely. At the time I taught Richard Stallman was too radical, and I was fond of the ESR Open Source approach. Four years later I've realized Stallman was not too radical, he was simply right. YMMV ciao -- Nando |