Previous Thread  Next Thread

chat icon Builds for SPARC (sun4u) (Linux & likely Solaris+gcc)

Ferris

Posted: Mon Oct 28, 2002 7:06 pm
Joined: 25 Oct 2002
Posts: 5
I have been able to build blender successfully for the subject system
under Linux for gcc-2.95.3 & gcc-3.2; the same procedure should work
for Solaris with these compilers as well (with g++-2.95.2, it will not
because of missing standard headers like <sstream>).

I have built with both Phaeton's autoconf version (SirDude's suggestion
under the redhat 8.0 compile topic), and the CVS tree (24.x.02 version)
along with help from Jochym's Makefile and patch file at <http://rosetta.com.pl/blender>.

Neither build runs "out of the box"; both are straightforward once you get
going.

Here are the problems and comments on solutions.

1. g++-2.95.3 & g++-3.2 are not compatible; this shows up with the
symptoms noted by TheProf in the 'Building for Redhat' topic. The
work-around is present in the autoconf version; for the CVS build
either fix by hand or copy in the autoconf files affected (there are two
files in the 'intern/decimation/intern' directory in CVS).

The solution to this should be to put the changes from the autoconf
version into the CVS tree.

2. (Both versions): Compile gets 'endian-ness' wrong. There are two
problems; both simple to get around.

a. The source uses 'if defined(__sparc)' to determine whether or not
it is being built for a sparc system. gcc-2.95.2 did define such
a symbol; gcc-2.95.3 & gcc-3.2 do not. They define only
__sparc__.

As a bandaid to get a correct build, make sure that you compile
with -D__sparc as a CFLAG/CXXFLAG. Correct fix is to add
change 'if defined(__sparc)' to
if defined(__sparc) || defined(__sparc__) || ...
wherever it appears in the source files.

b. In the source/blender/avi directory, it seems that 'endian.c' and
'avirgb.c' want '-DWORDS_BIGENDIAN' in the CFLAGS as well.

3. (autoconf version only). The file source/blender/makesdna/src/dna.c
is incorrect for sparc (another endian problem). As part of the CVS
build, it gets rebuilt for sparc using the makesdna program, and
I jsut copied the results over. If you don't want to do that, you will
need to build the makesdna program yourself and run it (or else
change the blendloader/ source to know that the data string produced
by compiling dna.c needs its endian-ness reversed whenever it is
referenced.)

Best solution is to make sure that the makesdna Makefile rebuilds
dna.c (should be easy to do, but I haven't because I don't need it)

4. CVS only. Don't forget to modify the '*.mk' files for your
environment, noticint that your CPU (on a sun4u at least) will be
'sparc64', not 'sparc', and that you will have to add some targets for
the makefile to build when OS=linux and CPU is a sparc.

That's it. Essentially the only problems arise because of changing compiler
specifications (and an oversight in the autoconf version which you need
a bigendian system to find).
Reply with quote


Ferris

Posted: Mon Oct 28, 2002 10:59 pm
Joined: 25 Oct 2002
Posts: 5
Ferris wrote:
I have been able to build blender successfully for the subject system
under Linux for gcc-2.95.3 & gcc-3.2; the same procedure should work
for Solaris with these compilers as well (with g++-2.95.2, it will not
because of missing standard headers like <sstream>).



OK, to continue. On an Ultra10, Solaris 8.0, g++-2.95.2 system, the
autoconf version builds and runs fine. Same comments as in the original
post concerning endian-ness; I simply copied the dna.c file correctly built
for the Linux/sparc systems onto the Solaris system.

I also copied the <sstream> file from the g++-2.95.3 files on one of the
Linux systems into the g++ header directory on the Solaris system.
This particular Solaris system did not have openssl installed so I installed
it.

I do not use any openGL package from Sun; this Solaris system uses
Mesa version 3.4.

Everything else blendercreator-ph needed is installed on the system,
configure found what it needed, and the build went fine.

So, if you take care of the endian problems with appropriate compiler
-D__sparc, etc, and arange to get a correct dna.c file for big-endian
systems, Phaeton's autoconf version, blendercreator seems to build and run fine under Solaris 8.
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group