| 1 | To build ORBit2 on Win32 you must use gcc (mingw). Using MSVC does not
|
|---|
| 2 | work without some major restructuring in they way type codes etc is
|
|---|
| 3 | exported from the ORBit2 DLLs. ORBit2 and code produced by its IDL
|
|---|
| 4 | compiler depend heavily on the --enable-auto-import (which is on by
|
|---|
| 5 | default) and --enable-runtime-pseudo-reloc (which isn't) features of
|
|---|
| 6 | the GNU linker. The same holds for building software that uses ORBit2
|
|---|
| 7 | itself or DLLs containing code produced by ORBit2's IDL compiler (for
|
|---|
| 8 | instance libbonobo).
|
|---|
| 9 |
|
|---|
| 10 | Personally I build ORBit2 using a command sequence like the one below
|
|---|
| 11 | that corresponds to my (unofficial) source and binary release on
|
|---|
| 12 | 2005-08-28. Obviously you need to adapt it to where you have various
|
|---|
| 13 | dependencies installed, and otherwise. Just use this as a model. Don't
|
|---|
| 14 | use it blindly, but try to understand what each step does and why it
|
|---|
| 15 | is needed.
|
|---|
| 16 |
|
|---|
| 17 | ----------------
|
|---|
| 18 | THIS=ORBit2-2.13.0-20050828
|
|---|
| 19 | DEPS="glib-2.8.1 libIDL-0.8.6"
|
|---|
| 20 | sed -e 's/need_relink=yes/need_relink=no # no way --tml/' <ltmain.sh >ltmain.temp && mv ltmain.temp ltmain.sh
|
|---|
| 21 | # This sets PATH and PKG_CONFIG_PATH to "base" values that don't include
|
|---|
| 22 | # things in the GNOME platform, but does include things like libintl or popt.
|
|---|
| 23 | usestable
|
|---|
| 24 | unset MY_PKG_CONFIG_PATH
|
|---|
| 25 | for D in $DEPS; do
|
|---|
| 26 | PATH=/devel/dist/$D/bin:$PATH
|
|---|
| 27 | MY_PKG_CONFIG_PATH=/devel/dist/$D/lib/pkgconfig:$MY_PKG_CONFIG_PATH
|
|---|
| 28 | done
|
|---|
| 29 | PKG_CONFIG_PATH=$MY_PKG_CONFIG_PATH:$PKG_CONFIG_PATH CC='gcc -mtune=pentium3' CPPFLAGS='-I/opt/gnu/include -I/devel/dist/popt-1.10.2-tml-20050828/include' LDFLAGS='-Wl,--enable-runtime-pseudo-reloc -L/opt/gnu/lib -L/devel/dist/popt-1.10.2-tml-20050828/lib' CFLAGS=-O ./configure --enable-debug=yes --disable-gtk-doc --disable-static --prefix=c:/devel/target/$THIS &&
|
|---|
| 30 | libtoolcacheize &&
|
|---|
| 31 | unset MY_PKG_CONFIG_PATH &&
|
|---|
| 32 | PATH=/devel/target/$THIS/bin:.libs:$PATH make install &&
|
|---|
| 33 | rm .libtool-cache-link-exe &&
|
|---|
| 34 | (cd test && PATH=/devel/target/$THIS/bin:$PATH make check) &&
|
|---|
| 35 | ./ORBit2-zip
|
|---|
| 36 | ----------------
|
|---|
| 37 |
|
|---|
| 38 | Things to note above are:
|
|---|
| 39 |
|
|---|
| 40 | - If you build with optimization, you must pass the
|
|---|
| 41 | --enable-runtime-pseudo-reloc flag to the linker. Otherwise the
|
|---|
| 42 | (default) --enable-auto-import is enough.
|
|---|
| 43 |
|
|---|
| 44 | - /opt/gnu is where I have GNU libintl installed
|
|---|
| 45 |
|
|---|
| 46 | - /devel/dist/* are folders which contain the exact contents of
|
|---|
| 47 | the zipped packages I distribute. Others probably shouldn't have any
|
|---|
| 48 | reason to unzip each package in a separate folder. I use those in
|
|---|
| 49 | the build sequence just to make sure everything needed from the
|
|---|
| 50 | dependencies are included in the zipfiles of the dependencies.
|
|---|
| 51 |
|
|---|
| 52 | - /devel/target/* are separate folders into which I run make install
|
|---|
| 53 | for each module. I don't use anything from there when building other
|
|---|
| 54 | stuff, though, but from the corresponding /devel/dist/* folder into
|
|---|
| 55 | which I only unzip the actual contents of the zipfiles I am going to
|
|---|
| 56 | distribute. This way I make sure that there are no leftover
|
|---|
| 57 | dependencies on built-in compile-time pathnames in the binaries.
|
|---|
| 58 |
|
|---|
| 59 | --Tor Lillqvist <tml@novell.com>, <tml@iki.fi>
|
|---|