The ode build system currently doesn't support building a shared library on *nix systems. The included patch modifies the ode source to allow building of a shared library (libode.so.0) in addition to the static library (libode.a) currently built. The changes are simple and consist mainly of modifications to the top-level makefile. The modifications are based on those made for the following debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=286937. The debian developer inquired upstream and was given permission to use libode.so.0 as the library name. (See last message at bottom of bug report). In addition, I modified the make targets so that the test programs link against the shared ode library rather than the static library. This was to confirm that the shared library actually works. All test programs ran without incident with these changes. I attach an example ebuild based on the ode-0.5-r2 ebuild to facilitate testing. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 59041 [details] Sample ebuild incorporating changes to build ode shared libs
Created attachment 59042 [details, diff] patch to ode sources enabling building of ode shared library This patch also modifies the make targets so that the sample programs link against the shared library. Left in for testing - if not desirable it should be easy enough to revert back to static linking for the samples.
i never added shared library support to ode because i wasnt sure that is what upstream wanted with the package the current libode.a is built with PIC so it should be fine to use anywhere ...
Upstream doesn't seem to care - they just don't have much use for shared libs themselves. From an older version of the user's guide: "There is currently no built-in support to build Windows DLLs or Unix shared libraries --- although it is not hard to add this yourself." In my case I'm calling ode from mono via the Tao bindings (http://www.mono-project.com/Tao) which needs shared libraries since the binding necessarily happens at runtime. libode.a doesn't work. It shouldn't hurt anything to provide both the static and shared library.
Created attachment 73496 [details] ode-0.5-r4.ebuild modified to support shared ode library Bump. I was motivated to revisit this after the ode-0.5-r4 update clobbered the ode install from my portage overlay. As mentioned before, the .NET/Mono mechanism for interfacing to native libs uses late binding (at runtime) so shared libaries are needed. The static library created by the default ebuild won't work (I tried). The patch to Ode seems harmless enough and allows both static and shared ode libs to coexist. Please consider adding this to the ode ebuild.
Changing summary to reflect the current revision of the package (r4 rather than r2). Hope this works or I just send unnecessary mail to everyone.
If you want this patch applied, please post the ebuild patch instead of the entire ebuild If we change the ebuild indipendently to fix other bugs, we will not known what you're changes are about. I'd be glad to put in portage, in that case
Well, that's good information to recieve nearly a year later. Thanks for paying attention, at least. In the meantime, upstream has moved development to subversion, replaced the original build system with autotools that incorporates a shared target and is gearing up for a new release, so this will all be irrelevant soon. "If we change the ebuild indipendently[sic] to fix other bugs, we will not known what you're[sic] changes are about." The ebuild was meant to provide an example, not a replacement, and was posted as per the convention followed by other devs in other issues I have studied. But I'll post a diff of the relevant changes against the current ebuild as you request. Note that the patch to the ODE source includes changes to test build the sample programs against the shared lib rather than the original static lib. This may not be what you want and should be reviewed before blindly applying it. The same goes for the added make directives in src_compile() - they should be reviewed and modified if necessary before applying blindly.
Created attachment 83326 [details, diff] Diff against ode-0.5-r4.ebuild to highlight suggested changes to include shared lib
Version 0.6 is in portage, and install a shared library too.