Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92821 - dev-games/ode-0.5-r4 - Patch to enable building of shared ode library
Summary: dev-games/ode-0.5-r4 - Patch to enable building of shared ode library
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-16 11:59 UTC by Terry L. Triplett
Modified: 2006-06-19 14:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Sample ebuild incorporating changes to build ode shared libs (ode-0.5-r3.ebuild,2.05 KB, application/octet-stream)
2005-05-16 12:01 UTC, Terry L. Triplett
Details
patch to ode sources enabling building of ode shared library (ode-0.5-sharedlib.patch,2.47 KB, patch)
2005-05-16 12:03 UTC, Terry L. Triplett
Details | Diff
ode-0.5-r4.ebuild modified to support shared ode library (ode-0.5-r4.ebuild,2.40 KB, application/octet-stream)
2005-11-24 06:53 UTC, Terry L. Triplett
Details
Diff against ode-0.5-r4.ebuild to highlight suggested changes to include shared lib (ode-0.5-r4.ebuild.diff,1.32 KB, patch)
2006-03-28 12:35 UTC, Terry L. Triplett
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Terry L. Triplett 2005-05-16 11:59:38 UTC
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.
Comment 1 Terry L. Triplett 2005-05-16 12:01:17 UTC
Created attachment 59041 [details]
Sample ebuild incorporating changes to build ode shared libs
Comment 2 Terry L. Triplett 2005-05-16 12:03:53 UTC
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.
Comment 3 SpanKY gentoo-dev 2005-05-16 15:13:25 UTC
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 ...
Comment 4 Terry L. Triplett 2005-05-16 17:09:13 UTC
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.
Comment 5 Terry L. Triplett 2005-11-24 06:53:25 UTC
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.
Comment 6 Terry L. Triplett 2005-11-24 07:44:54 UTC
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.
Comment 7 Tupone Alfredo gentoo-dev 2006-03-28 11:30:11 UTC
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
Comment 8 Terry L. Triplett 2006-03-28 12:34:10 UTC
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.
Comment 9 Terry L. Triplett 2006-03-28 12:35:56 UTC
Created attachment 83326 [details, diff]
Diff against ode-0.5-r4.ebuild to highlight suggested changes to include shared lib
Comment 10 Tupone Alfredo gentoo-dev 2006-06-19 14:34:51 UTC
Version 0.6 is in portage, and install a shared library too.