Re: OpenGL extensions in Linux (It's not hard?)
- From: Wolfgang Draxinger <wdraxinger@xxxxxxxxxxxxxxxx>
- Date: Fri, 30 Mar 2007 13:06:44 +0200
Jon Harrop wrote:
$ ldd base
libglut.so.3 => /usr/lib/libglut.so.3
(0x00002ab05e223000) libGL.so.1 => /usr/lib/libGL.so.1
(0x00002ab05e367000) libGLU.so.1 =>
/usr/lib/libGLU.so.1 (0x00002ab05e4f9000) libXext.so.6
=> /usr/lib/libXext.so.6 (0x00002ab05e678000)
libXmu.so.6 => /usr/lib/libXmu.so.6
(0x00002ab05e789000) libX11.so.6 =>
/usr/lib/libX11.so.6 (0x00002ab05e8a2000) libm.so.6 =>
/lib/libm.so.6 (0x00002ab05eaab000) libdl.so.2 =>
/lib/libdl.so.2 (0x00002ab05ec2d000) libc.so.6 =>
/lib/libc.so.6 (0x00002ab05ed31000) libXxf86vm.so.1 =>
/usr/lib/libXxf86vm.so.1 (0x00002ab05ef6e000)
libpthread.so.0 => /lib/libpthread.so.0
(0x00002ab05f073000) libdrm.so.2 =>
/usr/lib/libdrm.so.2 (0x00002ab05f189000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6
(0x00002ab05f291000) libgcc_s.so.1 =>
/lib/libgcc_s.so.1 (0x00002ab05f48f000) libXau.so.6 =>
/usr/lib/libXau.so.6 (0x00002ab05f59d000) libXt.so.6 =>
/usr/lib/libXt.so.6 (0x00002ab05f69f000) libSM.so.6 =>
/usr/lib/libSM.so.6 (0x00002ab05f7ff000) libICE.so.6 =>
/usr/lib/libICE.so.6 (0x00002ab05f90a000) libXdmcp.so.6
=> /usr/lib/libXdmcp.so.6 (0x00002ab05fa25000)
/lib64/ld-linux-x86-64.so.2 (0x00002ab05e10b000)
Try the binary on other Linux machines and it breaks about 10%
of the time with segmentation faults.
You're saying that I should custom compile vanilla versions of
those 20 libraries from source, just to get a 6 line program
working reliably under Linux. I'm calling that hard.
No, only those libraries, that your programm accesses directly.
Not the libraries, that are pulled in by system libraries you
use.
In your case you'd compile libc, libm, libdl and libpthread
yourself, making sure, that only minimal dependencies, that are
fullfilled on all systems are pulled. libstdc++ should be
compiled in statically or delivered with your program. The C++
ABI is not fixed and if the compiler you used differs from the
one on the target system ABI hell breaks loose. That's the main
reason I don't use C++ in large projects anymore, the missing
strict ABI, not to mention the lack of reflection and
introspection.
libGL, libGLU, libXlib are loaded by dlopen and dlsym, since then
your executable does not contain linked dependencies too all
those other libraries.
Now picture this: The engine I'm developing shares the 90% of the
_binaries_ not only among Linux boxes, but also between
Operating Systems - of course it doesn't work on a different CPU
architecture. How did I do that: First all binaries are
contained in a custom variant of the ELF format, that is
extended by "code overlay" sections and similair stuff to catch
system dependencies, that wrap a unified layer around the
various operting systems. The main engine code only uses those
wrappers and is thus only depending on the CPU architecture. The
main reason for this whole effort I did is, that I later want to
force licencers of the engine to release their games on all
plattforms the engine supports natively.
Wolfgang Draxinger
--
E-Mail address works, Jabber: hexarith@xxxxxxxxxx, ICQ: 134682867
.
- References:
- OpenGL extensions in Linux (It's not hard?)
- From: DevNull
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Brian Lawson
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Wolfgang Draxinger
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Jon Harrop
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Rolf Magnus
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Jon Harrop
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Wolfgang Draxinger
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Jon Harrop
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Wolfgang Draxinger
- Re: OpenGL extensions in Linux (It's not hard?)
- From: Jon Harrop
- OpenGL extensions in Linux (It's not hard?)
- Prev by Date: Re: OpenGL extensions in Linux (It's not hard?)
- Next by Date: Goofy newbie question
- Previous by thread: Re: OpenGL extensions in Linux (It's not hard?)
- Next by thread: Re: OpenGL extensions in Linux (It's not hard?)
- Index(es):
Relevant Pages
|