[Paraview] building paraview on solaris 10 x86
Josh Brandt
jtbrandt at ucsc.edu
Thu Jan 14 20:50:10 EST 2010
On Jan 14, 2010, at 12:30 PM, Dave Partyka wrote:
> Whats the trouble?
Okay, let me see. I've been trying various things for a while, so I
apologize if this gets muddled.
I am using: Solaris 10/x86. I have both SunStudio 12.1 and /usr/bin/sfw/gcc
(version 3.4.3). I installed cmake 2.8.0 from source.
I first tried using my normal build environment, but it's kind of a mess right now,
I guess. I finally followed the advice at http://www.latp.univ-mrs.fr/informatique/doku.php?id=paraview
and installed the CBE packages (but not their cmake, since it's older). I'm now building in
a shell invoked using:
/opt/dtbld/bin/env.sh gcc3
This clears out any random cruft in one's environment, which seems to help with configuration.
I have also rebuilt qt-4.5.3 inside this environment with gcc, since my normal qt doesn't seem to
link correctly either. (That was kind of a mess, but worked for other things. For whatever
reason libCrun didn't get linked in, and thus libQtGui didn't get linked, and all the stuff
that depends on it would throw errors. I think I won't go into that right now. If you're curious
I could probably duplicate those issues.)
So, here are the main problems I ran into:
1. Something in Solaris #defines GS to 0, so I had to edit
VTK/Graphics/vtkDataObjectGenerator.cxx and put #undef GS right under
#include "vtkDataObjectGenerator.h". That looks like this:
[ 15%] Building CXX object VTK/Graphics/CMakeFiles/vtkGraphics.dir/vtkDataObjectGenerator.o
/home/software/Solaris_10/courseware/paraview/ParaView3/VTK/Graphics/vtkDataObjectGenerator.cxx:52: error: expected identifier before numeric constant
/home/software/Solaris_10/courseware/paraview/ParaView3/VTK/Graphics/vtkDataObjectGenerator.cxx:52: error: expected `}' before numeric constant
/home/software/Solaris_10/courseware/paraview/ParaView3/VTK/Graphics/vtkDataObjectGenerator.cxx:52: error: expected unqualified-id before numeric constant
/home/software/Solaris_10/courseware/paraview/ParaView3/VTK/Graphics/vtkDataObjectGenerator.cxx:52: error: expected `,' or `;' before numeric constant
/home/software/Solaris_10/courseware/paraview/ParaView3/VTK/Graphics/vtkDataObjectGenerator.cxx:53: error: expected declaration before '}' token
make[2]: *** [VTK/Graphics/CMakeFiles/vtkGraphics.dir/vtkDataObjectGenerator.o] Error 1
make[1]: *** [VTK/Graphics/CMakeFiles/vtkGraphics.dir/all] Error 2
make: *** [all] Error 2
That points to this:
---snip
//============================================================================
enum vtkDataObjectGeneratorTokenCodes
{
ID1, UF1, RG1, SG1, PD1, UG1, GS, GE, HBS, HBE, MBS, MBE, NUMTOKENS
};
---snip
...and if you run that file through cpp, you get 0 in place of GS. I haven't
tracked down the source of the original GS yet.
2. In my current build, cmake doesn't seem to automatically know to include
"-lnsl -lsocket" when it needs to. For example:
[ 30%] Building CXX object VTK/Filtering/Testing/Cxx/CMakeFiles/FilteringCxxTests.dir/TestTriangle.o
Linking CXX executable ../../../../bin/FilteringCxxTests
Undefined first referenced
symbol in file
recv ../../../../bin/libvtkCommon.so.pv3.6
send ../../../../bin/libvtkCommon.so.pv3.6
__xnet_connect ../../../../bin/libvtkCommon.so.pv3.6
__xnet_socket ../../../../bin/libvtkCommon.so.pv3.6
getsockname ../../../../bin/libvtkCommon.so.pv3.6
accept ../../../../bin/libvtkCommon.so.pv3.6
listen ../../../../bin/libvtkCommon.so.pv3.6
gethostbyaddr ../../../../bin/libvtkCommon.so.pv3.6
gethostbyname ../../../../bin/libvtkCommon.so.pv3.6
setsockopt ../../../../bin/libvtkCommon.so.pv3.6
inet_addr ../../../../bin/libvtkCommon.so.pv3.6
__xnet_bind ../../../../bin/libvtkCommon.so.pv3.6
ld: fatal: Symbol referencing errors. No output written to ../../../../bin/FilteringCxxTests
collect2: ld returned 1 exit status
make[2]: *** [bin/FilteringCxxTests] Error 1
make[1]: *** [VTK/Filtering/Testing/Cxx/CMakeFiles/FilteringCxxTests.dir/all] Error 2
make: *** [all] Error 2
I'm not sure which of the config variables that needs to be added to in ccmake. For this build I
added it to the link.txt files by hand rather than rerunning the ccmake configuration.
3. Also, I get lots of this kind of warning, which at least doesn't stop the build:
Linking CXX shared library ../../../bin/libvtkViewsCS.so
ld: warning: file /usr/local/lib/libXrender.so: attempted multiple inclusion of file
ld: warning: file /usr/local/lib/libfreetype.so: attempted multiple inclusion of file
ld: warning: file /home/qt-gcc/lib/libQtSql.so: attempted multiple inclusion of file
ld: warning: file /home/qt-gcc/lib/libQtCore.so: attempted multiple inclusion of file
ld: warning: file /usr/local/lib/libgthread-2.0.so: attempted multiple inclusion of file
ld: warning: file /usr/local/lib/libglib-2.0.so: attempted multiple inclusion of file
ld: warning: file /usr/local/lib/libgobject-2.0.so: attempted multiple inclusion of file
ld: warning: file ../../../bin/libvtkFilteringCS.so: attempted multiple inclusion of file
ld: warning: file ../../../bin/libvtkClientServer.so: attempted multiple inclusion of file
This seems to happen for most of the shared libraries. It doesn't hurt anything, but it
seems to imply that something isn't being configured correctly.
4. Sun's /usr/bin/tar also isn't compatible with gnu tar, leading to this:
-- Installing /usr/local/lib/paraview-3.6/libQtCore.so
tar: C: unknown function modifier
Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@[0-7]][bfk][X...] [blocksize] [tarfile] [size] [exclude-file...] {file | -I include-file | -C directory file}...
[...]
It might be nice if it detected that, or if there were a place to set the path
to a gnu-compatible tar. On Solaris 10, gnu tar is in /usr/sfw/bin/gtar.
I did finally get it built today, but it was a pretty painful process. I could have
saved a lot of trouble by starting with the clean build environment, but I've never
run into these kinds of problems with any other software packages.
Josh
--
Josh Brandt / jtbrandt at ucsc.edu
Unix Systems Manager, Learning Technologies, ITS
University of California Santa Cruz
831-459-2472
More information about the ParaView
mailing list