--with-cxsparse-includedir option is ignored

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
c.
Reply | Threaded
Open this post in threaded view
|

--with-cxsparse-includedir option is ignored

c.
Hi,

I am trying to build Octave 4.2 on a machine with Scientific Linux release 6.6 (Carbon).
This machine uses an environmental modules system therefore many libraries, including SuiteSparse
are installed in non-standard locations.

I am configuring with

  ../configure <...> \
               --with-colamd-includedir=$mkSuitesparseInc \
               --with-colamd-libdir=$mkSuitesparseLib \
               --with-amd-libdir=$mkSuitesparseLib \
               --with-amd-includedir=$mkSuitesparseInc \
               --with-camd-libdir=$mkSuitesparseLib \
               --with-camd-includedir=$mkSuitesparseInc \
               --with-cholmod-libdir=$mkSuitesparseLib \
               --with-cholmod-includedir=$mkSuitesparseInc \
               --with-ccolamd-includedir=$mkSuitesparseInc \
               --with-ccolamd-libdir=$mkSuitesparseLib  \
               --with-cxsparse-libdir=$mkSuitesparseLib \
               --with-cxsparse-includedir=$mkSuitesparseInc \
               --with-umfpack-includedir=$mkSuitesparseInc \
               --with-umfpack-libdir=$mkSuitesparseLib
             
The configure phase fails with the following message:

  checking for cs_di_sqr in -lcxsparse... yes
  checking whether CXSparse is version 2.2 or later... no
  configure: error: CXSparse library is too old (< version 2.2).  Upgrade CXSparse (SuiteSparse) or configure Octave with --disable-cxsparse"

The error message is not very useful because the problem is not with the version of CXSparse avaialble (the available version is > 3.0), checking config.log I see:

  configure:43472: checking whether CXSparse is version 2.2 or later
  configure:43523: g++ -std=gnu++11 -E  -fPIC  conftest.cpp
  conftest.cpp:96:24: fatal error: cs.h: No such file or directory

So it seems the directory passed to --with-cxsparse-includedir is not being added to the compilation flags (while it is added when testing for, e.g., cholmod), indeed adding "CPPFLAGS=-I$mkSuitesparseInc" is a workaround for this problem.

Is this a configuration bug? Does anyone know if it affects the development branch? Should I submit it to the tracker?

c.


Reply | Threaded
Open this post in threaded view
|

Re: --with-cxsparse-includedir option is ignored

PhilipNienhuis
c. wrote
Hi,

I am trying to build Octave 4.2 on a machine with Scientific Linux release 6.6 (Carbon).
This machine uses an environmental modules system therefore many libraries, including SuiteSparse
are installed in non-standard locations.

I am configuring with

  ../configure <...> \
               --with-colamd-includedir=$mkSuitesparseInc \
               --with-colamd-libdir=$mkSuitesparseLib \
               --with-amd-libdir=$mkSuitesparseLib \
               --with-amd-includedir=$mkSuitesparseInc \
               --with-camd-libdir=$mkSuitesparseLib \
               --with-camd-includedir=$mkSuitesparseInc \
               --with-cholmod-libdir=$mkSuitesparseLib \
               --with-cholmod-includedir=$mkSuitesparseInc \
               --with-ccolamd-includedir=$mkSuitesparseInc \
               --with-ccolamd-libdir=$mkSuitesparseLib  \
               --with-cxsparse-libdir=$mkSuitesparseLib \
               --with-cxsparse-includedir=$mkSuitesparseInc \
               --with-umfpack-includedir=$mkSuitesparseInc \
               --with-umfpack-libdir=$mkSuitesparseLib
             
The configure phase fails with the following message:

  checking for cs_di_sqr in -lcxsparse... yes
  checking whether CXSparse is version 2.2 or later... no
  configure: error: CXSparse library is too old (< version 2.2).  Upgrade CXSparse (SuiteSparse) or configure Octave with --disable-cxsparse"

The error message is not very useful because the problem is not with the version of CXSparse avaialble (the available version is > 3.0), checking config.log I see:

  configure:43472: checking whether CXSparse is version 2.2 or later
  configure:43523: g++ -std=gnu++11 -E  -fPIC  conftest.cpp
  conftest.cpp:96:24: fatal error: cs.h: No such file or directory

So it seems the directory passed to --with-cxsparse-includedir is not being added to the compilation flags (while it is added when testing for, e.g., cholmod), indeed adding "CPPFLAGS=-I$mkSuitesparseInc" is a workaround for this problem.

Is this a configuration bug? Does anyone know if it affects the development branch? Should I submit it to the tracker?
I have similar issues.
I tried to compile Suitesparse to a newer version and Sundails, but that failed, so I restored the previous versions through Mageia's package manager.
But since then Octave cannot find the colamd, ccolamd and other suitsparse-related libraries, in spite of explicitly supplying the relevant configure option.
That bites a bit as I can't make dist targets anymore for cross-building in mxe-octave.

But I didn't pursue further as I have another build box that is still working properly.
(Yes I compared the various libs and files on those boxes, but found no differences so I gave up)

Philip
Reply | Threaded
Open this post in threaded view
|

Re: --with-cxsparse-includedir option is ignored

Mike Miller-4
In reply to this post by c.
On Wed, Feb 08, 2017 at 12:58:00 +0100, c. wrote:

> Hi,
>
> I am trying to build Octave 4.2 on a machine with Scientific Linux release 6.6 (Carbon).
> This machine uses an environmental modules system therefore many libraries, including SuiteSparse
> are installed in non-standard locations.
>
> I am configuring with
>
>   ../configure <...> \
>                --with-colamd-includedir=$mkSuitesparseInc \
>                --with-colamd-libdir=$mkSuitesparseLib \
>                --with-amd-libdir=$mkSuitesparseLib \
>                --with-amd-includedir=$mkSuitesparseInc \
>                --with-camd-libdir=$mkSuitesparseLib \
>                --with-camd-includedir=$mkSuitesparseInc \
>                --with-cholmod-libdir=$mkSuitesparseLib \
>                --with-cholmod-includedir=$mkSuitesparseInc \
>                --with-ccolamd-includedir=$mkSuitesparseInc \
>                --with-ccolamd-libdir=$mkSuitesparseLib  \
>                --with-cxsparse-libdir=$mkSuitesparseLib \
>                --with-cxsparse-includedir=$mkSuitesparseInc \
>                --with-umfpack-includedir=$mkSuitesparseInc \
>                --with-umfpack-libdir=$mkSuitesparseLib
>              
> The configure phase fails with the following message:
>
>   checking for cs_di_sqr in -lcxsparse... yes
>   checking whether CXSparse is version 2.2 or later... no
>   configure: error: CXSparse library is too old (< version 2.2).  Upgrade CXSparse (SuiteSparse) or configure Octave with --disable-cxsparse"
>
> The error message is not very useful because the problem is not with the version of CXSparse avaialble (the available version is > 3.0), checking config.log I see:
>
>   configure:43472: checking whether CXSparse is version 2.2 or later
>   configure:43523: g++ -std=gnu++11 -E  -fPIC  conftest.cpp
>   conftest.cpp:96:24: fatal error: cs.h: No such file or directory
>
> So it seems the directory passed to --with-cxsparse-includedir is not being added to the compilation flags (while it is added when testing for, e.g., cholmod), indeed adding "CPPFLAGS=-I$mkSuitesparseInc" is a workaround for this problem.
>
> Is this a configuration bug? Does anyone know if it affects the development branch? Should I submit it to the tracker?

Yes, this was a bug in the configure script. I was first made aware of
it about a month ago

  http://lists.gnu.org/archive/html/help-octave/2017-01/msg00041.html

and fixed at that time on the default branch

  https://hg.savannah.gnu.org/hgweb/octave/rev/ee9aa83dce51

You can backport that fix to stable if you think it's important. Or you
can build by adding any flags you need for the SuiteSparse module into
the global CPPFLAGS variable instead of using the --with-foo options.

--
mike