Building on a fresh Mac M1 machine running Sonoma I am getting the following error when building Get-1.0.gir
ld: warning: duplicate -rpath '/opt/homebrew/Cellar/glib/2.80.4/lib' ignored
ld: warning: duplicate -rpath '/opt/homebrew/opt/gettext/lib' ignored
ld: warning: ignoring duplicate libraries: '-lglib-2.0', '-lgmodule-2.0', '-lgobject-2.0', '-lintl'
ERROR: can't resolve libraries to shared libraries: m, dl
The PKG_CONFIG_PATH output by the build script shows -lm -ldl
. I am not sure where these are coming from. Anyone have an idea what I should be looking for to fix this?
I blew out my brew installation, and am quite further. It appears my x264 installation is not correct.
X264_API extern const x264_level_t x264_levels[];
^
/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../include/x264.h:56:18: note: expanded from macro 'X264_API'
#define X264_API __declspec(dllimport)
^
/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../include/x264.h:690:1: error: '__declspec' attributes are not enabled; use '-fdeclspec' or '-fms-extensions' to enable support for __declspec attributes
X264_API extern const int x264_chroma_format;
^
/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../include/x264.h:56:18: note: expanded from macro 'X264_API'
#define X264_API __declspec(dllimport)
Is there a recommended way of install ffmpeg, x264 and friends. I used brew. Additionally I see
../subprojects/gst-libav/ext/libav/gstavprotocol.c:272:28: error: incompatible function pointer types passing 'int (void *, uint8_t *, int)' (aka 'int (void *, unsigned char *, int)') to parameter of type 'int (*)(void *, const uint8_t *, int)' (aka 'int (*)(void *, const unsigned char *, int)') [-Wincompatible-function-pointer-types]
gst_ffmpegdata_read, gst_ffmpegdata_write, gst_ffmpegdata_seek);
^~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/ffmpeg/7.0.2/include/libavformat/avio.h:404:25: note: passing argument to parameter 'write_packet' here
int (*write_packet)(void *opaque, const uint8_t *buf, int buf_size),
Going back to ffmpeg 6 solved the last two issues above, but the x264 issue remains.
Well back to
FAILED: subprojects/gstreamer/gst/Gst-1.0.gir
....
ld: warning: duplicate -rpath '/opt/homebrew/Cellar/glib/2.80.4/lib' ignored
ld: warning: duplicate -rpath '/opt/homebrew/opt/gettext/lib' ignored
ld: warning: ignoring duplicate libraries: '-lglib-2.0', '-lgmodule-2.0', '-lgobject-2.0', '-lintl'
ERROR: can't resolve libraries to shared libraries: m, dl
I think this has something to do with pygobject3.