[Bf-committers] Blender 2.46 RC1 Build Patch For Solaris 10 Sparc, Sun Studio 12
Josh Eliason
josheliason at gmail.com
Tue Apr 1 20:13:51 CEST 2008
On 4/1/08, Campbell Barton <ideasman42 at gmail.com> wrote:
> Hi, can you provide your changes as a diff?
> svn diff > ~/sunstudio.diff
>
> Also, can you write some basic instructions for compiling blender with
> sun studio?
> I tried for a while but ended up using gcc 4.2 which worked with some
> adjustments.
>
>
The SVN diff patch is listed below, and it is posted on the Patch
Tracker. Following the patch below are instructions for compiling
Blender on Solaris 10 Sparc using Sun Studio 12. Please let me know if
I missed any instruction steps or more information is required. The
instructions are informal, but if there is a demand, I can rewrite the
instructions. Sorry for the long post.
--
Josh
bash-3.00$ cat solaris10-build.txt
Index: source/blender/blenkernel/intern/kdop.c
===================================================================
--- source/blender/blenkernel/intern/kdop.c (revision 14168)
+++ source/blender/blenkernel/intern/kdop.c (working copy)
@@ -150,7 +150,7 @@
/*
* Insertion sort algorithm
*/
-static void bvh_insertionsort(CollisionTree **a, int lo, int hi, int axis)
+extern void bvh_insertionsort(CollisionTree **a, int lo, int hi, int axis)
{
int i,j;
CollisionTree *t;
@@ -247,7 +247,7 @@
/*
* Quicksort algorithm modified for Introsort
*/
-static void bvh_introsort_loop (CollisionTree **a, int lo, int hi,
int depth_limit, int axis)
+extern void bvh_introsort_loop (CollisionTree **a, int lo, int hi,
int depth_limit, int axis)
{
int p;
Index: source/blender/blenkernel/BKE_cloth.h
===================================================================
--- source/blender/blenkernel/BKE_cloth.h (revision 14168)
+++ source/blender/blenkernel/BKE_cloth.h (working copy)
@@ -60,16 +60,16 @@
struct CollisionTree;
// this is needed for inlining behaviour
-#ifndef _WIN32
-#define LINUX
-#ifndef __sgi
-#define DO_INLINE inline
+#if defined _WIN32
+# define DO_INLINE __inline
+#elif defined (__sgi)
+# define DO_INLINE
+#elif defined (__sun) || defined (__sun__)
+# define DO_INLINE
#else
-#define DO_INLINE
+# define DO_INLINE inline
+# define LINUX
#endif
-#else
-#define DO_INLINE __inline
-#endif
#define CLOTH_MAX_THREAD 2
Index: source/blender/include/BIF_gl.h
===================================================================
--- source/blender/include/BIF_gl.h (revision 14168)
+++ source/blender/include/BIF_gl.h (working copy)
@@ -58,7 +58,8 @@
#else
#if defined (__sun) || defined (__sun__)
#include <GL/gl.h>
- #include <mesa/glu.h>
+ #include <GL/glu.h>
+/* #include <mesa/glu.h>*/
#else
#include <GL/gl.h>
#include <GL/glu.h>
----------
Compiling Blender On Solaris 10 Sparc Using Sun Studio 12
Basic system information (for comparison):
bash-3.00$ uname -a
SunOS sunny 5.10 Generic_120011-14 sun4u sparc SUNW,Ultra-60
bash-3.00$ CC -V
CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25
bash-3.00$ cc -V
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12
----------
1. Download and install Sun Studio 12
2. Download prerequisites from www.blastwave.org.
I do not recall all the CSW downloads used for Blender, but I listed
the entire CSW pkginfo details below. The ones I remember downloading
for Blender are:
ggettext
libsdl
sdlmixer
python (I used CSW python at /opt/csw/bin. I did not use the system
installed python at /usr/bin)
and maybe:
freetype
libiconv
tiff
Note, I use the default install paths such as CSW packages install to
/opt/csw and Sun Studio installs to /opt/SUNWspro. Also, the majority
of the CSW packages are automatically downloaded as prerequisites.
pkginfo for CSW and SPRO:
application CSWapache2rt apache2rt - Apache 2.2
runtime libraries
application CSWbdb4 berkeleydb4 - Embedded
database libraries and utilities
application CSWbdb44 berkeleydb44 - embedded
database libraries and utilities
application CSWbzip2 bzip2 - a high-quality
block-sorting file compressor
system CSWcommon common - common files and
dirs for CSW packages
application CSWemacs emacs - the Emacs editor
based on the Athena toolkit
application CSWemacsbincommon emacs_bin_common - the
Emacs editor common binaries
application CSWemacschooser emacs_chooser - the Emacs
editor chooser
application CSWemacscommon emacs_common - the Emacs
editor architecture neutral common components
application CSWexpat expat - XML Parser Toolkit
application CSWfconfig fontconfig - A library
for configuring and customizing font access.
application CSWfreetype freetype - A free, high
quality, and portable font engine.
application CSWftype2 freetype2 - The free and
portable high quality font engine
application CSWgcc3corert gcc3corert - GNU C
Compiler Run Time
application CSWgcc3g++rt gcc3g++rt - GNU C++
Compiler Run Time
system CSWgd gd - libgd, Graphics
creation library and utilities
system CSWgdbm gdbm - GNU dbm
system CSWggettext ggettext - GNU gettext
system CSWggrep ggrep - GNU grep
application CSWgs ghostscript -
Ghostscript, a PostScript and PDF interpreter for previewing,
conversion and printing
application CSWgsed gsed - The GNU
non-interactive text Stream-oriented EDitor (sed)
system CSWgsfonts gsfonts - Fonts and AFMs
for use with GhostScript
system CSWiconv libiconv - GNU iconv library
system CSWjbig2dec jbig2dec - decoder
implementing JBIG2 bi-level image compression
system CSWjpeg jpeg - JPEG library and
tools by the Independent JPEG Group
application CSWkrb5lib krb5_lib - MIT Kerberos 5
core libraries
system CSWlibnet libnet - the libnet
packet construction library
application CSWlibogg libogg - Ogg bitstream
format support library
system CSWlibsdl libsdl - Simple
DirectMedia Layer library
application CSWncurses ncurses - ncurses library
and utilities
application CSWnedit nedit - a multi-purpose
text editor for the X Window System
application CSWneon neon - Neon HTTP and
WebDAV client library
application CSWoldaprt openldap_rt - OpenLDAP
runtime libraries (oldaprt)
application CSWossl openssl - Openssl meta package
application CSWossldevel openssl_devel - Openssl
development support
application CSWosslrt openssl_rt - Openssl
runtime libraries
application CSWosslutils openssl_utils - Openssl
binaries and related tools
application CSWpcre pcre - Perl-compatible
regular expression library
application CSWperl perl - A high-level,
general-purpose programming language.
system CSWpkgget pkg_get - CSW version of
automated package download tool
system CSWpmtk pm_tk - a Graphical User
Interface ToolKit perl module
system CSWpng png - library for
Portable Network Graphics format (PNG)
application CSWpython python - A high-level
scripting language.
system CSWreadline readline - library to
enable interactive line editing
application CSWsasl sasl - Simple
Authentication and Security Layer
application CSWsdlmixer sdlmixer - multi-channel
audio mixer library
application CSWsqlite3 sqlite3 - An embeddable
SQL engine in a C library
system CSWsunmath libsunmath - Sun maths library
application CSWsvn subversion - Version
control rethought
application CSWt1lib t1lib - Type1 font
renderering library
application CSWtetex tetex - A complete TeX distribution
application CSWtexinfo texinfo - The GNU
Documentation System
application CSWtiff tiff - lib and tools for
Tag Image File Format
system CSWungif libungif - library for
manipulation of GIF images
application CSWvorbis libvorbis - Vorbis audio
codec support library
application CSWwget wget - A network utility
to retrieve files from the Web
system CSWxaw3d xaw3d - Xaw3d, Three-D
Athena Toolkit
system CSWxpm xpm - library for X11
PixMap format (libXpm.so.4.11)
application CSWzlib zlib - Zlib Data
Compression Library
application SPROatd Sun Studio 12 Advanced
Tools Development Module
application SPROcc Sun Studio 12 C Compiler
application SPROcmpl Sun Studio 12 C++ Complex Library
application SPROcpl Sun Studio 12 C++ Compiler
application SPROcplx Sun Studio 12 C++ 64-bit Libraries
application SPROctags Sun Studio 12 Exuberant CTags 5.5.4
application SPROctsrc Sun Studio 12 Exuberant
CTags 5.5.4 Sources
application SPROdbx Sun Studio 12 Debugging Tools
application SPROdbxui Sun Studio 12 dbx GUI plug-in
application SPROdbxx Sun Studio 12 Debugging
Tools 64-bit
application SPROdemo Sun Studio 12 Compiler
Examples and Programs
application SPROdmake Sun Studio 12 Distributed Make
application SPROdwrfb Sun Studio 12
DwarfSupportLibrary binaries
application SPROdwrfs Sun Studio 12
DwarfSupportLibrary source
application SPROdwrfx Sun Studio 12
DwarfSupportLibrary 64-bit binaries
application SPROf90 Sun Studio 12 Compiler Fortran 90
application SPROfd Sun Studio 12 inventory file
application SPROfdxd Sun Studio 12 X-Designer
GUI Builder
application SPROftool Sun Studio 12 Compiler
FORTRAN 77 Tools
application SPROgc Sun Studio 12 Garbage
Collector Libraries for C++
application SPROgcx Sun Studio 12 Garbage
Collector 64-bit Libraries for C++
application SPROgvim Sun Studio 12 GVim 6.3
application SPROidext Sun Studio 12 Branding files
application SPROipl Sun Studio 12 Interval
Libraries 32-bit
application SPROiplg Sun Studio 12 Interval
Libraries Common Components
application SPROiplx Sun Studio 12 Interval
Libraries 64-bit
application SPROjdbx Sun Studio 12 Debugging Tools
application SPROjdbxx Sun Studio 12 Debugging
Tools 64-bit
application SPROl77s Sun Studio 12 FORTRAN 77
Dynamic Libraries
application SPROl77sx Sun Studio 12 FORTRAN 77
64-bit Dynamic Libraries
application SPROl90 Sun Studio 12 Fortran 95
Static Libraries
application SPROl90s Sun Studio 12 Fortran 95
Dynamic Libraries
application SPROl90sx Sun Studio 12 Fortran 95
64-bit Dynamic Libraries
application SPROl90x Sun Studio 12 Fortran 95
64-bit Static Libraries
application SPROlang Sun Studio 12 Compilers
Common Components
application SPROlangx Sun Studio 12 Common
64-bit Components
application SPROlcxs Sun Studio 12 Unbundled
Shared libcx
application SPROlgc Sun Studio 12 Garbage
Collector Library 1.0 for C++
application SPROlgcx Sun Studio 12 Garbage
Collector 64-bit Library
application SPROlklnt Sun Studio 12 LockLint
application SPROm9xpx Sun Studio 12 C9X Math
Library 64-bit (profiled)
application SPROm9xs Sun Studio 12 C9X Math Library
application SPROm9xsx Sun Studio 12 C9X Math
Library 64-bit
application SPROmr3m Sun Studio 12 Math
Library Man Pages
application SPROmrcc Sun Studio 12 Man
Pages/Online Info for C
application SPROmrcom Sun Studio 12 Common
Compiler Man Pages/Online Info
application SPROmrcpl Sun Studio 12 Man
Pages/Online Info for C++
application SPROmrdbx Sun Studio 12 Man
Pages/Online Info for dbx
application SPROmrdmk Sun Studio 12 dmake Man Page
application SPROmrdwf Sun Studio 12
DwarfSupportLibrary man pages
application SPROmrftn Sun Studio 12 Man
Pages/Online Info for Fortran 95
application SPROmrgc Sun Studio 12 Garbage
Collector Man Pages for C++
application SPROmride Sun Studio 12 IDE README
application SPROmripl Sun Studio 12 Man Pages
for Sun Interval Library
application SPROmrmp Sun Studio 12 Man
Pages/Online Info for MT Tools
application SPROmrpan Sun Studio 12 Man
Pages/Online Info for Perf Tools
application SPROmrpgn Sun Studio 12 Man
Pages/Online Info for Analyzer GUI
application SPROmrpl Sun Studio 12 Man Pages
for Sun Perf Library
application SPROmrsbe Sun Studio 12 Man
Pages/Online Info for Source Browser
application SPROmrstd Sun Studio 12 Standard
Class Library Man Pages for C++
application SPROmrtcv Sun Studio 12 Test
Coverage Man Page
application SPROmrxd Sun Studio 12 X-Designer man pages
application SPROmrxm Sun Studio 12 XEmacs
21.4.12 - documentation
application SPROpl Sun Studio 12 PerfLib
32-bit (Archive)
application SPROplck Sun Studio 12 PerfLib
Legacy Library Check
application SPROplg Sun Studio 12 PerfLib
Common Components
application SPROpls Sun Studio 12 PerfLib
32-bit (Shared)
application SPROplsx Sun Studio 12 PerfLib
64-bit (Shared)
application SPROplx Sun Studio 12 PerfLib
64-bit (Archive)
application SPROpnsn Sun Studio 12 Installer misc files
application SPROprfan Sun Studio 12 Performance
Analyzer Tools
application SPROprflb Sun Studio 12 Performance
Analyzer Library API
application SPROsbe Sun Studio 12 Source Browser
application SPROsbld Sun Studio 12 Linker Stab Library
application SPROsbldx Sun Studio 12 Linker Stab Library
application SPROscl Sun Studio 12 Standard
Class Library for C++
application SPROsclx Sun Studio 12 Standard
64-bit Class Library for C++
application SPROsmpx Sun Studio 12 libsunmath
64-bit (Shared/Profiled)
application SPROsmsx Sun Studio 12 libsunmath
64-bit (Shared)
application SPROsslnk Sun Studio 12 /usr icon
and symlinks
application SPROstl4a Sun Studio 12 STLPort
version 4 static libraries
application SPROstl4h Sun Studio 12 STLPort
version 4 source
application SPROstl4o Sun Studio 12 STLPort
version 4 dynamic libraries
application SPROstl4x Sun Studio 12 STLPort
version 4 dynamic libraries (64-bit)
application SPROstl4y Sun Studio 12 STLPort
version 4 static libraries (64-bit)
application SPROsunms Sun Studio 12 Unbundled
Shared libsunmath
application SPROsvc Sun Studio 12 GUI interface support
application SPROsysprp Sun Studio 12 check-mode
prepare_system files
application SPROtdemo Sun Studio 12 Tools
Examples and Programs
application SPROtl7x Sun Studio 12 Tools.h++
7.1 64-bit Class Library for C++
application SPROtlbn7 Sun Studio 12 Tools.h++
7.1 Class Library for C++
application SPROtll7 Sun Studio 12 Tools.h++
7.1 Class Library for C++
application SPROtll7x Sun Studio 12 Tools.h++
7.1 64-bit Library for C++
application SPROudchk Sun Studio 12 Update
checking binary
application SPROutool Sun Studio 12 Common Tools
application SPROxmbin Sun Studio 12 XEmacs 21.4.12
application SPROxmshr Sun Studio 12 XEmacs 21.4.12
application SPROxmsrc Sun Studio 12 XEmacs
21.4.12 - source distribution
3. Adjust user profile paths
PATH=./:${HOME}/bin:/opt/SUNWspro/bin:/opt/csw/bin:/usr/local/bin:/opt/blender-2.46:${PATH}
LD_LIBRARY_PATH=/opt/csw/lib
export PATH LD_LIBRARY_PATH
Note, the system ${PATH} expands to
/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb
4. Download and install SCons
bash-3.00$ whereis scons
scons: /usr/bin/scons /usr/man/man1/scons.1
5. Download the SVN blender code (directions on blender.org)
6. Create user-config.py in the top Blender directory. I based
user-config.py on a Solaris x86 version found at
http://www.blender.org/forum/viewtopic.php?t=12142
I listed the top Blender directory to illustrate the user-config.py location.
bash-3.00$ pwd ; ls
/home/jeliason/Projects/Blender/SVN-Blender/blender
CMake README dlltool projectfiles_vc7
CMakeLists.txt SConstruct doc release
COPYING SourceChanges.txt extern source
ChangeLog bin intern tools
DO_INLINE.txt blender make user-config.py
INSTALL blenderplayer po
Makefile config projectfiles
Note, I did not modify the config/sunos5-config.py, and I realize that
not all Blender functionality is built using this configuration.
Also, some compiler flags may not be appropriate for Solaris Sparc
such as the deprecated -KPIC, which was replaced by the -xcode=pic13
and -xcode=pic32 flags. -KPIC may still be used on Solaris x86, but I
do not know for sure.
bash-3.00$ cat user-config.py
WITH_BF_OPENAL = 'false'
BF_FREETYPE = '/opt/csw'
BF_PYTHON = '/opt/csw'
BF_PYTHON_VERSION = '2.5.1'
BF_PYTHON_INC="/opt/csw/include/python2.5"
BF_PYTHON_BINARY="/opt/csw/bin/python2.5"
BF_PYTHON_LIB="python2.5"
BF_SDL = '/opt/csw'
WITH_BF_OPENEXR = 'false'
WITH_BF_ICONV = 'false'
BF_GETTEXT = '/opt/csw'
PLATFORM_LINKFLAGS = ['-lintl', '-lsocket', '-library=stlport4',
'-R/opt/csw/lib', '-R/blender']
#CFLAGS += '${CFLAGS}'
CC = '/opt/SUNWspro/bin/cc'
CXX = '/opt/SUNWspro/bin/CC'
#CC = '/usr/dist/share/sunstudio_i386/SUNWspro/bin/cc'
#CXX = '/usr/dist/share/sunstudio_i386/SUNWspro/bin/CC'
CCFLAGS = ['-KPIC', '-DPIC', '-fast', '-xchar=unsigned',
'-library=stlport4', '-features=extensions' ]
CXXFLAGS = ['-KPIC', '-DPIC', '-fast', '-xchar=unsigned',
'-library=stlport4', '-features=extensions' ]
CPPFLAGS = ['-DXP_UNIX', '-DSUN_OGL_NO_VERTEX_MACROS']
REL_CFLAGS = []
REL_CCFLAGS = []
BF_PYTHON_LINKFLAGS = []
C_WARN = '-errtags=yes -features=extensions -library=stlport4'
CC_WARN = '-errtags=yes -features=extensions -library=stlport4'
7. Fix source code errors or apply the solaris10-build.txt patch
8. Run scons in the top Blender directory
More information about the Bf-committers
mailing list