pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rpath fix in graphics/glfw



Create a pull-request on github: https://github.com/glfw/glfw/pull/1540

--
Aleksej Lebedev

On Wed, Jul 24, 2019, at 16:48, Aleksej Lebedev wrote:
> Hi, everyone!
> 
> I recently added tracy  (https://bitbucket.org/wolfpld/tracy) to 
> pkgsrc-wip. It compiles OK on Linux and on Mac. However, when executed 
> on Mac it fails to load libglfw.3.dylib (part of graphics/glfw) due to 
> an incorrect rpath in glfw.
> 
> I fixed it by removing a mac-specific trick in glfw. Honestly I don't 
> understand what the trick was originally for, but it breaks liking 
> against libgsfw.dylib. The patch is the following:
> 
> a@zhtw-pc:~/pkgsrc$ cat graphics/glfw/patches/patch-src_CMakeLists.txt 
> $NetBSD$
> 
> - TOMTOM: Fixes linking on OSX
> 
> --- src/CMakeLists.txt.orig	2016-08-18 11:32:27.000000000 +0000
> +++ src/CMakeLists.txt
> @@ -96,9 +96,6 @@ if (BUILD_SHARED_LIBS)
>      elseif (APPLE)
>          # Add -fno-common to work around a bug in Apple's GCC
>          target_compile_options(glfw PRIVATE "-fno-common")
> -
> -        set_target_properties(glfw PROPERTIES
> -                              INSTALL_NAME_DIR "lib${LIB_SUFFIX}")
>      elseif (UNIX)
>          # Hide symbols not explicitly tagged for export from the shared library
>          target_compile_options(glfw PRIVATE "-fvisibility=hidden")
> 
> Without this patch otool -L libglfw.3.dylib used to report 
> "lib/libglfw.3.dylib" instead of "/Users/a/pkg/lib/libglfw.3.dylib" (my 
> PREFIX is /User/a/pkg).
> 
> We are using our own pkgsrc branch where we commit our TomTom-specific 
> fixes (I work for TomTom).
> But we would be happy to deviate from mainstream as little as possible. 
> Please consider adding the patch.
> Thanks.
> 
> --
> Aleksej Lebedev
>


Home | Main Index | Thread Index | Old Index