Request for package testing

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

Request for package testing

Oliver Heimlich
Hi,

I plan to release the next version of the interval package together with
a bundled C library, crlibm.  This library contains platform specific
code and, together with my little C coding experience, I expect some
problems with that.

http://octave.ln0.de/interval-2.0.0-crlibm.tar.gz

Could you please check, whether this package preview can be installed in
your Octave and post the output of the following commands

>> pkg load interval
>> __check_crlibm__

I have already verified the following platforms myself:
- Octave 4.0.3 64-bit on Debian 64-bit
- Octave 3.8.2 64-bit on Debian 64-bit
- Octave 4.0.3 32-bit on Windows 64-bit
- Octave 4.2.0 64-bit on Windows 64-bit

Just in case you want to verify the tarball, it's md5 should be
d01da14c3b22ba85e24667e4f82e1e36.

Thank you very much
Oliver


signature.asc (484 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Request for package testing

Colin Macdonald-2
On 05/12/16 16:42, Oliver Heimlich wrote:
> Could you please check, whether this package preview can be installed in
> your Octave and post the output of the following commands
>
>>> pkg load interval
>>> __check_crlibm__

## Octave 4.3.0+ 64-bit Fedora 24

 >> pkg install interval-2.0.0-crlibm.tar.gz
For information about changes from previous versions of the interval
package, run 'news interval'.
 >> pkg load interval
 >> __check_crlibm__
ans = 1
 >>

## Octave 4.0.3 64-bit Fedora 24

 >> pkg install interval-2.0.0-crlibm.tar.gz
__setround__.cc:24:0: warning: ignoring #pragma STDC FENV_ACCESS
[-Wunknown-pragmas]
  #pragma STDC FENV_ACCESS ON

For information about changes from previous versions of the interval
package, run 'news interval'.
 >> pkg load interval
 >> __check_crlibm__
ans =  1
 >>

best,
Colin

Reply | Threaded
Open this post in threaded view
|

Re: Request for package testing

Sebastian Schöps
In reply to this post by Oliver Heimlich
Dear Oliver,

Oliver Heimlich wrote
I plan to release the next version of the interval package together with
a bundled C library, crlibm.  This library contains platform specific
code and, together with my little C coding experience, I expect some
problems with that.

http://octave.ln0.de/interval-2.0.0-crlibm.tar.gz

Could you please check, whether this package preview can be installed in
your Octave and post the output of the following commands
I am not sure, if my Octave or your script is guilty. However, I have '/usr/local/include/mpfr.h' but it's not found:

mpfr_function_d.cc:19:10: fatal error: 'mpfr.h' file not found
#include <mpfr.h>
         ^
1 error generated.

My mkoctfile does not return '/usr/local/include' in 'ALL_CFLAGS' or 'INCLUDEDIR'. Is it supposed to?

Bye,
Sebastian
Reply | Threaded
Open this post in threaded view
|

Re: Request for package testing

siko1056
Sebastian Schöps wrote
[...]
I am not sure, if my Octave or your script is guilty. However, I have '/usr/local/include/mpfr.h' but it's not found:
[...]
Do you have the MPFR-libraries installed on your system? It is a runtime and build dependency [1]

[1]: https://octave.sourceforge.io/interval/

On my system (openSUSE Tumbleweed 64-bit) everything works as expected:

>> pkg install interval-2.0.0-crlibm.tar.gz
For information about changes from previous versions of the interval package,'news interval'.
>> ver
----------------------------------------------------------------------
GNU Octave Version: 4.2.0
GNU Octave License: GNU General Public License
Operating System: Linux 4.8.11-1-default #1 SMP PREEMPT Sat Nov 26 18:34:47 UTC 2016 (ff417d1) x86_64
----------------------------------------------------------------------
Package Name  | Version | Installation directory
--------------+---------+-----------------------
    interval *|   2.0.0 | /home/siko1056/octave/interval-2.0.0
>> pkg load interval
>> __check_crlibm__
ans = 1

Kai
Reply | Threaded
Open this post in threaded view
|

Re: Request for package testing

Sebastian Schöps
siko1056 wrote
Sebastian Schöps wrote
[...]
I am not sure, if my Octave or your script is guilty. However, I have '/usr/local/include/mpfr.h' but it's not found:
[...]
Do you have the MPFR-libraries installed on your system? It is a runtime and build dependency [1]
Yes, it's installed in '/usr/local'. However, the include is not found. The question is, whose fault is it? Is my octave installation, the installer or the user to blame :) My octave installation is not in '/usr/local' and therfore mkoctfile does not suggest '/usr/local/include'.

@siku1056 what path does your mkoctfile return?

Bye
Sebastian
Reply | Threaded
Open this post in threaded view
|

Re: Request for package testing

siko1056
Sebastian Schöps wrote
Yes, it's installed in '/usr/local'. However, the include is not found. The question is, whose fault is it? Is my octave installation, the installer or the user to blame :) My octave installation is not in '/usr/local' and therfore mkoctfile does not suggest '/usr/local/include'.

@siku1056 what path does your mkoctfile return?
I think I get your point. On my system the MPFR library is installed in the standard directory:

$ find /usr/ -iname "mpfr.h"
/usr/include/mpfr.h

But not a single variable from the mkoctfile-help-string printed via `mkoctfile -p VAR` lists this `/usr/include` directory. Maybe my gcc/g++ is so kind to include this directory by default and there is something hardcoded in mkoctfile [1]. So your question is, if the interval package needs or provides an option to point to (or detect) the MPFR-installation?

I think this is difficult. Usually, users want to install it via `pkg install -forge interval`. There is no chance to provide a include or library directory to the pkg command (which would definitely be an overkill). One can hack around this by changing the some environment variable, for example running

setenv ("CXX", "g++ -I/usr/local/include")

before the `pkg` command, as mkoctfile seems to look at the environment variables before execution. But this is everything but user friendly.

Kai

[1]: http://hg.savannah.gnu.org/hgweb/octave/file/tip/src/mkoctfile.in.cc
Reply | Threaded
Open this post in threaded view
|

Re: Request for package testing

Oliver Heimlich
Colin, Sebastian, Kai,

thanks for checking.  The crlibm library installs and works correctly on
your machines.

The issue with mpfr.h has nothing to do with my change and should
equally occur when you try to install the last release from Octave Forge.

On 06.12.2016 12:56, siko1056 wrote:
> Sebastian Schöps wrote
>> Yes, it's installed in '/usr/local'. However, the include is not found.
>> The question is, whose fault is it? Is my octave installation, the
>> installer or the user to blame :) My octave installation is not in
>> '/usr/local' and therfore mkoctfile does not suggest '/usr/local/include'.
>>

> So your question is, if the interval package
> needs or provides an option to point to (or detect) the MPFR-installation?

Currently, nothing like that happens in the package.  It just tries to
compile with “-lmpfr” and mkoctfile should do the magic of looking up
libraries and includes.

> I think this is difficult. Usually, users want to install it via `pkg
> install -forge interval`. There is no chance to provide a include or library
> directory to the pkg command (which would definitely be an overkill).

I never had a problem with this, because MPFR development files are
available in most distributions and I never had to install it myself
(into /usr/local/include/).  However, I'd consider looking up libraries
and includes in /usr/local/ a good idea for mkoctfile.  But you would
also have to modify your LD_LIBRARY_PATH to actually use the library at
runtime, wouldn't you?

Best
Oliver

Reply | Threaded
Open this post in threaded view
|

Re: Request for package testing

ederag
On Tuesday, December 06, 2016 23:38:26 Oliver Heimlich wrote:

> Colin, Sebastian, Kai,
>
> thanks for checking.  The crlibm library installs and works correctly on
> your machines.
>
> The issue with mpfr.h has nothing to do with my change and should
> equally occur when you try to install the last release from Octave Forge.
> ...
> > So your question is, if the interval package
> > needs or provides an option to point to (or detect) the MPFR-installation?
>
> Currently, nothing like that happens in the package.  It just tries to
> compile with “-lmpfr” and mkoctfile should do the magic of looking up
> libraries and includes.
> ...

Indeed, the issue also arises with the previous interval package - on forge.

The problem is that mkoctfile does not exactly use the flags given at the octave configure step:

../configure --with-blas="/usr/local/gcc-6.2.0_binutils-2.27_isl/lib64/libopenblas.so" CPPFLAGS="-I/usr/local/gcc-6.2.0_binutils-2.27_isl/include" CFLAGS="-O2 -march=native" CXXFLAGS="-O2 -march=native" FFLAGS="-O2 -march=native" LDFLAGS="-L/usr/local/gcc-6.2.0_binutils-2.27_isl/lib64 -Wl,-rpath,/usr/local/gcc-6.2.0_binutils-2.27_isl/lib64" PKG_CONFIG_PATH=/usr/local/gcc-6.2.0_binutils-2.27_isl/lib64/pkgconfig JAVA_HOME=/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/ --prefix=/usr/local/gcc-6.2.0_binutils-2.27_isl

In particular the LDFLAGS seem to be missing:

g++ -c -I/usr/local/gcc-6.2.0_binutils-2.27_isl/include -fPIC -I/usr/local/gcc-6.2.0_binutils-2.27_isl/include/octave-4.2.0/octave/.. -I/usr/local/gcc-6.2.0_binutils-2.27_isl/include/octave-4.2.0/octave -I/usr/local/gcc-6.2.0_binutils-2.27_isl/include  -pthread -fopenmp -O2 -march=native    mpfr_vector_sum_d.cc -o mpfr_vector_sum_d.o
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... mpfr_to_string_d.cc:23:18: fatal error: mpfr.h: No such file or directory
 #include <mpfr.h>
                  ^
compilation terminated.


The same happens with octave-4.0.1

Best regards,
ederag

Reply | Threaded
Open this post in threaded view
|

installing Forge packages that depend on external libraries

Mike Miller-4
On Wed, Dec 07, 2016 at 21:00:47 +0100, ederag wrote:

> On Tuesday, December 06, 2016 23:38:26 Oliver Heimlich wrote:
> > Colin, Sebastian, Kai,
> >
> > thanks for checking.  The crlibm library installs and works correctly on
> > your machines.
> >
> > The issue with mpfr.h has nothing to do with my change and should
> > equally occur when you try to install the last release from Octave Forge.
> > ...
> > > So your question is, if the interval package
> > > needs or provides an option to point to (or detect) the MPFR-installation?
> >
> > Currently, nothing like that happens in the package.  It just tries to
> > compile with “-lmpfr” and mkoctfile should do the magic of looking up
> > libraries and includes.
> > ...
>
> Indeed, the issue also arises with the previous interval package - on
> forge.

And any package that depends on an external library that is not
installed in a standard system location (for example database, dicom,
image-acquisition, netcdf, zeromq).

> The problem is that mkoctfile does not exactly use the flags given at
> the octave configure step:

Nor should it. The linker flags that were used to build Octave may be,
but are not necessarily, useful to finding libraries for installing
Forge packages.

I think this discussion about how to install packages that depend on
external libraries is useful, but is separate from and not the
responsibility of the interval package.

--
mike