[MacPorts] #43195: cmake guru required so I can finish x265 Portfile
#43195: cmake guru required so I can finish x265 Portfile ---------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: | Port: ---------------------+-------------------------------- When building libx264, -install_name $PREFIX/lib/libx264.142.dylib is used when generating the dylib. The x265 cmake project targets Linux, so there's no addition of this ld directive. My question is this... Let me know the best way to add this directive to the cmake project. I'm using the MultiCoreWare code base. hg clone https://bitbucket.org/multicoreware/x265 x265.hg Thanks. -- Ticket URL: <https://trac.macports.org/ticket/43195> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by david@…): Tried install_name_tool -add_rpath $PREFIX/lib libx265.dylib with no effect. -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by david@…): This works as a temp fix. install_name_tool -id $PREFIX/lib/libx265.13.dylib libx265.13.dylib Maybe best way to do this in Portfile is to just run this command, rather than add some patch file for the cmake project. Suggestions welcome. -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: | ----------------------+-------------------------------- Comment (by david@…): Hum... This approach works for programs like ffmpeg that link the library, after the library is built. Problem is the x265 program fails, because the shared object file has no rpath at build time, so running install_name_tool at the end of the build still leaves an unusable x265 CLI program. So a better solution is required. -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: x265 | ----------------------+-------------------------------- Changes (by macsforever2000@…): * version: 2.2.1 => * port: => x265 -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: x265 | ----------------------+-------------------------------- Comment (by cal@…): CMake supports that out of the box by setting the `INSTALL_NAME_DIR` porperty in `CMakeLists.txt` for the target that builds the library. See http://cmake.org/cmake/help/v2.8.10/cmake.html#prop_tgt:INSTALL_NAME_DIR. If the upstream `CMakeLists.txt` doesn't do that, you should probably make a patch and submit it there. -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: x265 | ----------------------+-------------------------------- Comment (by david@…): Every time I start digging into cmake, I start thinking about eating my gun... Let me know if there is a way to set the INSTALL_NAME_DIR as an environment variable to test this... Maybe export=CMAKE_INSTALL_NAME_DIR=$prefix or such... Thanks for your assistance. I will get in touch with upstream + open a ticket. -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: x265 | ----------------------+-------------------------------- Comment (by david@…): I ask about the environment variable because there are 5 different CMakeLists.txt files in this project. Ugh... -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: x265 | ----------------------+-------------------------------- Comment (by david@…): https://bitbucket.org/multicoreware/x265/issue/46 is the ticket open with upstream. -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: x265 | ----------------------+-------------------------------- Comment (by cal@…): I think you can add `-DCMAKE_INSTALL_NAME_DIR=$prefix/lib` to `configure.args`, but that's only good for the libraries. The correct way to fix that really is going through each add_library target and adding something along the lines of {{{ set_target_properties(libname PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}" BUILD_WITH_INSTALL_RPATH 1) }}} -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#43195: cmake guru required so I can finish x265 Portfile ----------------------+-------------------------------- Reporter: david@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: x265 | ----------------------+-------------------------------- Comment (by jaminmc@…): Ok, it only works with x265 directly. ffmpeg with x265 enabled still fails. -- Ticket URL: <https://trac.macports.org/ticket/43195#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts