[MacPorts] #32511: openjpeg @1.4-r697 openjpeg/ffmpeg/libjasper symbol collision
#32511: openjpeg @1.4-r697 openjpeg/ffmpeg/libjasper symbol collision -----------------------------------+---------------------------------------- Reporter: marin.saric@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: openjpeg libjasper -----------------------------------+---------------------------------------- The purpose of this ticket is to point out a serious issue with OpenJPEG that can lead to unpredictable crashes and seek feedback and advice. I volunteer to cherry-pick the simple symbol-mangling patch from the OpenJPEG trunk and apply it to the stable version of OpenJPEG currently in MacPorts. This issue has been discussed and addressed in the OpenJPEG trunk: http://code.google.com/p/openjpeg/issues/detail?id=30 Background information: {{{OpenJPEG}}} was designed as an alternative to {{{libjasper}}}, a library providing the JPEG2000 format functionality. Ideally, a project will use either {{{OpenJPEG}}} or {{{libjasper}}}. Some private symbols in OpenJPEG (such as {{{jp2_decode}}}), which are never called by the library user's code end up colliding with the public library API symbols of {{{libjasper}}}. {{{ffmpeg}}} is a popular library that is compiled with {{{OpenJPEG}}} support in MacPorts. A program (or, even worse, a {{{dylib}}} plugin) relying on {{{libjasper}}} can also depend on {{{ffmpeg}}}. Even worse, a program loading a {{{dylib}}} plugin can have {{{OpenJPEG}}} already loaded, tripping up a segmentation fault once the plugin loads and the code to open a JPEG2000 file executes. A simple fix is to change the name of the offending private functions in the OpenJPEG code and recompile openjpeg. -- Ticket URL: <https://trac.macports.org/ticket/32511> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32511: openjpeg @1.4-r697 openjpeg/ffmpeg/libjasper symbol collision -----------------------------------+---------------------------------------- Reporter: marin.saric@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: openjpeg jasper ffmpeg -----------------------------------+---------------------------------------- Changes (by ryandesign@…): * cc: mcalhoun (removed) * cc: mcalhoun@…, jmr@…, devans@… (added) * port: openjpeg libjasper => openjpeg jasper ffmpeg -- Ticket URL: <https://trac.macports.org/ticket/32511#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32511: openjpeg @1.4-r697 openjpeg/ffmpeg/libjasper symbol collision -----------------------------------+---------------------------------------- Reporter: marin.saric@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: openjpeg jasper ffmpeg -----------------------------------+---------------------------------------- Comment(by jmr@…): Out of curiosity, why isn't this issue avoided with a two-level namespace? Or does some of this stuff force a flat namespace? -- Ticket URL: <https://trac.macports.org/ticket/32511#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32511: openjpeg @1.4-r697 openjpeg/ffmpeg/libjasper symbol collision -----------------------------------+---------------------------------------- Reporter: marin.saric@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: openjpeg jasper ffmpeg -----------------------------------+---------------------------------------- Comment(by marin.saric@…): I stumbled upon this problem during static linking and didn't even think of Apple's clever two-level namespace scheme. Considering Qt4 binaries are still built with -flat_namespace, I am guessing the problem can resurface.. Also there's no two-level namespace equivalent during static linking. For example, when trying to link opencv statically you run into this: opencv links against jasper and ffmpeg, ffmpeg links against openjpeg and boom you have duplicate symbols. However, the symbol collision is an accident. A private function got exported under a common name.. -- Ticket URL: <https://trac.macports.org/ticket/32511#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32511: openjpeg @1.4-r697 openjpeg/ffmpeg/libjasper symbol collision -------------------------------------+-------------------------------------- Reporter: marin.saric@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: fixed | Keywords: Port: openjpeg jasper ffmpeg | -------------------------------------+-------------------------------------- Changes (by jmr@…): * status: new => closed * resolution: => fixed Comment: Fixed in 1.5. -- Ticket URL: <https://trac.macports.org/ticket/32511#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts