Compiling octave-3.4.3

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

Compiling octave-3.4.3

Bart Vandewoestyne-3
Hello list,

I am trying to use a recent version of Octave on my work-desktop PC
which is running the Red Hat Enterprise 5.7:

vandewoe@ablr:~$ lsb_release -a
LSB Version:
:core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseClient
Description:    Red Hat Enterprise Linux Client release 5.7 (Tikanga)
Release:        5.7
Codename:       Tikanga

As this is my work-desktop PC, I cannot upgrade to a more recent Red Hat
distribution (I have to follow the company policy).

For as far as I can see, the most recent package available on Red Hat
5.7 is octave 3.0.5:

vandewoe@ablr:~$ sudo yum info octave | grep Version
Version    : 3.0.5
Version    : 3.0.5

I am downloading the 3.4.3 .tar.gz file from
http://www.gnu.org/software/octave/download.html and after unpacking, i
do the following:

       export FFLAGS="-ff2c"
       ./configure --prefix=/users/vandewoe/software/octave/octave-3.4.3

Configure can find almost everything, except that it complains about
HDF5 stuff not being found, but I can live with that, I don't need HDF5
support for now.

Not setting FFLAGS resulted in a configure error... so after googling a
bit around i noticed that setting it to -ff2c could help me, and
apparently it did.

I then try to compile using a simple

     make

but then i get the error:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../libgnu -I../libgnu
-g -O2 -DHAVE_CONFIG_H -I/usr/include/freetype2 -Wall -W -Wshadow
-Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align
-Wcast-qual -g -O2 -pthread -g -O2 -MT misc/libcruft_la-quit.lo -MD -MP
-MF misc/.deps/libcruft_la-quit.Tpo -c misc/quit.cc  -fPIC -DPIC -o
misc/.libs/libcruft_la-quit.o
In file included from
/gfs/belgium/gntnas01/d3/hped_build_gent/tools/gcc/4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/x86_64-unknown-linux-gnu/bits/gthr-default.h:42:0,
                  from
/gfs/belgium/gntnas01/d3/hped_build_gent/tools/gcc/4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/x86_64-unknown-linux-gnu/bits/gthr.h:162,
                  from
/gfs/belgium/gntnas01/d3/hped_build_gent/tools/gcc/4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/ext/atomicity.h:34,
                  from
/gfs/belgium/gntnas01/d3/hped_build_gent/tools/gcc/4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/ios_base.h:41,
                  from
/gfs/belgium/gntnas01/d3/hped_build_gent/tools/gcc/4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/ios:43,
                  from
/gfs/belgium/gntnas01/d3/hped_build_gent/tools/gcc/4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/ostream:40,
                  from
/gfs/belgium/gntnas01/d3/hped_build_gent/tools/gcc/4.6.2/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/iostream:40,
                  from misc/quit.cc:29:
../libgnu/unistd.h:1722:1: error: '::unlinkat' has not been declared
../libgnu/unistd.h:1722:1: note: suggested alternative:
../libgnu/unistd.h:1722:1: note:   'gnulib::unlinkat'
make[2]: *** [misc/libcruft_la-quit.lo] Error 1
make[2]: Leaving directory
`/gfs/belgium/gntnas01/d2/vandewoe/octave-3.4.3/libcruft'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/gfs/belgium/gntnas01/d2/vandewoe/octave-3.4.3'
make: *** [all] Error 2


and the unlinkat error is where I'm stuck...  Any hints on how to solve
this is highly appreciated.

Kind regards,
Bart
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Compiling octave-3.4.3

CdeMills
Bart Vandewoestyne-3 wrote
Hello list,

I am trying to use a recent version of Octave on my work-desktop PC
which is running the Red Hat Enterprise 5.7:

vandewoe@ablr:~$ lsb_release -a
LSB Version:
:core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseClient
Description:    Red Hat Enterprise Linux Client release 5.7 (Tikanga)
Release:        5.7
Codename:       Tikanga

As this is my work-desktop PC, I cannot upgrade to a more recent Red Hat
distribution (I have to follow the company policy).
Hello Bart,

what you basically need are gcc - g++ - gfortran
I compile octave as follows:
1) install the enclosed shell script somewhere in your path, adapt it to your gcc version, make it executable
2) inside the octave tree, create a directory, like 'compile', cd to it
3) I configure octave as
    myoct-config-simple ../configure --prefix=${HOME}/usr --enable-strict-warning-flags 2>&1 | tee -a make.config
4) make 2>>make.error | tee -a make.report
5) make check
6) make install 2>&1 | tee make.install

This way, each operation is logged into a make.something file; you'll can look there for problems. The new version is installed into ${HOME}/usr; you have to tweak a bit your environment to have things working right:
- add ${HOME}/usr/lib to LD_LIBRARY_PATH
- add ${HOME}/usr/bin to PATH
- add ${HOME}/usr/share/man to MANPATH
- add ${HOME}/usr/share/info to INFOPATH

HTH

Pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling octave-3.4.3

Bart Vandewoestyne-3
On 02/08/2012 05:36 PM, CdeMills wrote:
>
> Hello Bart,
>
> what you basically need are gcc - g++ - gfortran

Could you (or somebody else) be more specific about which versions
Octave 3.4.3 should compile with?  I currently have a

vandewoe@ablr:~$ gcc --version | head -1
gcc_x86_64 (GCC) 4.6.2

vandewoe@ablr:~$ g++ --version | head -1
g++_x86_64 (GCC) 4.6.2

vandewoe@ablr:~$ gfortran --version | head -1
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

The gcc and g++ are a local (manual) install (not a Red Hat packaged
version), the gfortran appears to be the one installed by the package
management system...  Now that I think of it... could this be causing my
compile problems???

> I compile octave as follows:
> 1) install the enclosed shell script somewhere in your path, adapt it to
> your gcc version, make it executable
> 2) inside the octave tree, create a directory, like 'compile', cd to it
> 3) I configure octave as
>      myoct-config-simple ../configure --prefix=${HOME}/usr
> --enable-strict-warning-flags 2>&1 | tee -a make.config
> 4) make 2>>make.error | tee -a make.report
> 5) make check
> 6) make install 2>&1 | tee make.install
>
> This way, each operation is logged into a make.something file; you'll can
> look there for problems. The new version is installed into ${HOME}/usr; you
> have to tweak a bit your environment to have things working right:
> - add ${HOME}/usr/lib to LD_LIBRARY_PATH
> - add ${HOME}/usr/bin to PATH
> - add ${HOME}/usr/share/man to MANPATH
> - add ${HOME}/usr/share/info to INFOPATH
>
> HTH
>
> Pascal

Pascal, thanks... but there was no enclosed shell script attached to
your mail...

Regards,
Bart
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Compiling octave-3.4.3

lukshuntim
On 02/09/2012 04:00 PM, Bart Vandewoestyne wrote:

> On 02/08/2012 05:36 PM, CdeMills wrote:
>>
>> Hello Bart,
>>
>> what you basically need are gcc - g++ - gfortran
>
> Could you (or somebody else) be more specific about which versions
> Octave 3.4.3 should compile with?  I currently have a
>
> vandewoe@ablr:~$ gcc --version | head -1
> gcc_x86_64 (GCC) 4.6.2
>
> vandewoe@ablr:~$ g++ --version | head -1
> g++_x86_64 (GCC) 4.6.2
>
> vandewoe@ablr:~$ gfortran --version | head -1
> GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
>
> The gcc and g++ are a local (manual) install (not a Red Hat packaged
> version), the gfortran appears to be the one installed by the package
> management system...  Now that I think of it... could this be causing my
> compile problems???

At least this is one. :-) Incompatible versions won't work together,
usually. Can you install the same version (4.6.2) of gfortran? And make
sure configure finds them.

>
>> I compile octave as follows:
>> 1) install the enclosed shell script somewhere in your path, adapt it to
>> your gcc version, make it executable
>> 2) inside the octave tree, create a directory, like 'compile', cd to it
>> 3) I configure octave as
>>      myoct-config-simple ../configure --prefix=${HOME}/usr
>> --enable-strict-warning-flags 2>&1 | tee -a make.config
>> 4) make 2>>make.error | tee -a make.report
>> 5) make check
>> 6) make install 2>&1 | tee make.install
>>
>> This way, each operation is logged into a make.something file; you'll can
>> look there for problems. The new version is installed into
>> ${HOME}/usr; you
>> have to tweak a bit your environment to have things working right:
>> - add ${HOME}/usr/lib to LD_LIBRARY_PATH
>> - add ${HOME}/usr/bin to PATH
>> - add ${HOME}/usr/share/man to MANPATH
>> - add ${HOME}/usr/share/info to INFOPATH
>>
>> HTH
>>
>> Pascal
>
> Pascal, thanks... but there was no enclosed shell script attached to
> your mail...

For configuring, I've been using something like

./configure --prefix=${HOME}/usr --enable-shared --disable-static

and it usually works if I have all the dependencies. The octave
developers have done a *really good* job to allow users to compile from
source easily.

As Pascal said, you can look at the make.something to see what's missing.

Regards,
ST
--
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Compiling octave-3.4.3

CdeMills
In reply to this post by Bart Vandewoestyne-3
Bart Vandewoestyne-3 wrote
Pascal, thanks... but there was no enclosed shell script attached to
your mail...
Sorry, here it is:
#! /bin/sh

env  LD_RUN_PATH=${HOME}/usr/lib CC=gcc-4.6 \
        PKG_CONFIG_PATH=${HOME}/usr/lib/pkgconfig \
        CPPFLAGS=-I${HOME}/usr/include LDFLAGS=-L${HOME}/usr/lib \
        CPP=cpp-4.6 CXX=g++-4.6 F77=gfortran-4.6 \
        CFLAGS="-O2 -ftree-vectorize" CXXFLAGS="-O2 -ftree-vectorize" \
        FFLAGS="-O2 -ftree-vectorize" $*

I have the same profile as yours, i.e. a stable linux installation, then updated programs compiled by myself; everything is installed under ${HOME}/usr

Regards

Pascal
Reply | Threaded
Open this post in threaded view
|

Re: Compiling octave-3.4.3

Bart Vandewoestyne-3
In reply to this post by lukshuntim
On 02/09/2012 10:21 AM, [hidden email] wrote:

> On 02/09/2012 04:00 PM, Bart Vandewoestyne wrote:
>> On 02/08/2012 05:36 PM, CdeMills wrote:
>>>
>>> Hello Bart,
>>>
>>> what you basically need are gcc - g++ - gfortran
>>
>> Could you (or somebody else) be more specific about which versions
>> Octave 3.4.3 should compile with?  I currently have a
>>
>> vandewoe@ablr:~$ gcc --version | head -1
>> gcc_x86_64 (GCC) 4.6.2
>>
>> vandewoe@ablr:~$ g++ --version | head -1
>> g++_x86_64 (GCC) 4.6.2
>>
>> vandewoe@ablr:~$ gfortran --version | head -1
>> GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
>>
>> The gcc and g++ are a local (manual) install (not a Red Hat packaged
>> version), the gfortran appears to be the one installed by the package
>> management system...  Now that I think of it... could this be causing my
>> compile problems???

Hmm... next to the manually installed gcc/g++, I also have available the
packaged ones, being:


vandewoe@ablr:/hped/apps$ /usr/bin/gcc --version | head -1
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

vandewoe@ablr:/hped/apps$ /usr/bin/g++ --version | head -1
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

vandewoe@ablr:/hped/apps$ /usr/bin/gfortran --version | head -1
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)


Can someone confirm that Octave 3.4.3 should compile with these versions
of gcc/g++/gfortran?

Thanks,
Bart
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Compiling octave-3.4.3

Jordi Gutiérrez Hermoso-2
On 9 February 2012 05:50, Bart Vandewoestyne
<[hidden email]> wrote:

> Hmm... next to the manually installed gcc/g++, I also have available the
> packaged ones, being:
>
>
> vandewoe@ablr:/hped/apps$ /usr/bin/gcc --version | head -1
> gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
>
> vandewoe@ablr:/hped/apps$ /usr/bin/g++ --version | head -1
> g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
>
> vandewoe@ablr:/hped/apps$ /usr/bin/gfortran --version | head -1
>
> GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
>
>
> Can someone confirm that Octave 3.4.3 should compile with these versions of
> gcc/g++/gfortran?

No, probably not. I remember a lot of reports of people being unable
to compile Octave on older versions of Red Hat precisely due to these.

However, the error you pointed out earlier is a little baffling. I
can't imagine what the Fortran version could have to do with a C++
error. I actually think 3.4.3 had some bugs that *didn't* compile in
g++ 4.6.2, because we were relying on slightly buggy behaviour of g++
4.5.

I'm going by memory here, so this could all be wrong. But I think
3.4.3 will compile on g++ 4.2 - 4.5.

- Jordi G. H.
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Compiling octave-3.4.3

Bart Vandewoestyne-3
On 02/09/2012 02:02 PM, Jordi Gutiérrez Hermoso wrote:
>
>> Can someone confirm that Octave 3.4.3 should compile with these versions of
>> gcc/g++/gfortran?
>
> No, probably not. I remember a lot of reports of people being unable
> to compile Octave on older versions of Red Hat precisely due to these.

Hmm... stubborn as I am, I am still giving it a try... just to make sure
that it really isn't possible ;-)  So I'm using

vandewoe@ablr:~$ gcc --version | head -1
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

vandewoe@ablr:~$ g++ --version | head -1
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

vandewoe@ablr:~$ gfortran --version | head -1
GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)

If I then configure with

vandewoe@ablr:~/octave-3.4.3$ ./configure
--prefix=/users/vandewoe/software/octave/octave-3.4.3

I get

configure: error: A BLAS library was detected but found incompatible
with your Fortran 77 compiler settings.

I know I can solve this with

   export FFLAGS="-ff2c"

but I'm not sure if this is the 'clean' solution.  If somebody confirms
that setting FFLAGS to -ff2c is the best thing I can do here, then I'll
continue...

Regards,
Bart
_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave