Octave configure can't find Qscintilla library - octave

While attempting to build Octave 3.8.2 on a Solaris 10 Sparc 64 machine, configure tells me it can't find the Qscintilla libraries (and several others too), even though I have them. This is what I'm saying:
./configure --prefix=$HOME/bin/octave --with-blas=./libblas.so --with-lapack=$HOME/octave-3.8.2/liblapack.a --disable-readline --with-curl-libdir=/opt/csw/lib --with-blas=/opt/csw/lib
and this is what I get:
configure: WARNING:
I wasn't able to find a suitable style for declaring a push-pull
parser in a bison input file so I'm disabling bison.
configure: WARNING: Qhull library not found -- this will result in loss of functionality of some geometry functions.
configure: WARNING: HDF5 library not found. Octave will not be able to save or load HDF5 data files.
configure: WARNING: FFTW3 library not found. The slower FFTPACK library will be used instead.
configure: WARNING: FFTW3F library not found. The slower FFTPACK library will be used instead.
configure: WARNING: GLPK library not found. The glpk function for solving linear programs will be disabled.
configure: WARNING: cURL library not found. The ftp objects, urlread and urlwrite functions will be disabled.
configure: WARNING: FLTK config script not found. Native graphics will be disabled.
configure: WARNING: qrupdate not found. The QR & Cholesky updating functions will be slow.
configure: WARNING: AMD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CAMD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: COLAMD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CCOLAMD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CHOLMOD library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CXSparse library not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: UMFPACK not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: ARPACK not found. The eigs function will be disabled.
configure: WARNING: Qscintilla library not found -- disabling built-in GUI editorconfigure: WARNING:
configure: WARNING: I didn't find the necessary libraries to compile native
configure: WARNING: graphics. It isn't necessary to have native graphics,
configure: WARNING: but you will need to have gnuplot installed or you won't
configure: WARNING: be able to use any of Octave's plotting commands
configure: WARNING:
configure:
configure: NOTE: Libraries or auxiliary programs may be skipped if they are
configure: NOTE: not found OR if they are missing required features on your
configure: NOTE: system.
And this is what I have:
# pwd
/opt/csw/lib
# ls *qsci*
libqscintilla2.so libqscintilla2.so.11.3
libqscintilla2.so.11 libqscintilla2.so.11.3.0
# ls *curl*
libcurl.so.4 libcurl.so.4.3.0
#
The question is:
How do I inform the Octave configure of where to find the Qscintilla (and other) libraries it's wanting? Thanks.

I had a similar issue trying to build octave (the repo version 4.0 or 4.2, I'm not sure) from source, under Ubuntu 64 bits. Like you, there were plenty of lines like
configure: WARNING: ... library not found.
I had a hard time but I finally managed to make the configure file of octave find the dependencies :
1) I made an alias of /usr/lib/x86_64-linux-gnu because I found out that many libraries were installed here instead of in /usr/lib64 where the configure script search them :
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
2) I look for octave dependencies with
apt-cache depends octave
and then I made sure they were installed in synaptics, and most importantly their "-dev" versions.
Then when I made ../configure and it worked for most libraries. Another possible problem you may have is if you don't use the instructions in octave/etc/HACKING, you have to do :
cd octave
./bootstrap
mkdir .build
cd .build
../configure
make
The only library that is not found on my computer is called 'osmesa' but it seems it's not requested for the 3.8 version so it should not be a problem for you (just saying in case you want to install from the repo source like me).

try building repos
apt-get build-dep octave
or
yum-builddep octave
this worked for me, except blas library for fortran77
then I tried (in Centos -yum style)
yum install lapack64-devel lapack64
and just in case you haven't installed them yet:
yum install gl2ps-devel qrupdate-devel qt-devel qscintilla-devel java-devel
probably there are still many missing but these solved the problems above, at least in part

Related

Octave forge packages installation

I'm trying to install image-2.6.1 package to GNU Octave, version 4.0.0. I downloaded image-2.6.1.tar.gz and tried to install it with
pkg install /home/vladimirmatveev/Downloads/image-2.6.1.tar.gz
but get an error.
configure: error: in `/tmp/oct-BAtlFb/image-2.6.1/src':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
checking for a sed that does not truncate output... /bin/sed
checking for octave... /usr/bin/octave
checking for mkoctfile... /usr/bin/mkoctfile
checking whether the C++ compiler works... no
pkg: error running the configure script for image.
error: called from 'configure_make' in file /usr/share/octave/4.0.0/m/pkg/private/configure_make.m near line 79, column 9
I am sure I have C/C++ compilers, they are gcc and g++ (when I am trying to install them with apt-get it says I already have a newest version and I am sure it is true).
I tried to set c/c++ compilers to system variables with
export CC=/usr/bin/gcc-4.8
export CXX=/usr/bin/g++-4.8
or
export CC=/usr/bin/gcc-5
export CXX=/usr/bin/g++-5
(I have both versions) but it didn't helped. It usually works for me when cmake can not find a compiler.
I found im-config.log file, but it contains only
Script for ibus started at run_im.
Script for auto started at run_im.
Script for default started at run_im.
I am not sure this is that config file which was mentioned in error message, but it is the only file which has suitable modification date.
I am working at ubuntu 16.04.
I unpackaged .tar.gz, cd to it and to src/, then run ./configure and there was no troubles found while checking compiler, here is the console log.
checking for a sed that does not truncate output... /bin/sed
checking for octave... /usr/bin/octave
checking for mkoctfile... /usr/bin/mkoctfile
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/bin/g++-5 accepts -g... yes
checking for /usr/bin/g++-5 option to enable C++11 features... -std=gnu++11
checking whether xmin is in the octave::math namespace... no
checking whether templated lambda functions accept '&const int'... yes
configure: creating ./config.status
config.status: creating im2double.m
config.status: creating Makefile
config.status: creating config.h
Here is full config log http://pastebin.com/u6MNSqCB

Octave and warning "ARPACK library found, but does not seem to work properly; disabling eigs function"

Situation
I work with Ubuntu 14.04. I am building GNU Octave 4.2.1 from source with GNU 6.3.0. This version of Octave is quite new, but I see the issue arising also when trying to compile older Octave releases (down to 3.8.1).
I configure the build of Octave with
${sourcedir}/configure --prefix=/opt/octave/4.2.1 \
--with-java-homedir=/usr/lib/jvm/default-java \
--with-java-libdir=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
Issue
The compilation is successful but the undesired warning shows up
configure: WARNING: ARPACK library found, but does not seem to work properly; disabling eigs function
I would rather like to have the eigs() function in place.
Information
I have built ARPACK-ng myself with the same compiler. All tests in the test suite (make check) are passed. The environment variables LD_LIBRARY_PATH and PKG_CONFIG_PATH point to the ARPACK library directory as intended. The configure file of Octave recognizes that location correctly, as seen before.
Besides, I get the same message if I compile Octave in another computer where ARPACK is installed natively (libarpack2 and libarpack2-dev version 3.1.5-2). It does not change a thing if I also install the related extra libraries libarpack++2c2a and libarpack++2-dev using the package repository. So the issue appears to be independent of the origin of the ARPACK files.
The part of the configure.ac file of Octave that throws this error is
### Check for ARPACK library.
save_LIBS="$LIBS"
LIBS="$LAPACK_LIBS $BLAS_LIBS $FLIBS $LIBS"
OCTAVE_CHECK_LIB([arpack], ARPACK,
[ARPACK not found. The eigs function will be disabled.],
[],
[dseupd],
[Fortran 77], [don't use the ARPACK library, disable eigs function],
[warn_arpack=
OCTAVE_CHECK_LIB_ARPACK_OK(
[AC_DEFINE(HAVE_ARPACK, 1, [Define to 1 if ARPACK is available.])],
[warn_arpack="ARPACK library found, but does not seem to work properly; disabling eigs function"])])
LIBS="$save_LIBS"
The farthest I go in tracing back the issue is that the subroutine OCTAVE_CHECK_LIB_ARPACK_OK issuing the warning lives in the file ${octave_source}/m4/acinclude.m4. It is written in m4 language, which I don't know
Question
Is it possible to understand why ARPACK 'does not seem to work properly'?
Is there any workaround for this?
Is this a false alarm or a bug?

configure: WARNING: FFTW3F library not found. The slower FFTPACK library will be used instead

I'm compiling octave on my LFS - Linux from scratch - system.
While configuring octave, I receive a warning:
configure: WARNING: FFTW3F library not found. The slower FFTPACK library will be used instead.
I compiled and installed FFTW 3.3.4, and then reconfigured octave, however I still receive the following messages:
checking fftw3.h usability... yes
checking fftw3.h presence... yes
checking for fftw3.h... yes
checking for fftw_plan_dft_1d in -lfftw3... yes
checking for fftw3.h... (cached) yes
checking for fftwf_plan_dft_1d in -lfftw3f... no
configure: WARNING: FFTW3F library not found. The slower FFTPACK library will be used instead.
I notice that FFTW 3.3.4 installs libfftw3.so but NOT libfftw3f.so, that's why even after installing FFTW 3.3.4, octave cannot find FFTW3F library. Now, I wonder how I can install libfftw3f.so.
It looks like you have the double precision FFTW libraries (libfftw3) but not the single precision versions (libfftw3f). Build it again with:
./configure --enable-float --enable-sse && make install
(assuming we're talking x86 here).
This should then install the libfftw3f libraries next to the existing libfftw3 libs.

WordNet: file was built for i386 which is not the architecture being linked (x86_64)

I get the following error when running make trying to compile WordNet 3.0:
gcc -m64 -g -O2 -o wishwn wishwn-tkAppInit.o wishwn-stubs.o -L../lib -lWN - F/Library/Frameworks -framework Tk -F/Library/Frameworks -framework Tcl -lpthread -framework CoreFoundation -framework Cocoa -framework Carbon -framework IOKit -lz -lpthread -framework CoreFoundation
ld: warning: ignoring file /Library/Frameworks/Tk.framework/Tk, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/Tk.framework/Tk
Undefined symbols for architecture x86_64:
"_Tk_Init", referenced from:
_Tcl_AppInit in wishwn-tkAppInit.o
"_Tk_MainEx", referenced from:
_main in wishwn-tkAppInit.o
"_Tk_SafeInit", referenced from:
_Tcl_AppInit in wishwn-tkAppInit.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [wishwn] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I'm running Tcl 8.6 installed via ActiveTcl.
Any ideas?
Each executable must (under all normal circumstances) be built for a single architecture, e.g., for just i386 (32-bit Intel-ish) or x86_64 (64-bit Intel-ish), as while it is possible to have a single CPU support multiple architectures, switching between them is formally a context switch and so is only done between the OS kernel and your code. (Some platforms — notably OSX — have supported multi-architecture binaries — “fat” binaries — in the past, but that's very much like having a single meta-architecture, and you're not supposed to do that now.) This in turn means that the libraries that are linked in, whether shared libraries or not, must also match the architecture you're building for.
Unfortunately, the libraries that you're trying to actually use are built for a different architectures: the ActiveState build you're trying to link against looks like it is for i386, yet you're trying to make a 64-bit version. That won't work.
The simplest way is probably to get the sources for Tcl and Tk and build them in the configuration you want; that's what I do on OSX, and it's easy. Grab the sources from the official release location on SourceForge. To build Tcl for OSX, run:
cd tcl8.6.1/unix
./configure --prefix=/where/you/will/install --enable-64bit
make
make test
sudo make install
You might pass in --enable-framework to configure (but I don't), you might omit the make test and you might not need to use sudo with make install (it depends on where you're installing to).
For Tk, you do:
cd tk8.6.1/unix
./configure --prefix=/where/you/will/install --enable-64bit --enable-aqua
make
sudo make install
You might need to pass in --with-tcl=/location/of/tclConfig.sh (where that's the tclConfig.sh that you just installed above) but the build scripts find it automatically if you've put the Tk sources next to the Tcl sources. There's a test suite for Tk, but it's much more intrusive than the Tcl one (since it has to pop up windows, steal the focus, grab the mouse pointer, that sort of thing; it's a GUI toolkit, so you should expect that sort of thing) which means I can totally understand you not running the unit tests.
Make sure you have i386 and x86_64 listed in your Architectures in Build settings for your lib. Also set Build Active Architecture Only explicitly to No.

skipping incompatible libcudart.so when searching for -lcudart

When I compile .cu file with nvcc 5.0, the compiler gives me following information.
/usr/bin/ld: skipping incompatible /usr/local/cuda-5.0/lib/libcudart.so when searching for -lcudart
It seems either a warning or an error. I don't know what the matter is.
Is there anyone knowing more details about this information?
This warning often happens when trying to link a 64-bit code with a 32-bit library, see this question: Skipping Incompatible Libraries at compile.
You need to distinguish 2 library files:
$CUDA_HOME/lib/libcudart.so, the 32-bit version of the cudart library.
$CUDA_HOME/lib64/libcudart.so, the 64-bit version of the cudart library.
(in your case, $CUDA_HOME is /usr/local/cuda-5.0)
Basically, the linker finds the 32-bit library first (-L options are searched in order) and returns that warning even if it ends up finding the proper library.
You probably need to add $CUDA_HOME/lib64 to your LD_LIBRARY_PATH environment variable before $CUDA_HOME/lib so that ld can find the proper library for your 64-bit architecture before the 32-bit version.