frida / frida-gum

Cross-platform instrumentation and introspection library written in C
https://frida.re
Other
753 stars 245 forks source link

tests/gumjs/libgum-tests-gumjs.a.p/script.c.o: undefined reference to gum_quick_script_backend_get_type #723

Open milahu opened 1 year ago

milahu commented 1 year ago

im getting this error when building acaec42263a89bbc8a8ac045e1d5c91003c9dd9a with https://github.com/frida/glib/commit/6bb81f198823f47c571da5700158eb841ec26e16 instead of glib

but with glib, frida-core build fails with undefined reference to g_thread_garbage_collect etc

quickfix: meson -Dtests=disabled

source

https://github.com/frida/frida-gum/blob/bd6f95d391b198d7d87264ba56f2972efc7298ec/bindings/gumjs/gumquickscriptbackend.h#L14

i cannot find any definition for gum_quick_script_backend_get_type so i assume codegen

gum/gumenumtypes.h.template:#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())

configure flags

meson -Ddefault_library=static -Dgumjs=enabled -Dquickjs=disabled -Dquickjs=disabled

build log

[187/187] Linking target tests/gum-tests
FAILED: tests/gum-tests 
g++  -o tests/gum-tests tests/gum-tests.p/gumtest.c.o tests/gum-tests.p/testutil.c.o tests/gum-tests.p/stubs_dummyclasses.c.o tests/gum-tests.p/stubs_fakebacktracer.c.o tests/gum-tests.p/stubs_fakeeventsink.c.o tests/gum-tests.p/stalkerdummychannel.c.o tests/gum-tests.p/lowlevelhelpers.c.o tests/gum-tests.p/dummy.cpp.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic '-Wl,-rpath,$ORIGIN/../bindings/gumpp:/nix/store/fynz7l60dnqphimnm6l090pckv5scx7b-libffi-3.4.4/lib/../lib64' -Wl,-rpath-link,/build/source/build/bindings/gumpp -Wl,-rpath-link,/nix/store/fynz7l60dnqphimnm6l090pckv5scx7b-libffi-3.4.4/lib/../lib64 -Wl,--start-group tests/core/libgum-tests-core.a tests/core/libgum-tests-core-exceptions.a gum/libfrida-gum-1.0.a tests/heap/libgum-tests-heap.a tests/prof/libgum-tests-prof.a tests/gumpp/libgum-tests-gumpp.a bindings/gumpp/libfrida-gumpp-1.0.so tests/gumjs/libgum-tests-gumjs.a bindings/gumjs/libfrida-gumjs-1.0.a bindings/gumjs/libfrida-gumjs-inspector-1.0.a libs/gum/heap/libfrida-gum-heap-1.0.a libs/gum/prof/libfrida-gum-prof-1.0.a -Wl,--version-script,/build/source/tests/gum-tests.version -ldl /nix/store/yk5gmkdh36638ps7gnjmvblnkj6vb9wi-frida-glib-2.75.0-unstable-2022-12-10/lib/libglib-2.0.so /nix/store/aw5yynzqi8cg4h733qjch53zcm4nkshr-capstone-5.0-rc2/lib/libcapstone.so /nix/store/yk5gmkdh36638ps7gnjmvblnkj6vb9wi-frida-glib-2.75.0-unstable-2022-12-10/lib/libgobject-2.0.so /nix/store/h7dvv6qfk5vmbcc31pq9gsqn14wrqwwf-frida-glib-networking-unstable-2022-12-12/lib/gio/modules/libgioopenssl.a /nix/store/yk5gmkdh36638ps7gnjmvblnkj6vb9wi-frida-glib-2.75.0-unstable-2022-12-10/lib/libgio-2.0.so -Wl,--export-dynamic /nix/store/yk5gmkdh36638ps7gnjmvblnkj6vb9wi-frida-glib-2.75.0-unstable-2022-12-10/lib/libgmodule-2.0.so -pthread /nix/store/773pradjpvxgxgs0mcklisx8ly6k1r4f-openssl-3.0.7/lib/libssl.so /nix/store/773pradjpvxgxgs0mcklisx8ly6k1r4f-openssl-3.0.7/lib/libcrypto.so /nix/store/bw3mxk76xp3i5m53g9i67fagnwbhyc1k-xz-5.4.0/lib/liblzma.so /nix/store/xwwsq9npsaqxkafsz7158ndm2jyqc3xd-frida-v8-unstable-2022-11-02/lib/libv8-10.0.so /nix/store/8ziffncw8n4zx72plyczfbrzg4017vsn-json-glib-1.6.6/lib/libjson-glib-1.0.so /nix/store/fynz7l60dnqphimnm6l090pckv5scx7b-libffi-3.4.4/lib/../lib64/libffi.so /nix/store/rz0irj616wmqiqwwmf0zvf86ck9qn144-frida-tinycc-unstable-2022-04-01/lib/libtcc.so /nix/store/8izb9ahnpnb93wqrv24ip897v82qw80b-sqlite-3.40.1/lib/libsqlite3.so /nix/store/wark6xd03wb4md921lfqar3hicmxg1gg-libunwind-1.6.2/lib/libunwind.so /nix/store/ss604a0wwmsbys09pg09hggpwcgh8ac9-libelf-0.8.13/lib/libelf.so /nix/store/vxz4ddlgs3v81q2jdw6kphcq83z2af7z-libdwarf-0.6.0-unstable-2023-01-29/lib/libdwarf.so /nix/store/bj45yrcx47pwpkl4jcxsv6j7xn5ckq2b-libsoup-3.2.2/lib/libsoup-3.0.so -Wl,--end-group
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: warning: backend-x86_gumstalker-x86-glue.S.o: missing .note.GNU-stack section implies executable stack
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: tests/gumjs/libgum-tests-gumjs.a.p/script.c.o: in function `test_script_script_memory_usage':
script.c:(.text+0x495f): undefined reference to `gum_quick_script_backend_get_type'
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: tests/gumjs/libgum-tests-gumjs.a.p/script.c.o: in function `test_script_debugger_can_be_enabled':
script.c:(.text+0x4f71): undefined reference to `gum_quick_script_backend_get_type'
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: tests/gumjs/libgum-tests-gumjs.a.p/script.c.o: in function `test_script_dynamic_script_loading_should_throw_on_syntax_error':
script.c:(.text+0xabbd): undefined reference to `gum_quick_script_backend_get_type'
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: tests/gumjs/libgum-tests-gumjs.a.p/script.c.o: in function `test_script_dynamic_script_loading_should_throw_on_runtime_error':
script.c:(.text+0xac3d): undefined reference to `gum_quick_script_backend_get_type'
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: tests/gumjs/libgum-tests-gumjs.a.p/script.c.o: in function `test_script_types_handle_invalid_construction':
script.c:(.text+0xad5d): undefined reference to `gum_quick_script_backend_get_type'
/nix/store/178vvank67pg2ckr5ic5gmdkm3ri72f3-binutils-2.39/bin/ld: tests/gumjs/libgum-tests-gumjs.a.p/script.c.o:script.c:(.text+0xadc4): more undefined references to `gum_quick_script_backend_get_type' follow
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

26yhfmxdz43gidn0gfbc2989k0yrhqyc-frida-gum-16.0.8.drv.log