Help! newbie question : autogen

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

Help! newbie question : autogen

Richard Gomes
Hi guys,

I'd like to call QuantLib from Java. I'm following the steps from
http://www.skwash.com and I've got errors, probably because the .i files do
not match the 0.8.1 release.

As Debian does not have a kind of quantlib-swig package, I decided to
compile from sources, as described:

I compiled/installed the latest boost release.
I just checked out QuantLib from SVN.
I installed autoconf, automake and m4 packages.

and then...

$ sh autogen.sh
/usr/share/aclocal/libmcrypt.m4:17: warning: underquoted definition of
AM_PATH_LIBMCRYPT
/usr/share/aclocal/libmcrypt.m4:17:   run info '(automake)Extending aclocal'
/usr/share/aclocal/libmcrypt.m4:17:   or see
http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:63: error: possibly undefined macro: AC_PROG_LIBTOOL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

Oh well... I'm a complete newbie on autoconf/automake. I followed ...

http://sources.redhat.com/automake/automake.html#Extending-aclocal

... but it seems to be a steep learning curve.

Does anyone have an idea how to solve the error I've got?

Thank you all in advance for any help.

--
Richard Gomes
mailto:[hidden email]
M:+44(77)9955-6813
H:+44(870)068-8205


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help! newbie question : autogen

Richard Gomes
Richard Gomes wrote:

> Hi guys,
>
> I'd like to call QuantLib from Java. I'm following the steps from
> http://www.skwash.com and I've got errors, probably because the .i files
> do not match the 0.8.1 release.
>
> As Debian does not have a kind of quantlib-swig package, I decided to
> compile from sources, as described:
>
> I compiled/installed the latest boost release.
> I just checked out QuantLib from SVN.
> I installed autoconf, automake and m4 packages.
>
> and then...
>
> $ sh autogen.sh
> /usr/share/aclocal/libmcrypt.m4:17: warning: underquoted definition of
> AM_PATH_LIBMCRYPT
> /usr/share/aclocal/libmcrypt.m4:17:   run info '(automake)Extending
> aclocal'
> /usr/share/aclocal/libmcrypt.m4:17:   or see
> http://sources.redhat.com/automake/automake.html#Extending-aclocal
> configure.ac:63: error: possibly undefined macro: AC_PROG_LIBTOOL
>       If this token and others are legitimate, please use
>       m4_pattern_allow. See the Autoconf documentation.
> autoreconf: /usr/bin/autoconf failed with exit status: 1
>
> Oh well... I'm a complete newbie on autoconf/automake. I followed ...
>
> http://sources.redhat.com/automake/automake.html#Extending-aclocal
>
> ... but it seems to be a steep learning curve.
>
> Does anyone have an idea how to solve the error I've got?
>
> Thank you all in advance for any help.
>

This is a followup to the group.

Version 0.8.0 has the c++ sources and swig sources in download area at
sourceforge.net.

I'm trying it now.

--
Richard Gomes
mailto:[hidden email]
M:+44(77)9955-6813
H:+44(870)068-8205


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help! newbie question : autogen

Luigi Ballabio

On Sep 2, 2007, at 3:52 PM, Richard Gomes wrote:

>> I compiled/installed the latest boost release.
>> I just checked out QuantLib from SVN.
>> I installed autoconf, automake and m4 packages.
>>
>> and then...
>>
>> $ sh autogen.sh
>> /usr/share/aclocal/libmcrypt.m4:17: warning: underquoted definition of
>> AM_PATH_LIBMCRYPT
>> /usr/share/aclocal/libmcrypt.m4:17:   run info '(automake)Extending
>> aclocal'
>> /usr/share/aclocal/libmcrypt.m4:17:   or see
>> http://sources.redhat.com/automake/automake.html#Extending-aclocal
>> configure.ac:63: error: possibly undefined macro: AC_PROG_LIBTOOL
>>       If this token and others are legitimate, please use
>>       m4_pattern_allow. See the Autoconf documentation.
>> autoreconf: /usr/bin/autoconf failed with exit status: 1

Did you install libtool as well as autoconf and automake? it seems that
autoconf does not find an m4 macro file provided with libtool.


> This is a followup to the group.
>
> Version 0.8.0 has the c++ sources and swig sources in download area at
> sourceforge.net.

Also, it's probably not very clear from the release notes, but
QuantLib-SWIG 0.8.0 will work with QuantLib 0.8.1.

Later,
        Luigi



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help! newbie question : autogen

Richard Gomes
Luigi Ballabio wrote:

>
> On Sep 2, 2007, at 3:52 PM, Richard Gomes wrote:
>>> I compiled/installed the latest boost release.
>>> I just checked out QuantLib from SVN.
>>> I installed autoconf, automake and m4 packages.
>>>
>>> and then...
>>>
>>> $ sh autogen.sh
>>> /usr/share/aclocal/libmcrypt.m4:17: warning: underquoted definition of
>>> AM_PATH_LIBMCRYPT
>>> /usr/share/aclocal/libmcrypt.m4:17:   run info '(automake)Extending
>>> aclocal'
>>> /usr/share/aclocal/libmcrypt.m4:17:   or see
>>> http://sources.redhat.com/automake/automake.html#Extending-aclocal
>>> configure.ac:63: error: possibly undefined macro: AC_PROG_LIBTOOL
>>>       If this token and others are legitimate, please use
>>>       m4_pattern_allow. See the Autoconf documentation.
>>> autoreconf: /usr/bin/autoconf failed with exit status: 1
>
> Did you install libtool as well as autoconf and automake? it seems that
> autoconf does not find an m4 macro file provided with libtool.
>
>
>> This is a followup to the group.
>>
>> Version 0.8.0 has the c++ sources and swig sources in download area at
>> sourceforge.net.
>
> Also, it's probably not very clear from the release notes, but
> QuantLib-SWIG 0.8.0 will work with QuantLib 0.8.1.
>
> Later,
> Luigi
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/

Hi Luigi,

I managed to get v0.8.0 compiled.
Yes... I guessed that swig-0.8.0 could fit v0.8.1 as well.
But I decided to be on the safe side.
I'm compiling v0.8.1 now.

You are right... libtool was not installed. :(
After I installed it, I managed to get autogen.sh running fine, in spite of
some warnings. At least "configure" was created and runs OK.
I'm also compiling sources from trunk.

Soon I will need a 2 head amd64x2 :)

Kind Regards

--
Richard Gomes


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help! newbie question : autogen

Dirk Eddelbuettel

On 2 September 2007 at 15:40, Richard Gomes wrote:
| You are right... libtool was not installed. :(

You can use Debian's meta-info for that, i.e.

        $ apt-get build-dep quantlib

gets you all packages needed to build the main quantlib packages.
And

        $ apt-get source quantlib

will get the source for you --- if you point to Debian unstable you'd always
get the latest.

Hth, Dirk

--
Three out of two people have difficulties with fractions.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help! newbie question : autogen

Richard Gomes
Dirk Eddelbuettel wrote:

>
> On 2 September 2007 at 15:40, Richard Gomes wrote:
> | You are right... libtool was not installed. :(
>
> You can use Debian's meta-info for that, i.e.
>
> $ apt-get build-dep quantlib
>
> gets you all packages needed to build the main quantlib packages.
> And
>
> $ apt-get source quantlib
>
> will get the source for you --- if you point to Debian unstable you'd
> always get the latest.
>
> Hth, Dirk
>

Dirk, Thank you very much.

In fact, I'm currently using Kubuntu 7.04 and Debian's unstable packages do
not work well on it. Yesterday I had to use killall to kill thousands of
apt-cache processes slowing down my box.

I'm planning to switch to Debian4 in the future, but I'll need to have
enough spare time and courage to do it.

Kind Regards

--
Richard Gomes


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: Help! newbie question : autogen

Richard Gomes
Richard Gomes wrote:

> Dirk Eddelbuettel wrote:
>
>>
>> On 2 September 2007 at 15:40, Richard Gomes wrote:
>> | You are right... libtool was not installed. :(
>>
>> You can use Debian's meta-info for that, i.e.
>>
>> $ apt-get build-dep quantlib
>>
>> gets you all packages needed to build the main quantlib packages.
>> And
>>
>> $ apt-get source quantlib
>>
>> will get the source for you --- if you point to Debian unstable you'd
>> always get the latest.
>>
>> Hth, Dirk
>>
>
> Dirk, Thank you very much.
>
> In fact, I'm currently using Kubuntu 7.04 and Debian's unstable packages
> do not work well on it. Yesterday I had to use killall to kill thousands
> of apt-cache processes slowing down my box.
>
> I'm planning to switch to Debian4 in the future, but I'll need to have
> enough spare time and courage to do it.
>
> Kind Regards
>

Hi Chaps,

I managed to get everything running.
This is a quick procedure, specially intended to AMD64 addicted ones.

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

echo Setting JAVA_HOME to your JDK flavored for AMD64.
# To be on the safe side, I tested against Java5.
export JAVA_HOME=/opt/JavaIDE/jdk1.5.0_12-amd64

cd $HOME
mkdir svn_working-copy
cd svn_working-copy

echo Download QuantLib
svn checkout
https://quantlib.svn.sourceforge.net/svnroot/quantlib/trunk/QuantLib

echo Download QuantLib-SWIG
svn checkout
https://quantlib.svn.sourceforge.net/svnroot/quantlib/trunk/QuantLib-SWIG

echo Install required packages
sudo apt-get install binutils gcc make autoconf automake libtool swig
libboost-dev

cd $HOME/svn_working-copy
cd QuantLib
echo Configure QuantLib
sh autogen.sh
./configure
make
sudo make install

cd $HOME/svn_working-copy
cd QuantLib-SWIG
echo Configure QuantLib-SWIG for Java environment
sh autogen.sh
echo "================================"
echo "Setting CXXFLAGS=-fPIC for AMD64"
echo "================================"
export CXXFLAGS=-fPIC
echo
./configure \
   --with-jdk-include=${JAVA_HOME}/include \
   --with-jdk-system-include=${JAVA_HOME}/include/linux
make -C Java
sudo make -C Java install

echo Verify installed files
ls -ald /usr/local/lib/*QuantLib*

echo Verify file contents
file /usr/local/lib/*QuantLib*



You should see something similar to...

/usr/local/lib/libQuantLib-0.8.1.so: ELF 64-bit LSB shared object, x86-64,
version 1 (SYSV), not stripped
/usr/local/lib/libQuantLibJNI.so:    ELF 64-bit LSB shared object, x86-64,
version 1 (SYSV), not stripped
/usr/local/lib/libQuantLib.so:       symbolic link to `libQuantLib-0.8.1.so'
/usr/local/lib/libQuantLib-0.8.1.a:  current ar archive
/usr/local/lib/libQuantLib.a:        symbolic link to `libQuantLib-0.8.1.a'
/usr/local/lib/QuantLib.jar:         Zip archive data, at least v2.0 to
extract


To be honest, I've build from released packages and not from the trunk SVN.
If you follow this procedure, probably some file names can be slightly
different.


Now, include /usr/local/lib/QuantLib.jar in the build path of your Java
projects.
Use this test program:


package org.quantlib.examples;

import org.quantlib.QuantLib;
import org.quantlib.Weekday;

public class Hello {
    static {
        try {
            System.loadLibrary("QuantLibJNI");
        } catch (RuntimeException e) {
            e.printStackTrace();
        }
    }
    public static void main(String[] args) {
        QuantLib ql = new QuantLib();
        double nd = QuantLib.nullDouble();

        System.out.println("ql nullDouble is "+nd);
        System.out.println("and sunday is "+Weekday.Sunday.toString());
    }
}

Go to the command line and execute...

$ export LD_LIBRARY_PATH=/usr/local/lib
$ java -cp .:/usr/local/lib/QuantLib.jar org.quantlib.examples.Hello

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

Good Luck! :)

--
Richard Gomes


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev