$ make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/toutiosa/Downloads/octaviz
[ 0%] Built target vtkWrapOctave
[ 0%] Built target octaviz
[ 0%] Generating vtk_get_pointer.oct
/usr/bin/ld: /usr/local/lib/octave-2.1.73/liboctinterp.a(defun.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/octave-2.1.73/liboctinterp.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [Common/vtk_get_pointer.oct] Error 1
make[1]: *** [Common/CMakeFiles/Common.dir/all] Error 2
make: *** [all] Error 2
[toutios@kronos octaviz]$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/toutiosa/Downloads/octaviz
Octave: 2.1.73, VTK: 5.0.4, Octaviz: 0.4.5, 64-bit Red Hat Enterprise Linux 4
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry. Octaviz should work with octave-2.1.73, or at least it used to. However, please do try an updated version of octave (>=2.9.9), since 2.1.73 is quite old, and also use octaviz-0.4.6. If that works, please report back. Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not certain, but the 2.1 series of Octave might not build shared libraries by default. Can you recompile Octave with the "--enable-shared" option and try again?
If not, please post the the output Octave prints after configuring, similarly to the following:
================================================
Octave is now configured for x86_64-pc-linux-gnu
OK, my original problem was that I couldn't compile the latest (2.9.17) version of Octave on that machine. It is one of these cases where it configures OK but make has a weird problem.
But I guess this is out of the scope of this forum.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found a solution there, and managed to compile it. However I am still not able to make octaviz 0.4.6.
[toutios@kronos octaviz]$ make
[ 0%] Built target vtkWrapOctave
[ 0%] Built target octaviz
[ 0%] Generating vtkAbstractArray.oct
/usr/bin/ld: /usr/local/lib/libvtkCommon.a(vtkAbstractArray.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libvtkCommon.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [Common/vtkAbstractArray.oct] Error 1
make[1]: *** [Common/CMakeFiles/Common.dir/all] Error 2
make: *** [all] Error 2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like a configure problem, either with octaviz itself or possible dependencies. Try running cmake (or ccmake) again with Octaviz and double check your options. Some trial and error with cmake might resolve the issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I suppose a compiling problem with Octave. toutios, can you post the build log of Octave? I suspect that Octave's libraries were compiled without the proper -fPIC flag.
Thanks
Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(Chose one of the "Installed" links). In this case, there's even more information about which packages are installed for building the package.
The idea behind a build log is that one can see what happened. From your build log, it should be obvious that there's no -fPIC flag during Octave's compilation.
General hint: build logs are ususally large, so don't send them to mailing lists unless explicitely requested.
Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I rebuilt octave with -fPIC, same problem, and then I rebuilt VTK with -fPIC. Octaviz building actually went through the previous rough spot but then I got this:
It compiled OK with this, thanks Jonathan. Now I will have to make it work!
octave:6> vtk_plot3(c(:,1),c(:,2),c(:,3));
error: libvtkCommon.so.5.0: cannot open shared object file: No such file or directory
error: called from `vtk_plot3' in file `/usr/local/share/octave/2.9.17/site/m/octaviz/vtk_plot3.m'
But anyway, it's Friday evening...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Isn't that frustrating? Everything finally compiles, you startup Octave, run an octaviz function with much anticipation, and it still doesn't work! As you can tell, I have experienced this one also. You just have to let your system know about the shared libraries. Your linux distribution documentation should advise you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
$ make
-- Configuring done
-- Generating done
-- Build files have been written to: /home/toutiosa/Downloads/octaviz
[ 0%] Built target vtkWrapOctave
[ 0%] Built target octaviz
[ 0%] Generating vtk_get_pointer.oct
/usr/bin/ld: /usr/local/lib/octave-2.1.73/liboctinterp.a(defun.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/octave-2.1.73/liboctinterp.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [Common/vtk_get_pointer.oct] Error 1
make[1]: *** [Common/CMakeFiles/Common.dir/all] Error 2
make: *** [all] Error 2
[toutios@kronos octaviz]$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/toutiosa/Downloads/octaviz
Octave: 2.1.73, VTK: 5.0.4, Octaviz: 0.4.5, 64-bit Red Hat Enterprise Linux 4
Octaviz does not work with octave-2.1.73. You need octave-2.9.9 or higher.
Sorry. Octaviz should work with octave-2.1.73, or at least it used to. However, please do try an updated version of octave (>=2.9.9), since 2.1.73 is quite old, and also use octaviz-0.4.6. If that works, please report back. Thanks.
How did you compile Octave?
Thomas
I do not remember doing anything fancy when compiling Octave. Probably just configure-make-make install.
I'm not certain, but the 2.1 series of Octave might not build shared libraries by default. Can you recompile Octave with the "--enable-shared" option and try again?
If not, please post the the output Octave prints after configuring, similarly to the following:
================================================
Octave is now configured for x86_64-pc-linux-gnu
Source directory: .
Installation prefix: /usr
C compiler: /usr/bin/gcc -Wall -W -Wshadow -g -O2
C++ compiler: /usr/bin/g++ -Wall -W -Wshadow -g -O2
...
================================================
Thomas
OK, my original problem was that I couldn't compile the latest (2.9.17) version of Octave on that machine. It is one of these cases where it configures OK but make has a weird problem.
But I guess this is out of the scope of this forum.
> But I guess this is out of the scope of this forum.
Depends. What kind of problems did you experience with 2.9.17?
Thomas
My problem with 2.9.17 is described in:
http://www.nabble.com/configure-ok--make-failure-of--octave-2.9.17-t4931609.html
I found a solution there, and managed to compile it. However I am still not able to make octaviz 0.4.6.
[toutios@kronos octaviz]$ make
[ 0%] Built target vtkWrapOctave
[ 0%] Built target octaviz
[ 0%] Generating vtkAbstractArray.oct
/usr/bin/ld: /usr/local/lib/libvtkCommon.a(vtkAbstractArray.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libvtkCommon.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [Common/vtkAbstractArray.oct] Error 1
make[1]: *** [Common/CMakeFiles/Common.dir/all] Error 2
make: *** [all] Error 2
Looks like a configure problem, either with octaviz itself or possible dependencies. Try running cmake (or ccmake) again with Octaviz and double check your options. Some trial and error with cmake might resolve the issue.
I suppose a compiling problem with Octave. toutios, can you post the build log of Octave? I suspect that Octave's libraries were compiled without the proper -fPIC flag.
Thanks
Thomas
I found this page describing exactly this problem:
http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3
So, I guess a walkthrough is to add -fPIC to C[XX]FLAGS and recompile Octave. I'll just do it and report back.
(regarding the "build log", as a relatively newbie i should ask what do you exactly mean)
Thanks
Asterios
> (regarding the "build log", as a relatively newbie i should ask what do you exactly mean)
The textual output of "configure" and "make". Examples for Debian:
http://buildd.debian.org/pkg.cgi?pkg=octave2.9
(Chose one of the "Installed" links). In this case, there's even more information about which packages are installed for building the package.
The idea behind a build log is that one can see what happened. From your build log, it should be obvious that there's no -fPIC flag during Octave's compilation.
General hint: build logs are ususally large, so don't send them to mailing lists unless explicitely requested.
Thomas
I rebuilt octave with -fPIC, same problem, and then I rebuilt VTK with -fPIC. Octaviz building actually went through the previous rough spot but then I got this:
[ 0%] Generating /home/toutiosa/Downloads/VTK/Common/vtkTypeInt8Array.cc
Error opening input file /usr/local/bin/../include/vtk-5.0//home/toutiosa/Downloads/VTK/Common/vtkTypeInt8Array.h
make[2]: *** [/home/toutiosa/Downloads/VTK/Common/vtkTypeInt8Array.cc] Error 1
make[1]: *** [Common/CMakeFiles/Common.dir/all] Error 2
make: *** [all] Error 2
Why would octaviz, in the first place, want to generate a file at VTK's local Download directory? I just don't get it...
Thanks
> Why would octaviz, in the first place, want to generate a file at VTK's local Download directory? I just don't get it...
It shouldn't. That said, how did you run cmake? It should try to open vtkTypeInt8Array.h, so where is your VTK installation?
Thomas
I think you have hit this bug in VTK:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388736
An edit of vtkCommonKit.cmake in your vtk lib tree should resolve the problem.
It compiled OK with this, thanks Jonathan. Now I will have to make it work!
octave:6> vtk_plot3(c(:,1),c(:,2),c(:,3));
error: libvtkCommon.so.5.0: cannot open shared object file: No such file or directory
error: called from `vtk_plot3' in file `/usr/local/share/octave/2.9.17/site/m/octaviz/vtk_plot3.m'
But anyway, it's Friday evening...
Isn't that frustrating? Everything finally compiles, you startup Octave, run an octaviz function with much anticipation, and it still doesn't work! As you can tell, I have experienced this one also. You just have to let your system know about the shared libraries. Your linux distribution documentation should advise you.