Re: [Flightgear-devel] SimGear Shared Object Libaries [PATCH]
Hi, Just last week I happened to have done a patch to simgear to build with shared libs, as well as updates to flightgear to build with them. Patch attached. They should work against latest simgear and flightgear git. I did not fix the circular dependencies with the libs. I simply made sure binaries are linked with all libs that are needed. Pigeon. commit 32331e65a025d8ed486ead1360c2b49522c70117 Author: Pigeon pig...@pigeond.net Date: Fri Oct 1 20:45:03 2010 +1000 Shared libs build diff --git a/configure.ac b/configure.ac index 4d16ac8..f2057cf 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,7 @@ AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_RANLIB +AC_PROG_LIBTOOL AC_PROG_INSTALL AC_PROG_LN_S AX_BOOST_BASE([1.37.0]) diff --git a/simgear/Makefile.am b/simgear/Makefile.am index 9bd77ef..6eb8f19 100644 --- a/simgear/Makefile.am +++ b/simgear/Makefile.am @@ -24,14 +24,14 @@ SUBDIRS_ALWAYS = \ structure \ bucket \ ephemeris \ + serial \ + props \ + math \ + timing \ io \ magvar \ - math \ nasal \ - props \ - route \ - serial \ - timing + route SUBDIRS = $(SUBDIRS_ALWAYS) \ $(compatibility_DIR) \ diff --git a/simgear/bucket/Makefile.am b/simgear/bucket/Makefile.am index d1f7b69..e8d3206 100644 --- a/simgear/bucket/Makefile.am +++ b/simgear/bucket/Makefile.am @@ -1,10 +1,10 @@ includedir = @includedir@/bucket -lib_LIBRARIES = libsgbucket.a +lib_LTLIBRARIES = libsgbucket.la include_HEADERS = newbucket.hxx -libsgbucket_a_SOURCES = newbucket.cxx +libsgbucket_la_SOURCES = newbucket.cxx # noinst_PROGRAMS = testbucket diff --git a/simgear/debug/Makefile.am b/simgear/debug/Makefile.am index cdfba79..ed2e56a 100644 --- a/simgear/debug/Makefile.am +++ b/simgear/debug/Makefile.am @@ -2,10 +2,10 @@ includedir = @includedir@/debug EXTRA_DIST = logtest.cxx -lib_LIBRARIES = libsgdebug.a +lib_LTLIBRARIES = libsgdebug.la include_HEADERS = debug_types.h logstream.hxx -libsgdebug_a_SOURCES = logstream.cxx +libsgdebug_la_SOURCES = logstream.cxx INCLUDES = -I$(top_srcdir) diff --git a/simgear/environment/Makefile.am b/simgear/environment/Makefile.am index f6042f8..2cdc20e 100644 --- a/simgear/environment/Makefile.am +++ b/simgear/environment/Makefile.am @@ -1,9 +1,9 @@ includedir = @includedir@/environment -lib_LIBRARIES = libsgenvironment.a +lib_LTLIBRARIES = libsgenvironment.la include_HEADERS = metar.hxx visual_enviro.hxx precipitation.hxx -libsgenvironment_a_SOURCES = metar.cxx visual_enviro.cxx precipitation.cxx +libsgenvironment_la_SOURCES = metar.cxx visual_enviro.cxx precipitation.cxx INCLUDES = -I$(top_srcdir) diff --git a/simgear/ephemeris/Makefile.am b/simgear/ephemeris/Makefile.am index c6ea748..f577d9d 100644 --- a/simgear/ephemeris/Makefile.am +++ b/simgear/ephemeris/Makefile.am @@ -1,6 +1,6 @@ includedir = @includedir@/ephemeris -lib_LIBRARIES = libsgephem.a +lib_LTLIBRARIES = libsgephem.la include_HEADERS = \ celestialBody.hxx \ @@ -16,7 +16,7 @@ include_HEADERS = \ uranus.hxx \ venus.hxx -libsgephem_a_SOURCES = \ +libsgephem_la_SOURCES = \ celestialBody.cxx \ ephemeris.cxx \ jupiter.cxx \ diff --git a/simgear/io/Makefile.am b/simgear/io/Makefile.am index ee2294c..2355d05 100644 --- a/simgear/io/Makefile.am +++ b/simgear/io/Makefile.am @@ -1,6 +1,6 @@ includedir = @includedir@/io -lib_LIBRARIES = libsgio.a +lib_LTLIBRARIES = libsgio.la include_HEADERS = \ iochannel.hxx \ @@ -12,7 +12,7 @@ include_HEADERS = \ sg_socket_udp.hxx \ raw_socket.hxx -libsgio_a_SOURCES = \ +libsgio_la_SOURCES = \ iochannel.cxx \ lowlevel.cxx \ sg_binobj.cxx \ @@ -29,11 +29,15 @@ noinst_PROGRAMS = decode_binobj socktest lowtest tcp_server tcp_client tcp_server_SOURCES = tcp_server.cxx tcp_server_LDADD = \ - libsgio.a \ - $(top_builddir)/simgear/structure/libsgstructure.a \ - $(top_builddir)/simgear/debug/libsgdebug.a \ - $(top_builddir)/simgear/bucket/libsgbucket.a \ - $(top_builddir)/simgear/misc/libsgmisc.a \ + libsgio.la \ + $(top_builddir)/simgear/serial/libsgserial.la \ + $(top_builddir)/simgear/misc/libsgmisc.la \ + $(top_builddir)/simgear/bucket/libsgbucket.la \ + $(top_builddir)/simgear/debug/libsgdebug.la \ + $(top_builddir)/simgear/structure/libsgstructure.la \ + $(top_builddir)/simgear/props/libsgprops.la \ + $(top_builddir)/simgear/math/libsgmath.la \ + $(top_builddir)/simgear/timing/libsgtiming.la \ -lz \ $(network_LIBS) \ $(base_LIBS) @@ -41,11 +45,15 @@ tcp_server_LDADD = \ tcp_client_SOURCES = tcp_client.cxx tcp_client_LDADD = \ - libsgio.a \ - $(top_builddir)/simgear/structure/libsgstructure.a \ - $(top_builddir)/simgear/debug/libsgdebug.a \ - $(top_builddir)/simgear/bucket/libsgbucket.a \ - $(top_builddir)/simgear/misc/libsgmisc.a \ + libsgio.la \ + $(top_builddir)/simgear/serial/libsgserial.la \ + $(top_builddir)/simgear/misc/libsgmisc.la \ + $(top_builddir)/simgear/bucket/libsgbucket.la \ + $(top_builddir)/simgear/debug/libsgdebug.la \ +
Re: [Flightgear-devel] SimGear Shared Object Libaries
Just a quick hint -- Fedora has the same shared-libs policy and packages simgear. I'm pretty sure they have patches you could use straight-away. Stefan 2010/8/3 Chris Baines cbain...@gmail.com Thank you both for your quick responses, this makes the situation more clear. Is it possible to resolve the problems I am having compiling FlightGear using the method fred suggested? I have tried looking for a similar line in the FlightGear makefiles but can't find one? Thanks again, Chris On Tue, 2010-08-03 at 14:01 -0500, Curtis Olson wrote: Hi Chris, I do understand the Debian policy of compiling all libraries as shared libs, and understand there are many good reasons to have that policy. However, simgear does not official support being compiled as shared libs. From a practical standpoint, there really isn't much value in this. The specific version of SimGear is *very* closely linked to the specific version of FlightGear, and FlightGear can't run with mismatched versions. Compiling C++ code into shared libraries can become a bit snaky due to different name mangling rules between compilers and even different versions of the same compiler. Very likely FlightGear is the only application that will ever link to simgear on a person's system. Developing two closely linked packages where one is built as a shared lib can be a pain for a couple different reasons. libtool can be a pain for a couple reasons too. I realize none of this will cause Debian to want to change it's shared library policy, but hopefully it shows that our logic isn't completely random either. FlightGear typically is not opposed to reasonable changes if it helps someone somewhere without confusing or complicating the code, so if there are easy, straightforward ways to untangle the interdependencies you are encountering as shared libs, I don't think we'd flat rule those out. However, our policy is that SimGear should be compiled as a static lib, so we aren't going to completely restructure the code and the build system to directly support building simgear as shared libraries. Regards, Curt. On Tue, Aug 3, 2010 at 1:45 PM, Chris Baines wrote: Hello, I am trying to update the SimGear package in Debian (from 1.9.1 to 2.0.0), I have packaged the current version of fgrun and plan to upload it, but it only compiles with SimGear (v2.0.0). The current Debian Maintainer is as far as I can tell not active at the moment, which is why I have ended up trying to upgrade the package myself. The Maintainer has included a makefile that takes the static libraries and makes them is to shared object libraries. However these libraries have circular dependencies that I cant seam to solve. For instance the following shared object libraries are interdependent on each other: libsgprops -- libsgmisc libsgprops -- libsgstructure libsgmaterial -- libsgutil libsgtiming -- libsgstructure This prevents me from compiling FlightGear with the package as it errors like: /usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libsgstructure.so: undefined reference to `SGTimeStamp::stamp()' Is this something you can help me with? Thanks, Chris -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Curtis Olson: http://baron.flightgear.org/~curt/ -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more
[Flightgear-devel] SimGear Shared Object Libaries
Hello, I am trying to update the SimGear package in Debian (from 1.9.1 to 2.0.0), I have packaged the current version of fgrun and plan to upload it, but it only compiles with SimGear (v2.0.0). The current Debian Maintainer is as far as I can tell not active at the moment, which is why I have ended up trying to upgrade the package myself. The Maintainer has included a makefile that takes the static libraries and makes them is to shared object libraries. However these libraries have circular dependencies that I cant seam to solve. For instance the following shared object libraries are interdependent on each other: libsgprops -- libsgmisc libsgprops -- libsgstructure libsgmaterial -- libsgutil libsgtiming -- libsgstructure This prevents me from compiling FlightGear with the package as it errors like: /usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libsgstructure.so: undefined reference to `SGTimeStamp::stamp()' Is this something you can help me with? Thanks, Chris -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] SimGear Shared Object Libaries
Hi Chris, I do understand the Debian policy of compiling all libraries as shared libs, and understand there are many good reasons to have that policy. However, simgear does not official support being compiled as shared libs. From a practical standpoint, there really isn't much value in this. The specific version of SimGear is *very* closely linked to the specific version of FlightGear, and FlightGear can't run with mismatched versions. Compiling C++ code into shared libraries can become a bit snaky due to different name mangling rules between compilers and even different versions of the same compiler. Very likely FlightGear is the only application that will ever link to simgear on a person's system. Developing two closely linked packages where one is built as a shared lib can be a pain for a couple different reasons. libtool can be a pain for a couple reasons too. I realize none of this will cause Debian to want to change it's shared library policy, but hopefully it shows that our logic isn't completely random either. FlightGear typically is not opposed to reasonable changes if it helps someone somewhere without confusing or complicating the code, so if there are easy, straightforward ways to untangle the interdependencies you are encountering as shared libs, I don't think we'd flat rule those out. However, our policy is that SimGear should be compiled as a static lib, so we aren't going to completely restructure the code and the build system to directly support building simgear as shared libraries. Regards, Curt. On Tue, Aug 3, 2010 at 1:45 PM, Chris Baines wrote: Hello, I am trying to update the SimGear package in Debian (from 1.9.1 to 2.0.0), I have packaged the current version of fgrun and plan to upload it, but it only compiles with SimGear (v2.0.0). The current Debian Maintainer is as far as I can tell not active at the moment, which is why I have ended up trying to upgrade the package myself. The Maintainer has included a makefile that takes the static libraries and makes them is to shared object libraries. However these libraries have circular dependencies that I cant seam to solve. For instance the following shared object libraries are interdependent on each other: libsgprops -- libsgmisc libsgprops -- libsgstructure libsgmaterial -- libsgutil libsgtiming -- libsgstructure This prevents me from compiling FlightGear with the package as it errors like: /usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libsgstructure.so: undefined reference to `SGTimeStamp::stamp()' Is this something you can help me with? Thanks, Chris -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Curtis Olson: http://baron.flightgear.org/~curt/ -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] SimGear Shared Object Libaries
Hi, - Chris Baines cbain...@gmail.com a écrit : Hello, I am trying to update the SimGear package in Debian (from 1.9.1 to 2.0.0), I have packaged the current version of fgrun and plan to upload it, but it only compiles with SimGear (v2.0.0). The current Debian Maintainer is as far as I can tell not active at the moment, which is why I have ended up trying to upgrade the package myself. The Maintainer has included a makefile that takes the static libraries and makes them is to shared object libraries. However these libraries have circular dependencies that I cant seam to solve. For instance the following shared object libraries are interdependent on each other: libsgprops -- libsgmisc libsgprops -- libsgstructure libsgmaterial -- libsgutil libsgtiming -- libsgstructure This prevents me from compiling FlightGear with the package as it errors like: /usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libsgstructure.so: undefined reference to `SGTimeStamp::stamp()' Is this something you can help me with? On Unix, you can resolve circular dependencies by including the same library several times in the command line. For example : -lsgprops -lsgmisc -lsgprops After that, you have to find the good combination. fgrun/src/Makefile.am includes the following line : simgear_libs = -lsgmodel -lsgscreen -lsgprops -lsgxml -lsgdebug -lsgbvh -lsgmaterial -lsgmodel -lsgutil -lsgstructure -lsgprops -lsgtgdb -lsgmath -lsgmisc -lsgbvh -lsgio -lsgbucket -lsgmodel -lsgutil Notice the repetitions. -Fred -- Frédéric Bouvier http://my.fotolia.com/frfoto/ Photo gallery - album photo http://www.youtube.com/user/fgfred64 Videos -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] SimGear Shared Object Libaries
Thank you both for your quick responses, this makes the situation more clear. Is it possible to resolve the problems I am having compiling FlightGear using the method fred suggested? I have tried looking for a similar line in the FlightGear makefiles but can't find one? Thanks again, Chris On Tue, 2010-08-03 at 14:01 -0500, Curtis Olson wrote: Hi Chris, I do understand the Debian policy of compiling all libraries as shared libs, and understand there are many good reasons to have that policy. However, simgear does not official support being compiled as shared libs. From a practical standpoint, there really isn't much value in this. The specific version of SimGear is *very* closely linked to the specific version of FlightGear, and FlightGear can't run with mismatched versions. Compiling C++ code into shared libraries can become a bit snaky due to different name mangling rules between compilers and even different versions of the same compiler. Very likely FlightGear is the only application that will ever link to simgear on a person's system. Developing two closely linked packages where one is built as a shared lib can be a pain for a couple different reasons. libtool can be a pain for a couple reasons too. I realize none of this will cause Debian to want to change it's shared library policy, but hopefully it shows that our logic isn't completely random either. FlightGear typically is not opposed to reasonable changes if it helps someone somewhere without confusing or complicating the code, so if there are easy, straightforward ways to untangle the interdependencies you are encountering as shared libs, I don't think we'd flat rule those out. However, our policy is that SimGear should be compiled as a static lib, so we aren't going to completely restructure the code and the build system to directly support building simgear as shared libraries. Regards, Curt. On Tue, Aug 3, 2010 at 1:45 PM, Chris Baines wrote: Hello, I am trying to update the SimGear package in Debian (from 1.9.1 to 2.0.0), I have packaged the current version of fgrun and plan to upload it, but it only compiles with SimGear (v2.0.0). The current Debian Maintainer is as far as I can tell not active at the moment, which is why I have ended up trying to upgrade the package myself. The Maintainer has included a makefile that takes the static libraries and makes them is to shared object libraries. However these libraries have circular dependencies that I cant seam to solve. For instance the following shared object libraries are interdependent on each other: libsgprops -- libsgmisc libsgprops -- libsgstructure libsgmaterial -- libsgutil libsgtiming -- libsgstructure This prevents me from compiling FlightGear with the package as it errors like: /usr/lib/gcc/i486-linux-gnu/4.4.5/../../../../lib/libsgstructure.so: undefined reference to `SGTimeStamp::stamp()' Is this something you can help me with? Thanks, Chris -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- Curtis Olson: http://baron.flightgear.org/~curt/ -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net