Uninstalled build on mac OS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Uninstalled build on mac OS

Jérôme Laheurte-3
Hello. I’m trying to use the « uninstalled » script to set up a dev environment on mac OS (10.11.6, dependencies installed through brew). After some initial failures I tried uninstalling the system-wide version (and rm -rf /usr/lib/gstreamer-1.0 and everything else just to be sure), so there is not more trace of gstreamer in my global env. I cleaned the source tree (git clean -d -x -f) and rebuilt the stuff.

My problem now is that gst-inspect fails to load basic plugins. Messages look like

(gst-plugin-scanner:30688): GStreamer-WARNING **: Failed to load plugin '/Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so': dlopen(/Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so, 2): Library not loaded: /usr/local/lib/libgstpbutils-1.0.0.dylib
  Referenced from: /Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so
  Reason: image not found

Of course image not found, there is nothing gstreamer-related in /usr/local, and there was nothing when I ran autogen/make. The .dylib in question is in gst-plugins-base build tree. Setting LD_LIBRARY_PATH does not help. So were does this come from ? Did anybody manage to do this on mac OS ?

TIA
Jérôme Laheurte


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Uninstalled build on mac OS

Jérôme Laheurte-3

> Le 30 sept. 2017 à 16:18, Jérôme Laheurte <[hidden email]> a écrit :
>
> My problem now is that gst-inspect fails to load basic plugins. Messages look like
>
> (gst-plugin-scanner:30688): GStreamer-WARNING **: Failed to load plugin '/Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so': dlopen(/Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so, 2): Library not loaded: /usr/local/lib/libgstpbutils-1.0.0.dylib
>  Referenced from: /Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so
>  Reason: image not found

For what it’s worth, running the following script after building « fixes » the issues:

#!/bin/bash

GST=$HOME/gst/master

find . -name "*.so" -o -name "*.dylib" | while read name; do
    otool -L "$name" | grep /usr/local/lib/libgst | sed -e 's/^ *$//' | cut -f1 -d\  | while read depname; do
        base=`basename $depname`
        realpath=`find . -name "$base"`
        install_name_tool -change $depname $realpath $name
    done
done

Not very subtle, and it would be nice to set the install name of .so and .dylib files to their uninstalled path in this mode, but I have no idea how to do it, so…

Best regards
Jérôme Laheurte


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (859 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Uninstalled build on mac OS

Nicolas Dufresne-5


Le 1 oct. 2017 10:35 AM, "Jérôme Laheurte" <[hidden email]> a écrit :

> Le 30 sept. 2017 à 16:18, Jérôme Laheurte <[hidden email]> a écrit :
>
> My problem now is that gst-inspect fails to load basic plugins. Messages look like
>
> (gst-plugin-scanner:30688): GStreamer-WARNING **: Failed to load plugin '/Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so': dlopen(/Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so, 2): Library not loaded: /usr/local/lib/libgstpbutils-1.0.0.dylib
>  Referenced from: /Users/fraca7/gst/master/gst-plugins-base/gst/typefind/.libs/libgsttypefindfunctions.so
>  Reason: image not found

For what it’s worth, running the following script after building « fixes » the issues:

#!/bin/bash

GST=$HOME/gst/master

find . -name "*.so" -o -name "*.dylib" | while read name; do
    otool -L "$name" | grep /usr/local/lib/libgst | sed -e 's/^ *$//' | cut -f1 -d\  | while read depname; do
        base=`basename $depname`
        realpath=`find . -name "$base"`
        install_name_tool -change $depname $realpath $name
    done
done

Not very subtle, and it would be nice to set the install name of .so and .dylib files to their uninstalled path in this mode, but I have no idea how to do it, so…

--prefix should do, but it is not ideal. On OSX you can use relative path if I remember well.


Best regards
Jérôme Laheurte


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Uninstalled build on mac OS

Jérôme Laheurte-3

Le 2 oct. 2017 à 01:03, Nicolas Dufresne <[hidden email]> a écrit :

Le 1 oct. 2017 10:35 AM, "Jérôme Laheurte" <[hidden email]> a écrit :

Not very subtle, and it would be nice to set the install name of .so and .dylib files to their uninstalled path in this mode, but I have no idea how to do it, so…

--prefix should do, but it is not ideal. On OSX you can use relative path if I remember well.


Not sure —prefix would do it, since affected files are scattered throughout the build tree, not in a single directory. There are some tricks with install_name_tool to avoid absolute directories but I’m not sure it would be very useful here. Anyway, dev env working now :)

Best regards
Jérôme Laheurte


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel