From cad8feccb846559e4cf00fc6f0f6cf64234fa0e6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 23 Sep 2003 16:26:05 +0000 Subject: [PATCH] Added notes about building on Solaris. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/README.1st.txt | 24 ++++++++++++++++++++---- wxPython/setup.py | 9 ++++++++- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/wxPython/distrib/README.1st.txt b/wxPython/distrib/README.1st.txt index 29509c6a73..9fcdf827a7 100644 --- a/wxPython/distrib/README.1st.txt +++ b/wxPython/distrib/README.1st.txt @@ -50,7 +50,17 @@ Clear as mud? Good. Let's get started. You may want to use --enable-debug instead of --enable-optimise if you need to run though a debugger and want full debugging symbols. - if you want to use the image and zlib libraries included with + SOLARIS NOTE: The --enable-rpath option may cause problems when + using wxGTK on Solaris when compiling wxPython in step 4 below. + The woraround is to not use --enable-rpath flag for configure, but + in that case all wxPython applications must have the + LD_LIBRARY_PATH set to include $WXPREF/lib, or you can use the + 'crle' program to modify the runtime linking environment. If this + is the only installation of wxGTK on the system then you can use a + system library path for WXPREF and not have to worry about it at + all. + + If you want to use the image and zlib libraries included with wxWindows instead of those already installed on your system, (for example, to reduce dependencies on 3rd party libraries) then you can add these flags to the configure command: @@ -61,8 +71,8 @@ Clear as mud? Good. Let's get started. --with-zlib=builtin \ If you would like to use GTK 2.x and unicode, then add the - following flags. Please note that this is still beta-level - quality, but does look and work quite nice for the most part: + following flags. Please note that this is still considered beta, + but does look and work quite nice for the most part: --enable-gtk2 \ --enable-unicode \ @@ -99,7 +109,7 @@ Clear as mud? Good. Let's get started. setup.py command line to disable the building of the glcanvas module. - If you would like to install to someplace besides the Python + If you would like to install to some place besides the Python site-packages directory (such as to your home directory) then you can add "--root=" after the "install" command. To use wxPython like this you'll need to ensure that the directory @@ -116,6 +126,12 @@ Clear as mud? Good. Let's get started. python demo.py + SOLARIS NOTE: If you get unresolved symbol errors when importing + wxPython and you are running on Solaris and building with gcc, then + you may be able to work around the problem by uncommenting a bit of + code in setup.py and building again. Look for 'SunOS' in setup.py + and uncomment the block following it. The problem is that Sun's ld + does not automatically add libgcc to the link step. 7. That's all, except for the having fun part! diff --git a/wxPython/setup.py b/wxPython/setup.py index 58e4df6f91..3d556cdbde 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python #---------------------------------------------------------------------- -import sys, os, glob, fnmatch +import sys, os, glob, fnmatch, commands from distutils.core import setup, Extension from distutils.file_util import copy_file from distutils.dir_util import mkpath @@ -481,6 +481,13 @@ elif os.name == 'posix': libdirs = [] libs = [] + # If you get unresolved symbol errors on Solaris and are usign gcc, then + # uncomment this block to add the right flags to the link step and build + # again. + ## if os.uname()[0] == 'SunOS': + ## libs.append('gcc') + ## libdirs.append(commands.getoutput("gcc -print-search-dirs | grep '^install' | awk '{print $2}'")[:-1]) + Verify_WX_CONFIG() cflags = os.popen(WX_CONFIG + ' --cxxflags', 'r').read()[:-1] + ' ' + portcfg