Closed ghjhtd closed 3 hours ago
valac --version Vala 0.56.0
pkg-config --modversion glib-2.0 2.72.4
Ubuntu22报错:live-photo-conv-main/builddir' [2/21] Compiling Vala source ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala FAILED: src/liblivephototools.so.p/errordomains.c src/liblivephototools.so.p/livemaker.c src/liblivephototools.so.p/livemakerffmpeg.c src/liblivephototools.so.p/livephoto.c src/liblivephototools.so.p/livephotoffmpeg.c src/liblivephototools.so.p/main.c src/liblivephototools.so.p/reporter.c src/liblivephototools.so.p/utils.c src/liblivephototools.so.p/version.c src/livephototools.h src/livephototools.vapi src/LivePhotoTools-0.3.gir valac -C --pkg gexiv2 --pkg gmodule-2.0 --pkg gio-2.0 --pkg gobject-2.0 --pkg glib-2.0 --color=always --directory src/liblivephototools.so.p --basedir ../src --library livephototools --header src/livephototools.h --vapi ../livephototools.vapi --gir ../LivePhotoTools-0.3.gir ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala ../src/utils.vala:43.31-43.55: error: The name
from_buffer' does not exist in the context of
GLib.StringBuilder' (glib-2.0) 43 | builder = new StringBuilder.from_buffer ((char[]) buffer); | ^~~~~~~ ../src/utils.vala:49.40-49.61: error: The namefree_and_steal' does not exist in the context of
GLib.StringBuilder?' (glib-2.0) 49 | return (builder != null) ? (!) builder.free_and_steal () : ""; | ^~~~~~~~ Compilation failed: 2 error(s), 0 warning(s) ninja: build stopped: subcommand failed.大佬,这个怎么解决啊?
builder.free_and_steal ()
requires GLib >= 2.76.
builder.free_and_steal ()
需要GLib >= 2.76
Considering the current situation, I will change it to be compatible with older versions of GLib.
考虑到非滚动的其他发行版的现状,我会修改以便适配低版本的GLib.
As long as it follows Google's standards, it will be like this. I don't know whether Huawei follows the standards.
只要按照Google的标准都是这样,我不知道华为是否按照标准。
我的系统是"Ubuntu 22.04.5 LTS",GLib 版本不太好改,应该只能用windos试试了
我的系统是"Ubuntu 22.04.5 LTS",GLib 版本不太好改,应该只能用windos试试了
Don't worry, I'll fix it for you.
没关系,我会修改以兼容旧版本GLib.
太牛了大佬,啥时候能改好啊?你知道有哪些手机型号是用的这个动态照片格式的吗
太牛了大佬,啥时候能改好啊?你知道有哪些手机型号是用的这个动态照片格式的吗
至少有小米和Pixel,三星应该也是
Finished! Please test.
改好了,你看看现在能不能构建。
meson compile -C builddir
ninja: Entering directory /home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [2/21] Compiling Vala source ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala FAILED: src/liblivephototools.so.p/errordomains.c src/liblivephototools.so.p/livemaker.c src/liblivephototools.so.p/livemakerffmpeg.c src/liblivephototools.so.p/livephoto.c src/liblivephototools.so.p/livephotoffmpeg.c src/liblivephototools.so.p/main.c src/liblivephototools.so.p/reporter.c src/liblivephototools.so.p/utils.c src/liblivephototools.so.p/version.c src/livephototools.h src/livephototools.vapi src/LivePhotoTools-0.3.gir valac -C --pkg gexiv2 --pkg gmodule-2.0 --pkg gio-2.0 --pkg gobject-2.0 --pkg glib-2.0 --color=always --directory src/liblivephototools.so.p --basedir ../src --library livephototools --header src/livephototools.h --vapi ../livephototools.vapi --gir ../LivePhotoTools-0.3.gir ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala ../src/utils.vala:43.31-43.55: error: The name
from_buffer' does not exist in the context of `GLib.StringBuilder' (glib-2.0)
43 | builder = new StringBuilder.from_buffer ((char[]) buffer);
| ^~~~~~~~~
Compilation failed: 1 error(s), 0 warning(s)
ninja: build stopped: subcommand failed.
gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$
meson compile -C builddir ninja: Entering directory
/home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [2/21] Compiling Vala source ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala FAILED: src/liblivephototools.so.p/errordomains.c src/liblivephototools.so.p/livemaker.c src/liblivephototools.so.p/livemakerffmpeg.c src/liblivephototools.so.p/livephoto.c src/liblivephototools.so.p/livephotoffmpeg.c src/liblivephototools.so.p/main.c src/liblivephototools.so.p/reporter.c src/liblivephototools.so.p/utils.c src/liblivephototools.so.p/version.c src/livephototools.h src/livephototools.vapi src/LivePhotoTools-0.3.gir valac -C --pkg gexiv2 --pkg gmodule-2.0 --pkg gio-2.0 --pkg gobject-2.0 --pkg glib-2.0 --color=always --directory src/liblivephototools.so.p --basedir ../src --library livephototools --header src/livephototools.h --vapi ../livephototools.vapi --gir ../LivePhotoTools-0.3.gir ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala ../src/utils.vala:43.31-43.55: error: The name
from_buffer' does not exist in the context of `GLib.StringBuilder' (glib-2.0) 43 | builder = new StringBuilder.from_buffer ((char[]) buffer); | ^~~~~~~~~ Compilation failed: 1 error(s), 0 warning(s) ninja: build stopped: subcommand failed. gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$
StringBuilder.from_buffer
is g_string_new_len
, which GLib has always supported. Is your Vala version too old?
StringBuilder.from_buffer
就是g_string_new_len
,这个GLib一直都支持,是不是你的Vala版本旧了导致语言绑定没有更新
valac --version Vala 0.56.0
valac --version Vala 0.56.0
你可以更新Vala或者更新/usr/share/vala-0.56/vapi/glib-2.0.vapi
meson-generated_version.c.o
FAILED: src/liblivephototools.so.p/meson-generated_version.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_version.c.o -MF src/liblivephototools.so.p/meson-generated_version.c.o.d -o src/liblivephototools.so.p/meson-generated_version.c.o -c src/liblivephototools.so.p/version.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/version.c:23:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[5/21] Compiling C object src/liblivephototools.so.p/meson-generated_errordomains.c.o
FAILED: src/liblivephototools.so.p/meson-generated_errordomains.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_errordomains.c.o -MF src/liblivephototools.so.p/meson-generated_errordomains.c.o.d -o src/liblivephototools.so.p/meson-generated_errordomains.c.o -c src/liblivephototools.so.p/errordomains.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/errordomains.c:23:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[6/21] Compiling C object src/liblivephototools.so.p/meson-generated_utils.c.o
FAILED: src/liblivephototools.so.p/meson-generated_utils.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_utils.c.o -MF src/liblivephototools.so.p/meson-generated_utils.c.o.d -o src/liblivephototools.so.p/meson-generated_utils.c.o -c src/liblivephototools.so.p/utils.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/utils.c:24:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[7/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o
FAILED: src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -c src/liblivephototools.so.p/livemakerffmpeg.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/livemakerffmpeg.c:23:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[8/21] Compiling C object src/liblivephototools.so.p/meson-generated_reporter.c.o
FAILED: src/liblivephototools.so.p/meson-generated_reporter.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_reporter.c.o -MF src/liblivephototools.so.p/meson-generated_reporter.c.o.d -o src/liblivephototools.so.p/meson-generated_reporter.c.o -c src/liblivephototools.so.p/reporter.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/reporter.c:23:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[9/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemaker.c.o
FAILED: src/liblivephototools.so.p/meson-generated_livemaker.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemaker.c.o -MF src/liblivephototools.so.p/meson-generated_livemaker.c.o.d -o src/liblivephototools.so.p/meson-generated_livemaker.c.o -c src/liblivephototools.so.p/livemaker.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/livemaker.c:23:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[10/21] Compiling C object src/liblivephototools.so.p/meson-generated_main.c.o
FAILED: src/liblivephototools.so.p/meson-generated_main.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_main.c.o -MF src/liblivephototools.so.p/meson-generated_main.c.o.d -o src/liblivephototools.so.p/meson-generated_main.c.o -c src/liblivephototools.so.p/main.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/main.c:27:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[11/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o
FAILED: src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -c src/liblivephototools.so.p/livephotoffmpeg.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/livephotoffmpeg.c:23:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[12/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephoto.c.o
FAILED: src/liblivephototools.so.p/meson-generated_livephoto.c.o
cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephoto.c.o -MF src/liblivephototools.so.p/meson-generated_livephoto.c.o.d -o src/liblivephototools.so.p/meson-generated_livephoto.c.o -c src/liblivephototools.so.p/livephoto.c
In file included from src/livephototools.h:12,
from src/liblivephototools.so.p/livephoto.c:23:
../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’
36 | G_ALWAYS_INLINE
| ^
| ;
37 | static inline int get_console_width_inline () {
| ~~
../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’
61 | G_ALWAYS_INLINE
| ^
| ;
62 | static inline gboolean is_a_tty_inline (int fd) {
| ~~
[14/21] Compiling Vala source ../src/copyimgmeta.vala src/livephototools.vapi
ninja: build stopped: subcommand failed.
版本升级到Vala 0.56.17报这个错
meson-generated_version.c.o FAILED: src/liblivephototools.so.p/meson-generated_version.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_version.c.o -MF src/liblivephototools.so.p/meson-generated_version.c.o.d -o src/liblivephototools.so.p/meson-generated_version.c.o -c src/liblivephototools.so.p/version.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/version.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |
~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [5/21] Compiling C object src/liblivephototools.so.p/meson-generated_errordomains.c.o FAILED: src/liblivephototools.so.p/meson-generated_errordomains.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_errordomains.c.o -MF src/liblivephototools.so.p/meson-generated_errordomains.c.o.d -o src/liblivephototools.so.p/meson-generated_errordomains.c.o -c src/liblivephototools.so.p/errordomains.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/errordomains.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [6/21] Compiling C object src/liblivephototools.so.p/meson-generated_utils.c.o FAILED: src/liblivephototools.so.p/meson-generated_utils.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_utils.c.o -MF src/liblivephototools.so.p/meson-generated_utils.c.o.d -o src/liblivephototools.so.p/meson-generated_utils.c.o -c src/liblivephototools.so.p/utils.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/utils.c:24: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [7/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -c src/liblivephototools.so.p/livemakerffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemakerffmpeg.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [8/21] Compiling C object src/liblivephototools.so.p/meson-generated_reporter.c.o FAILED: src/liblivephototools.so.p/meson-generated_reporter.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_reporter.c.o -MF src/liblivephototools.so.p/meson-generated_reporter.c.o.d -o src/liblivephototools.so.p/meson-generated_reporter.c.o -c src/liblivephototools.so.p/reporter.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/reporter.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [9/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemaker.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemaker.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemaker.c.o -MF src/liblivephototools.so.p/meson-generated_livemaker.c.o.d -o src/liblivephototools.so.p/meson-generated_livemaker.c.o -c src/liblivephototools.so.p/livemaker.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemaker.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [10/21] Compiling C object src/liblivephototools.so.p/meson-generated_main.c.o FAILED: src/liblivephototools.so.p/meson-generated_main.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_main.c.o -MF src/liblivephototools.so.p/meson-generated_main.c.o.d -o src/liblivephototools.so.p/meson-generated_main.c.o -c src/liblivephototools.so.p/main.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/main.c:27: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [11/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -c src/liblivephototools.so.p/livephotoffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephotoffmpeg.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [12/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephoto.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephoto.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephoto.c.o -MF src/liblivephototools.so.p/meson-generated_livephoto.c.o.d -o src/liblivephototools.so.p/meson-generated_livephoto.c.o -c src/liblivephototools.so.p/livephoto.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephoto.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [14/21] Compiling Vala source ../src/copyimgmeta.vala src/livephototools.vapi ninja: build stopped: subcommand failed. 版本升级到Vala 0.56.17报这个错
这是因为G_ALWAYS_INLINE
是GLib 2.74才有,我再改一下吧()
/**
* G_ALWAYS_INLINE:
*
* Expands to the GNU C `always_inline` or MSVC `__forceinline` function
* attribute depending on the compiler. It is used for declaring functions
* as always inlined, ignoring the compiler optimization levels.
*
* The attribute may be placed before the declaration or definition,
* right before the `static` keyword.
*
* |[<!-- language="C" -->
* G_ALWAYS_INLINE
* static int
* do_inline_this (void)
* {
* ...
* }
* ]|
*
* See the
* [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-always_005finline-function-attribute)
* and the
* [MSVC documentation](https://docs.microsoft.com/en-us/visualstudio/misc/inline-inline-forceinline)
*
* Since: 2.74
*/
/* Note: We can’t annotate this with GLIB_AVAILABLE_MACRO_IN_2_74 because it’s
* used within the GLib headers in function declarations which are always
* evaluated when a header is included. This results in warnings in third party
* code which includes glib.h, even if the third party code doesn’t use the new
* macro itself. */
meson-generated_version.c.o FAILED: src/liblivephototools.so.p/meson-generated_version.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_version.c.o -MF src/liblivephototools.so.p/meson-generated_version.c.o.d -o src/liblivephototools.so.p/meson-generated_version.c.o -c src/liblivephototools.so.p/version.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/version.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |
~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [5/21] Compiling C object src/liblivephototools.so.p/meson-generated_errordomains.c.o FAILED: src/liblivephototools.so.p/meson-generated_errordomains.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_errordomains.c.o -MF src/liblivephototools.so.p/meson-generated_errordomains.c.o.d -o src/liblivephototools.so.p/meson-generated_errordomains.c.o -c src/liblivephototools.so.p/errordomains.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/errordomains.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [6/21] Compiling C object src/liblivephototools.so.p/meson-generated_utils.c.o FAILED: src/liblivephototools.so.p/meson-generated_utils.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_utils.c.o -MF src/liblivephototools.so.p/meson-generated_utils.c.o.d -o src/liblivephototools.so.p/meson-generated_utils.c.o -c src/liblivephototools.so.p/utils.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/utils.c:24: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [7/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -c src/liblivephototools.so.p/livemakerffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemakerffmpeg.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [8/21] Compiling C object src/liblivephototools.so.p/meson-generated_reporter.c.o FAILED: src/liblivephototools.so.p/meson-generated_reporter.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_reporter.c.o -MF src/liblivephototools.so.p/meson-generated_reporter.c.o.d -o src/liblivephototools.so.p/meson-generated_reporter.c.o -c src/liblivephototools.so.p/reporter.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/reporter.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [9/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemaker.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemaker.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemaker.c.o -MF src/liblivephototools.so.p/meson-generated_livemaker.c.o.d -o src/liblivephototools.so.p/meson-generated_livemaker.c.o -c src/liblivephototools.so.p/livemaker.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemaker.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [10/21] Compiling C object src/liblivephototools.so.p/meson-generated_main.c.o FAILED: src/liblivephototools.so.p/meson-generated_main.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_main.c.o -MF src/liblivephototools.so.p/meson-generated_main.c.o.d -o src/liblivephototools.so.p/meson-generated_main.c.o -c src/liblivephototools.so.p/main.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/main.c:27: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [11/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -c src/liblivephototools.so.p/livephotoffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephotoffmpeg.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [12/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephoto.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephoto.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephoto.c.o -MF src/liblivephototools.so.p/meson-generated_livephoto.c.o.d -o src/liblivephototools.so.p/meson-generated_livephoto.c.o -c src/liblivephototools.so.p/livephoto.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephoto.c:23: ../include/platformbindings.h:36:16: error: expected ‘;’ before ‘static’ 36 | G_ALWAYS_INLINE | ^ | ; 37 | static inline int get_console_width_inline () { |~~ ../include/platformbindings.h:61:16: error: expected ‘;’ before ‘static’ 61 | G_ALWAYS_INLINE | ^ | ; 62 | static inline gboolean is_a_tty_inline (int fd) { |~~ [14/21] Compiling Vala source ../src/copyimgmeta.vala src/livephototools.vapi ninja: build stopped: subcommand failed. 版本升级到Vala 0.56.17报这个错
修好了。
meson compile -C builddir ninja: Entering directory `/home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [4/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -c src/liblivephototools.so.p/livephotoffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephotoffmpeg.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [5/21] Compiling C object src/liblivephototools.so.p/meson-generated_errordomains.c.o FAILED: src/liblivephototools.so.p/meson-generated_errordomains.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_errordomains.c.o -MF src/liblivephototools.so.p/meson-generated_errordomains.c.o.d -o src/liblivephototools.so.p/meson-generated_errordomains.c.o -c src/liblivephototools.so.p/errordomains.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/errordomains.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [6/21] Compiling C object src/liblivephototools.so.p/meson-generated_version.c.o FAILED: src/liblivephototools.so.p/meson-generated_version.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_version.c.o -MF src/liblivephototools.so.p/meson-generated_version.c.o.d -o src/liblivephototools.so.p/meson-generated_version.c.o -c src/liblivephototools.so.p/version.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/version.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [7/21] Compiling C object src/liblivephototools.so.p/meson-generated_utils.c.o FAILED: src/liblivephototools.so.p/meson-generated_utils.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_utils.c.o -MF src/liblivephototools.so.p/meson-generated_utils.c.o.d -o src/liblivephototools.so.p/meson-generated_utils.c.o -c src/liblivephototools.so.p/utils.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/utils.c:24: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [8/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -c src/liblivephototools.so.p/livemakerffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemakerffmpeg.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [9/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemaker.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemaker.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemaker.c.o -MF src/liblivephototools.so.p/meson-generated_livemaker.c.o.d -o src/liblivephototools.so.p/meson-generated_livemaker.c.o -c src/liblivephototools.so.p/livemaker.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemaker.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [10/21] Compiling C object src/liblivephototools.so.p/meson-generated_main.c.o FAILED: src/liblivephototools.so.p/meson-generated_main.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_main.c.o -MF src/liblivephototools.so.p/meson-generated_main.c.o.d -o src/liblivephototools.so.p/meson-generated_main.c.o -c src/liblivephototools.so.p/main.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/main.c:27: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [12/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephoto.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephoto.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephoto.c.o -MF src/liblivephototools.so.p/meson-generated_livephoto.c.o.d -o src/liblivephototools.so.p/meson-generated_livephoto.c.o -c src/liblivephototools.so.p/livephoto.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephoto.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [13/21] Compiling C object src/liblivephototools.so.p/meson-generated_reporter.c.o FAILED: src/liblivephototools.so.p/meson-generated_reporter.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_reporter.c.o -MF src/liblivephototools.so.p/meson-generated_reporter.c.o.d -o src/liblivephototools.so.p/meson-generated_reporter.c.o -c src/liblivephototools.so.p/reporter.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/reporter.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [14/21] Compiling Vala source ../src/copyimgmeta.vala src/livephototools.vapi ninja: build stopped: subcommand failed. 大佬,还是报错
meson compile -C builddir ninja: Entering directory `/home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [4/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livephotoffmpeg.c.o -c src/liblivephototools.so.p/livephotoffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephotoffmpeg.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [5/21] Compiling C object src/liblivephototools.so.p/meson-generated_errordomains.c.o FAILED: src/liblivephototools.so.p/meson-generated_errordomains.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_errordomains.c.o -MF src/liblivephototools.so.p/meson-generated_errordomains.c.o.d -o src/liblivephototools.so.p/meson-generated_errordomains.c.o -c src/liblivephototools.so.p/errordomains.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/errordomains.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [6/21] Compiling C object src/liblivephototools.so.p/meson-generated_version.c.o FAILED: src/liblivephototools.so.p/meson-generated_version.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_version.c.o -MF src/liblivephototools.so.p/meson-generated_version.c.o.d -o src/liblivephototools.so.p/meson-generated_version.c.o -c src/liblivephototools.so.p/version.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/version.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [7/21] Compiling C object src/liblivephototools.so.p/meson-generated_utils.c.o FAILED: src/liblivephototools.so.p/meson-generated_utils.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_utils.c.o -MF src/liblivephototools.so.p/meson-generated_utils.c.o.d -o src/liblivephototools.so.p/meson-generated_utils.c.o -c src/liblivephototools.so.p/utils.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/utils.c:24: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [8/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -MF src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o.d -o src/liblivephototools.so.p/meson-generated_livemakerffmpeg.c.o -c src/liblivephototools.so.p/livemakerffmpeg.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemakerffmpeg.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [9/21] Compiling C object src/liblivephototools.so.p/meson-generated_livemaker.c.o FAILED: src/liblivephototools.so.p/meson-generated_livemaker.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livemaker.c.o -MF src/liblivephototools.so.p/meson-generated_livemaker.c.o.d -o src/liblivephototools.so.p/meson-generated_livemaker.c.o -c src/liblivephototools.so.p/livemaker.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livemaker.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [10/21] Compiling C object src/liblivephototools.so.p/meson-generated_main.c.o FAILED: src/liblivephototools.so.p/meson-generated_main.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_main.c.o -MF src/liblivephototools.so.p/meson-generated_main.c.o.d -o src/liblivephototools.so.p/meson-generated_main.c.o -c src/liblivephototools.so.p/main.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/main.c:27: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [12/21] Compiling C object src/liblivephototools.so.p/meson-generated_livephoto.c.o FAILED: src/liblivephototools.so.p/meson-generated_livephoto.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_livephoto.c.o -MF src/liblivephototools.so.p/meson-generated_livephoto.c.o.d -o src/liblivephototools.so.p/meson-generated_livephoto.c.o -c src/liblivephototools.so.p/livephoto.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/livephoto.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [13/21] Compiling C object src/liblivephototools.so.p/meson-generated_reporter.c.o FAILED: src/liblivephototools.so.p/meson-generated_reporter.c.o cc -Isrc/liblivephototools.so.p -Isrc -I../src -I../include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -w -O3 -fPIC -pthread -MD -MQ src/liblivephototools.so.p/meson-generated_reporter.c.o -MF src/liblivephototools.so.p/meson-generated_reporter.c.o.d -o src/liblivephototools.so.p/meson-generated_reporter.c.o -c src/liblivephototools.so.p/reporter.c In file included from src/livephototools.h:12, from src/liblivephototools.so.p/reporter.c:23: ../include/platformbindings.h:26:30: error: missing binary operator before token "(" 26 | # if G_CXX_STD_CHECK_VERSION (11) | ^ [14/21] Compiling Vala source ../src/copyimgmeta.vala src/livephototools.vapi ninja: build stopped: subcommand failed. 大佬,还是报错
好吧,旧版GLib干脆就不设置这个了,现在呢(git pull --rebase
)?
meson compile -C builddir ninja: Entering directory `/home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [2/2] Generating src/LivePhotoTools-0.3.typelib with a custom command FAILED: src/LivePhotoTools-0.3.typelib /usr/bin/g-ir-compiler --shared-library liblivephototools.so --output src/LivePhotoTools-0.3.typelib /home/gonghaojing/livePhoto/live-photo-conv-main/builddir/src/LivePhotoTools-0.3.gir Could not find GIR file 'Gio-2.0.gir'; check XDG_DATA_DIRS or use --includedir error parsing file /home/gonghaojing/livePhoto/live-photo-conv-main/builddir/src/LivePhotoTools-0.3.gir: Failed to parse included gir Gio-2.0 ninja: build stopped: subcommand failed. 现在只剩环境问题了
meson compile -C builddir ninja: Entering directory `/home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [2/2] Generating src/LivePhotoTools-0.3.typelib with a custom command FAILED: src/LivePhotoTools-0.3.typelib /usr/bin/g-ir-compiler --shared-library liblivephototools.so --output src/LivePhotoTools-0.3.typelib /home/gonghaojing/livePhoto/live-photo-conv-main/builddir/src/LivePhotoTools-0.3.gir Could not find GIR file 'Gio-2.0.gir'; check XDG_DATA_DIRS or use --includedir error parsing file /home/gonghaojing/livePhoto/live-photo-conv-main/builddir/src/LivePhotoTools-0.3.gir: Failed to parse included gir Gio-2.0 ninja: build stopped: subcommand failed. 现在只剩环境问题了
这是因为Ubuntu的dev包和lib包是分开的,你要么就要apt额外安装相关的xxx-dev包,要么就在meson配置的时候就-D gir=disabled
:
meson setup builddir --buildtype=release -D gir=disabled
-D gir=disabled
就不会生成gir,这会导致你不能基于我的库直接用python、rust等其他语言开发,但是可以用c和vala开发,如果不开发只是使用CLI功能则不受影响,看你自己的选择。
meson compile -C builddir --verbose
ninja: Entering directory /home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [1/20] /usr/bin/meson --internal vcstagger ../src/version.vala.in src/version.vala 0.3.6 /home/gonghaojing/livePhoto/live-photo-conv-main/src @VCS_TAG@ '(.*)' /home/gonghaojing/livePhoto/live-photo-conv-main/src/0.3.6 gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$ sudo meson compile -C builddir --verbose ninja: Entering directory
/home/gonghaojing/livePhoto/live-photo-conv-main/builddir'
[1/20] /usr/bin/meson --internal vcstagger ../src/version.vala.in src/version.vala 0.3.6 /home/gonghaojing/livePhoto/live-photo-conv-main/src @VCS_TAG@ '(.*)' /home/gonghaojing/livePhoto/live-photo-conv-main/src/0.3.6
gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$ ls
builddir COPYING include meson.build meson_options.txt README.md README-zh.md src
gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$ cd builddir/
gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main/builddir$ ls
build.ninja compile_commands.json meson-info meson-logs meson-private meson-uninstalled src
gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main/builddir$ live-photo-conv
live-photo-conv:未找到命令
gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main/builddir$
装了dev包,但好像没成功啊
meson compile -C builddir --verbose ninja: Entering directory
/home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [1/20] /usr/bin/meson --internal vcstagger ../src/version.vala.in src/version.vala 0.3.6 /home/gonghaojing/livePhoto/live-photo-conv-main/src @VCS_TAG@ '(.*)' /home/gonghaojing/livePhoto/live-photo-conv-main/src/0.3.6 gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$ sudo meson compile -C builddir --verbose ninja: Entering directory
/home/gonghaojing/livePhoto/live-photo-conv-main/builddir' [1/20] /usr/bin/meson --internal vcstagger ../src/version.vala.in src/version.vala 0.3.6 /home/gonghaojing/livePhoto/live-photo-conv-main/src @VCS_TAG@ '(.*)' /home/gonghaojing/livePhoto/live-photo-conv-main/src/0.3.6 gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$ ls builddir COPYING include meson.build meson_options.txt README.md README-zh.md src gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main$ cd builddir/ gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main/builddir$ ls build.ninja compile_commands.json meson-info meson-logs meson-private meson-uninstalled src gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main/builddir$ live-photo-conv live-photo-conv:未找到命令 gonghaojing@jing-ubuntu:~/livePhoto/live-photo-conv-main/builddir$ 装了dev包,但好像没成功啊
呃呃,你为什么compile用sudo,你想要的效果是命令直接运行命令live-photo-conv
吗?那需要meson install,或者用你们ubuntu的方式打包成deb。
可以了,感谢大佬。怎么判断某个机型是不是谷歌通用动态照片格式啊?只能生成这个动态照片,放到对应手机上吗,找不到能展示的手机啊
gonghaojing@jing-ubuntu:~/livePhoto$ ls bg.jpg huawei_15.avif huawei_21.avif huawei_28.avif huawei_34.avif huawei_40.avif huawei_47.avif huawei_53.avif huawei_5.avif huawei_66.avif huawei_72.avif huawei_8.avif VID_huawei.mp4 huawei_0.jpg huawei_16.avif huawei_22.avif huawei_29.avif huawei_35.avif huawei_41.avif huawei_48.avif huawei_54.avif huawei_60.avif huawei_67.avif huawei_73.avif huawei_9.avif huawei_10.avif huawei_17.avif huawei_23.avif huawei_2.avif huawei_36.avif huawei_42.avif huawei_49.avif huawei_55.avif huawei_61.avif huawei_68.avif huawei_74.avif huawei.jpg huawei_11.avif huawei_18.avif huawei_24.avif huawei_30.avif huawei_37.avif huawei_43.avif huawei_4.avif huawei_56.avif huawei_62.avif huawei_69.avif huawei_75.avif in.mp4 huawei_12.avif huawei_19.avif huawei_25.avif huawei_31.avif huawei_38.avif huawei_44.avif huawei_50.avif huawei_57.avif huawei_63.avif huawei_6.avif huawei_76.avif live-photo-conv-main huawei_13.avif huawei_1.avif huawei_26.avif huawei_32.avif huawei_39.avif huawei_45.avif huawei_51.avif huawei_58.avif huawei_64.avif huawei_70.avif huawei_77.avif live-photo-conv-main.zip huawei_14.avif huawei_20.avif huawei_27.avif huawei_33.avif huawei_3.avif huawei_46.avif huawei_52.avif huawei_59.avif huawei_65.avif huawei_71.avif huawei_7.avif output.jpg gonghaojing@jing-ubuntu:~/livePhoto$ live-photo-conv --extract --live-photo huawei.jpg --dest-dir ./ --frame-to-photos --img-format avif 大佬,生成了一堆avif文件
我华为Mate50Pro的动态照片,能通过脚本解析为图片和视频。但脚本合成的动态照片,在相册里不是动态图片,感觉华为这格式不太对
--img-format avif
你这个不本来就是指定的生成avif吗,你要jpeg的话就--img-format jpeg
,不加默认也是生成jpeg
我华为Mate50Pro的动态照片,能通过脚本解析为图片和视频。但脚本合成的动态照片,在相册里不是动态图片,感觉华为这格式不太对
华为很喜欢宣传所谓的“自研”,可能就是没有用Google Android这套通用的格式
可以了,感谢大佬。怎么判断某个机型是不是谷歌通用动态照片格式啊?只能生成这个动态照片,放到对应手机上吗,找不到能展示的手机啊
这得询问手机厂商,第三方独立开发者是不可能知道每一个厂商的设定的更不可能决定厂商的设定的
valac --version Vala 0.56.0
pkg-config --modversion glib-2.0 2.72.4
Ubuntu22报错:live-photo-conv-main/builddir' [2/21] Compiling Vala source ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala FAILED: src/liblivephototools.so.p/errordomains.c src/liblivephototools.so.p/livemaker.c src/liblivephototools.so.p/livemakerffmpeg.c src/liblivephototools.so.p/livephoto.c src/liblivephototools.so.p/livephotoffmpeg.c src/liblivephototools.so.p/main.c src/liblivephototools.so.p/reporter.c src/liblivephototools.so.p/utils.c src/liblivephototools.so.p/version.c src/livephototools.h src/livephototools.vapi src/LivePhotoTools-0.3.gir valac -C --pkg gexiv2 --pkg gmodule-2.0 --pkg gio-2.0 --pkg gobject-2.0 --pkg glib-2.0 --color=always --directory src/liblivephototools.so.p --basedir ../src --library livephototools --header src/livephototools.h --vapi ../livephototools.vapi --gir ../LivePhotoTools-0.3.gir ../src/errordomains.vala ../src/livemaker.vala ../src/livemakerffmpeg.vala ../src/livephoto.vala ../src/livephotoffmpeg.vala ../src/main.vala ../src/reporter.vala ../src/utils.vala src/version.vala ../src/utils.vala:43.31-43.55: error: The name
from_buffer' does not exist in the context of
GLib.StringBuilder' (glib-2.0) 43 | builder = new StringBuilder.from_buffer ((char[]) buffer); | ^~~~~~~~~../src/utils.vala:49.40-49.61: error: The name
free_and_steal' does not exist in the context of
GLib.StringBuilder?' (glib-2.0) 49 | return (builder != null) ? (!) builder.free_and_steal () : ""; | ^~~~~~Compilation failed: 2 error(s), 0 warning(s) ninja: build stopped: subcommand failed.
大佬,这个怎么解决啊?