Octave and OpenSUSE 11.2

Hi guys,

I installed octave in my OpenSUSE 11.2 KDE system from Yast. When I launch it with the command “octave” on my shell, this is the message I receive: “octave: error while loading shared libraries: liboctave.so: cannot open shared object file: No such file or directory”.
What’s the problem? Is it a known problem to be solved in the 11.2 RC2 or I have to do something else?

Thank you in advance!!!

You have to bear in mind that 11.2 has not been released and it can sometimes take some time to update all the packages in the repos for a new release. Try uninstalling it today and reinstalling it next week and, if there is a problem then, report it as a bug.

I installed the “octave-3.0.2-2.pm.8.2” today from “http://packman.links2linux.de” and noticed the same issue.

To solve this I did “sudo /sbin/ldconfig /usr/lib/octave-3.0.2” and everything worked, hope this helps.

Very useful:

[packman] [PM] octave 3.0.2-1.1 (openSUSE 11.1/i586)](http://www.mail-archive.com/packman@links2linux.de/msg03090.html)

/cite

(I have
64bit system). As root I used
echo “/usr/lib64/octave-3.0.2” > /etc/ld.so.conf.d/octave.conf && ldconfig
and it works.
/etc/ld.so.conf.d/octave.conf has to be there with one line in it to get it
working:
$ cat /etc/ld.so.conf.d/octave.conf
/usr/lib64/octave-3.0.2
After the change it works fine…
Best regards,
Vojtěch Zeisek

/cite

I grabbed Octave (v. 3.2.3) from the Build Service and didn’t have this problem.

Hello, first post here for me. :smiley:

**OpenSuse11.2 Linux 2.6.31.12-0.1-desktop x86_64
**

I have a fresh install of OpenSuse11.2 (64bit), fresh network install from novel on to a 64 bit machine.

OS: Linux 2.6.31.12-0.1-desktop x86_64
System: openSUSE 11.2 (x86_64)
KDE: 4.3.1 (KDE 4.3.1) “release 6”

I have then added the following repository,

/repositories/openSUSE:/11.2:/Contrib/standard/

and installed octave through the Software Management application.

Restart the computer and then tried to run,

:~>octave

only to get,

:~>octave: error while loading shared libraries: liboctinterp.so: cannot open shared object file: No such file or directory

I have also created soft links <library name>.so -> <library name>.so.3.2.2 withing the /usr/lib64/octave-3.2.2 directory
and softlinks from /usr/lib64 pointing to the .so files in the octave directory.

After a restart still, get the same error as above.

I usually compile octave myself, making sure it has the suitsparse, but that now for some reason is also giving me
a lot of errors I did not get before. I may need to ask those questions in another thread though.

Anyone had any luck?

Edit: “/sbin/ldconfig /usr/lib64/octave-3.2.2/” worked. I tried this before, why did it just suddenly decide to work?

Can I ask questions about my compile errors here?

I have found I do have to run

/sbin/ldconfig /usr/lib64/octave-3.2.2/
each time
I log in. Apart from adding it to a startup script is there a way
to make the action above more permanent?

creditcrunch wrote:
> I have then added the following repository,
>
> /repositories/openSUSE:/11.2:/Contrib/standard/
>
> and installed octave through the Software Management application.

by Software Management application do you mean YaST? or Zypper, or a
“1-Click Install” or what?

> Restart the computer and then tried to run,

why did you restart the computer? that should not be necessary…

> :~>octave
>
> only to get,
>
> :~>octave: error while loading shared libraries: liboctinterp.so:
> cannot open shared object file: No such file or directory

tell me again how you installed…i ask because YaST/Zypper normally
solves all of those kinds of dependencies…OR tells you it can’t so
that you can decide to proceed or not…or proceed and solve them
yourself later…

> I have also created soft links <library name>.so -> <library
> name>.so.3.2.2 withing the /usr/lib64/octave-3.2.2 directory
> and softlinks from /usr/lib64 pointing to the .so files in the octave
> directory.

why? did YaST fail to do that also?

> After a restart still, get the same error as above.

> I usually compile octave myself, making sure it has the suitsparse, but
> that now for some reason is also giving me
> a lot of errors I did not get before. I may need to ask those
> questions in another thread though.
>
> Anyone had any luck?
>
> Edit: “/sbin/ldconfig /usr/lib64/octave-3.2.2/” worked. I tried this
> before, why did it just suddenly decide to work?
>
> Can I ask questions about my compile errors here?

sure…

i take it you didn’t use YaST/Zypper or an RPM, but rather a tarball,
correct?

you might benefit from this page: http://en.opensuse.org/Concepts
especially the parts about software handling, in section 2…


palladium

creditcrunch wrote:
> I have found I do have to run
>
>> /sbin/ldconfig /usr/lib64/octave-3.2.2/ each time
> I log in. Apart from adding it to a startup script is there a way
> to make the action above more permanent?

now that i’ve tried to answer two other posts of yours i guess i now
have to assume that you did compile but had errors, right?

let me ask did you run configure as a regular user, then run make as a
regular user, and then run make install as root?

i think failing to do it that way would result in your libs not being
found…maybe…

or perhaps there was a readme in the tarball giving another
(non-normal) compile/install procedure that you followed?? tell us
about it…


palladium

Palladium,

Thank you for your quick reply.

I tried 2 approaches.

  1. Fresh Install from YAST, this gave the missing library error I mentioned above. Using “/sbin/ldconfig /usr/lib64/octave-3.2.2/” works but I have to do that before each time I start Octave. So yes - YAST failed
    to do this for octave. This is a fresh install of SUSE11.2.

  2. Compilation from tar.gz - this I did as root, I ran the config as root also. Would you like me to go in to more detail here about my experience with the tar.gz compile rout? I gave up on this method and not using my
    own compiled version. I will put together my compile errors and post them up in a bit. Thanks.

:shame:Restart - I know, there is no need for this. Last
resort, hangover from my windows user days… :shame:

Here is my ./config , run as root, I will state my queries and
experience getting this at the end of this code quote.


Octave is now configured for x86_64-unknown-linux-gnu

  Source directory:     .
  Installation prefix:  /usr/local
  C compiler:           gcc   -Wall -W -Wshadow -g -O2
  C++ compiler:         g++   -Wall -W -Wshadow -Wold-style-cast -g -O2
  Fortran compiler:     gfortran -O
  Fortran libraries:     -L/usr/lib64/gcc/x86_64-suse-linux/4.4 -L/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.4/../../.. -lhdf5 -lz -lgfortranbegin -lgfortran -lm
  BLAS libraries:       -llapack -lblas
  FFTW libraries:       -lfftw3
  GLPK libraries:       -lglpk
  UMFPACK libraries:
  AMD libraries:
  CAMD libraries:
  COLAMD libraries:
  CCOLAMD libraries:
  CHOLMOD libraries:
  CXSPARSE libraries:
  HDF5 libraries:       -lhdf5
  CURL libraries:       -lcurl
  REGEX libraries:      -L/usr/lib64 -lpcre
  QHULL libraries:      -lqhull
  LIBS:                 -lreadline  -lncurses -ldl -lhdf5 -lz -lm
  Default pager:        less
  gnuplot:              gnuplot

  Do internal array bounds checking:  false
  Build static libraries:             false
  Build shared libraries:             true
  Dynamic Linking:                    true (dlopen)
  Include support for GNU readline:   true
  64-bit array dims and indexing:     false

configure: WARNING: UMFPACK not found.  This will result in some lack of functionality for sparse matrices.
configure: WARNING: COLAMD not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CCOLAMD not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CHOLMOD not found. This will result in some lack of functionality for sparse matrices.
configure: WARNING: CXSparse not found. This will result in some lack of functionality for sparse matrices.

Most of the required libraries have been found on YAST, and was pretty straight forward… except the following.

Libraries I had no problems finding and installing


1)Qhull

I tried to download sources from Qhull code for Convex Hull, Delaunay Triangulation, Voronoi Diagram, and Halfspace Intersection about a Point but the ones available at that website failed to configure.

I found reliable qhull source code from the following,

Commits in qhull/qhull:master - Gitorious

2)hdf5

I downloaded hdf5-1.8.4 from,

Obtaining the Latest HDF5 Software

Also SZIP,ZLIB are needed, which I took from the same page.

Libraries I need help with


Looking at the config output the following are not detected.


  UMFPACK libraries:
  AMD libraries:
  CAMD libraries:
  COLAMD libraries:
  CCOLAMD libraries:
  CHOLMOD libraries:
  CXSPARSE libraries:

I downloaded the suitesparse sources from
SuiteSparse: a Suite of Sparse matrix packages

I have compiled this successfully and have the libraries,
one thing to watch out for is the metis-4.0 package, when
compiling there is a duplicate/conflict with a variable.

In the directory /metis-4.0/Lib there is a file called
rename.h

Find the line, 413 I think, where you have


#define log2                            __log2

Change the __log2 to __Log2

Metis-4.0 then compiled correctly for me.

I now have the libraries and header files for all of the above missing list items,
I have placed then everywhere where I can think of…

/usr/local/lib64/
/usr/libg64/

etc… all obvious places but the octave configure refuses to
find them!

So question 1) How can I get octave to see these libraries.

question 2) Compile questions, I will get to these problems once octave can see the SuiteSparse libraries.

Thanks, CC.

we probably already passed my level of competency on this matter, but
just let me add a couple of things before i bow out and hope a real
guru happens in to help you:

first: when compiling always run configure and make as a regular user,
and if it is your machine (you have root access) it is usually best to
then “make install” as root, which allows a program to be used by all
users on the machine (and you can add a guest account, hand that to
grandma and she won’t be accidentally be offended by the words in your
music :wink: or whatever)…however, you should never run configure and
make as root for reasons i don’t recall, really…but one might be
security and another might be links/pointers to libs don’t get set right…

second: since running /sbin/ldconfig /usr/lib64/octave-3.2.2/ works to
make octave do as you wish you could make a little script to do that
and then start octave…and, then simply make an link to your script
which you can click, rather than the icon you do now… make sense?


palladium

Hello palladium,

*) Config and compile as non-root.
-Yes, I will amend my ways. I thought you could only do this as root.
Thanks for the info.

*) Yea, I could put a script together I was about to but just found although the repository has SuiteSparse there are some other commands
not included - such as imread. Fails with errors. So, I need to compile my own.

I tried to compile without the sparsesuit (which is not critical to an octave compile) and got… these errors.

oct-md5.cc: In function ‘std::string oct_md5(std::string)’:
oct-md5.cc:47: error: ‘sprintf’ was not declared in this scope
oct-md5.cc: In function ‘std::string oct_md5_file(std::string)’:
oct-md5.cc:55: error: ‘fopen’ was not declared in this scope
oct-md5.cc:73: error: ‘fread’ was not declared in this scope
oct-md5.cc:76: error: ‘fclose’ was not declared in this scope
oct-md5.cc:82: error: ‘sprintf’ was not declared in this scope

This is octave-3.0.0 - I will find out what more recent versions say.

Hello creditcrunch,

I see you tried a lot of things already.
Let me ask some questions

  1. do you prefer to compile octave yourself because you had a problem with
    the package from contrib?
    or
  2. do you compile it now because you need a more customized octave than the
    one available from the repositories?

If it is only because of the problem with contrib maybe you will give
octve-3.2.4 from packman repository a try.

I compile octave for two years now myself due to the second reason and I
know that compiling this application is a somewhat tricky thing and it is
sometimes not easy for me to explain every step to someone else because I do
not make notes what I did to make it run with all features but figure it out
everytime I do it from scratch.

First a note on configure and make:
I completely agree with palladium that running them as root is not the best
thing to do, only make install should be run as root.

There are several possibilities why the configure cannot see your
suitesparse and so on.
It needs to find the libraries itself and it needs to find the headers for
the libraries (are you sure that the headers and libraries are available in
/usr/lib, /usr/include or /usr/local/lib, /usr/local/include, lib64 if you
compile 64bit libs?).

But nethertheless maybe you should start the easier way and compile only
octave itself and not all the libs you need for it yourself.

There is a detailed description available at the following link

http://www.schoeps.org/home/2010/01/install-octave-on-opensuse/

(I do it in a different way but my way is more complicated and time
consuming since I compile everything myself)

The article from schoeps contains one typo

sudo zypper ar http://ftp.gwdg.de/pub/linux/misc/packman/ Packman

is not correct it should be

sudo zypper ar http://ftp.gwdg.de/pub/linux/misc/packman/suse/11.2/ Packman

Hope that helps you a little bit.
If not don’t hesitate to ask again, I will then try to describe my steps for
you as detailed as possible.

Thank you I will read that.

I want to compile octave so I can have extra features.

I have placed the following library files in /usr/local/lib64

libamd.a libbtf.a libcamd.a libccolamd.a libcholmod.a libcolamd.a libcsparse.a libcxsparse.a libklu.a libldl.a libumfpack.a

I have placed the following header files in /usr/local/include

amd.h cholmod_cholesky.h cholmod_partition.h umfpack_col_to_triplet.h umfpack.h umfpack_report_perm.h umfpack_symbolic.h
amd_internal.h cholmod_complexity.h cholmod_supernodal.h umfpack_defaults.h umfpack_load_numeric.h umfpack_report_status.h umfpack_tictoc.h
btf.h cholmod_config.h cholmod_template.h umfpack_free_numeric.h umfpack_load_symbolic.h umfpack_report_symbolic.h umfpack_timer.h
btf_internal.h cholmod_core.h colamd.h umfpack_free_symbolic.h umfpack_numeric.h umfpack_report_triplet.h umfpack_transpose.h
camd.h cholmod.h cs.h umfpack_get_determinant.h umfpack_qsymbolic.h umfpack_report_vector.h umfpack_triplet_to_col.h
camd_internal.h cholmod_internal.h klu.h umfpack_get_lunz.h umfpack_report_control.h umfpack_save_numeric.h umfpack_wsolve.h
ccolamd.h cholmod_io64.h klu_internal.h umfpack_get_numeric.h umfpack_report_info.h umfpack_save_symbolic.h
cholmod_blas.h cholmod_matrixops.h klu_version.h umfpack_get_symbolic.h umfpack_report_matrix.h umfpack_scale.h
cholmod_check.h cholmod_modify.h ldl.h umfpack_global.h umfpack_report_numeric.h umfpack_solve.h

But still… a confic of octave does not find them. :frowning:

I will answer you later (after my working hours) concerning the place where
the headers belong to since my lunchtime is now over.

I remeber something like the headers for suitesparse have to be in
/usr/local/include/suitesparse/

If you want to see now where the configure script looks them up you have to
open the configure file with a text editor and search for the lines where it
tests for the availability of the libraries.

Configure for octave-3.0.0 is a success.

This is what I did,

export CPPFLAGS=-I/usr/local/include/suitesparse
export LDFLAGS=-L/usr/local/lib64

I looked at the config.log file and found that I had missed one
header file!!!

From the SuiteSparse sub-dir I copied the file UFconfig/UFconfig.h
to /usr/local/include/suitesparse (along with all other header files.)

The config went well. I will list the output now for curiousity.
I will run the compile, and wait and see about errors. I hope you can help me with them.

Thanks.


Octave is now configured for x86_64-unknown-linux-gnu

  Source directory:     .
  Installation prefix:  /usr/local
  C compiler:           gcc   -Wall -W -Wshadow -g -O2
  C++ compiler:         g++   -Wall -W -Wshadow -Wold-style-cast -g -O2
  Fortran compiler:     gfortran -O
  Fortran libraries:     -L/usr/local/lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.4 -L/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.4/../../.. -lhdf5 -lz -lgfortranbegin -lgfortran -lm
  BLAS libraries:       -llapack -lblas
  FFTW libraries:       -lfftw3
  GLPK libraries:       -lglpk
  UMFPACK libraries:    -lumfpack
  AMD libraries:        -lamd
  CAMD libraries:       -lcamd
  COLAMD libraries:     -lcolamd
  CCOLAMD libraries:    -lccolamd
  CHOLMOD libraries:    -lcholmod
  CXSPARSE libraries:   -lcxsparse
  HDF5 libraries:       -lhdf5
  CURL libraries:       -lcurl
  REGEX libraries:      -L/usr/lib64 -lpcre
  QHULL libraries:      -lqhull
  LIBS:                 -lreadline  -lncurses -ldl -lhdf5 -lz -lm
  Default pager:        less
  gnuplot:              gnuplot

  Do internal array bounds checking:  false
  Build static libraries:             false
  Build shared libraries:             true
  Dynamic Linking:                    true (dlopen)
  Include support for GNU readline:   true
  64-bit array dims and indexing:     false


The compile stops with the following,


make[2]: Entering directory `/octave-3.0.0/liboctave'
mkdir pic
touch stmp-pic
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 Bounds.cc -o pic/Bounds.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 CollocWt.cc -o pic/CollocWt.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 DASPK.cc -o pic/DASPK.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 DASRT.cc -o pic/DASRT.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 DASSL.cc -o pic/DASSL.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 FEGrid.cc -o pic/FEGrid.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 LinConst.cc -o pic/LinConst.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 LSODE.cc -o pic/LSODE.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 NLEqn.cc -o pic/NLEqn.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 ODES.cc -o pic/ODES.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 Quad.cc -o pic/Quad.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 Range.cc -o pic/Range.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 data-conv.cc -o pic/data-conv.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 dir-ops.cc -o pic/dir-ops.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 file-ops.cc -o pic/file-ops.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 file-stat.cc -o pic/file-stat.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 glob-match.cc -o pic/glob-match.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 idx-vector.cc -o pic/idx-vector.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 lo-ieee.cc -o pic/lo-ieee.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 lo-mappers.cc -o pic/lo-mappers.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 lo-specfun.cc -o pic/lo-specfun.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 lo-sysdep.cc -o pic/lo-sysdep.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 lo-utils.cc -o pic/lo-utils.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 mach-info.cc -o pic/mach-info.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 oct-alloc.cc -o pic/oct-alloc.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 oct-env.cc -o pic/oct-env.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 oct-fftw.cc -o pic/oct-fftw.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 oct-group.cc -o pic/oct-group.o
g++ -c -I/usr/local/include/suitesparse  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wold-style-cast -g -O2 oct-md5.cc -o pic/oct-md5.o
oct-md5.cc: In function ‘std::string oct_md5(std::string)’:
oct-md5.cc:47: error: ‘sprintf’ was not declared in this scope
oct-md5.cc: In function ‘std::string oct_md5_file(std::string)’:
oct-md5.cc:55: error: ‘fopen’ was not declared in this scope
oct-md5.cc:73: error: ‘fread’ was not declared in this scope
oct-md5.cc:76: error: ‘fclose’ was not declared in this scope
oct-md5.cc:82: error: ‘sprintf’ was not declared in this scope



Solved again…

Edited the following file,

octave-3.0.0/liboctave> vi oct-md5.h

I added the following,


#include <stdio.h>

why would this line be excluded? Its missing in other versions
of octave source I have downloaded?

:’(

Jeez… its only by luck I found this… octave is now compiling away in the background, hope it does not encounte any other problems.

Anyone able to contact octave people and ask them why?

I’ll let you know how I get on.

Hope you don’t mind me putting up a running commentary of what I am encountering, it may be of help to someone in the future.

latest error.


/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: /usr/local/lib64/libcholmod.a(cholmod_common.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib64/libcholmod.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

I will recompile libcholmod with the -fPIC option and see if it helps.

Anyone know a good tutorial on shared libraries.