|
|
- Patches needed for Solaris 2.6
- What compiler should I use?
- How do I switch between two compilers?
- "Gdk-WARNING **:shmat failed!" error message
- Cross-compiler plugin/module compatibility, vtables, and name-mangling
-
Patches needed for Solaris 2.6
- What compiler should I use?
There are 4 compilers that are known to work: gcc-2.7.2.3, egcs, WS4.2, WS5.0.
They all have trade-offs and there is no clear leader right now. Tinderbox is currently running a gcc-2.7.2.3 build, some Solaris contributors are using the Workshop 4.2 compiler with some success.
| Compiler |
Good |
Bad |
Notes |
| gcc 2.7.2.3 |
- Classic compiler, lots of support on many platforms.
- Purify support
|
Weak C++ support, defines LCD for tinderbox right now. |
More-recent versions not rock solid yet. |
| egcs |
- Benefits from linux coverage.
|
- No purify
- Can't step in debugger
|
|
| WS4.2 |
- dbx has better threading support and is more reliable than gdb, as
well as purify-like memory checking.
- Purify support
|
$$ |
Picky compiler, some bugs, mostly worked-around with autoconf. |
| WS5.0 |
- dbx has better threading support and is more reliable than gdb, as
well as purify-like memory checking.
- Purify support
- Built-in performance tools
|
- $$
- Builds are painfully slow
|
Some 4.2 bugs fixed, some new ones. |
When using the WorkShop 5.0 compilers, be sure to get a recent copy
of the compiler patches from Sun. At the time of this writing, for
32-bit machines, this means at least the following patches:
107289-03
107295-01
107311-07
107357-05
107740-01
107742-01
On (at least) Solaris 2.6 with WorkShop 5.0, the C++ runtime library
patch (105591, rev -07 or later) is also required. Anyone who wants
to run the code you've compiled will need this patch as well.
- How do I switch between two compilers?
If both a gnu compiler and non-gnu compiler are in your path,
the gnu compiler wins the config test. To override this, or to pick from among
several compilers you have in your path, set the environment variables
CC and CXX to point to the compiler you want to use:
# Example to override gcc install with WS5.0 using the WS 4.x
# compatibility flag
setenv CC /usr/local/workshop/SUNWspro/bin/cc
setenv CXX "/usr/local/workshop/SUNWspro/bin/CC -compat=4"
./configure
Additionally, if you are using one of the WorkShop compilers and have
your LD_LIBRARY_PATH environment variable set, be sure that the
location of the SUNWspro libraries is closer to the front of
LD_LIBRARY_PATH than the location of any GNU g++ libraries. Otherwise
the build may fail trying to pull in the wrong libiostream.
-
"Gdk-WARNING **:shmat failed!" error
message
If you've built with the --enable-x11-shm option to
configure in order to speed up performance, you may see the
above-mentioned error message. In some (all?) versions of
Solaris, the default per-process limit of the number
shared-memory segments can be allocated is 6. When this
error occurs, GDK gives up and decides not to use
shared-memory at all (meaning that Mozilla will still
function just fine, but it won't see any speedup).
Work around this problem by adding the line:
set shmsys:shminfo_shmseg = 10
to /etc/system and then rebooting your machine. See bug
10498 for more details.
-
Cross-compiler plugin/module compatibility, vtables, and
name-mangling issues
These issues are still being fleshed out. See bug
20297 for some discussion.
|