Skip to content

implicit declaration of function ‘r_return_val_if_fail’ #702

@Luis8492

Description

@Luis8492

Cannot install r2frida via r2pm.

┌──(kali㉿kali)-[~]
└─$ r2 -v
radare2 5.9.9 33663 @ linux-x86-32
birth: git.5.9.8-728-g9cb56f78e1 2025-06-15__15:08:48
commit: 9cb56f78e1d32aa6023e777d88c67ed3227cf760
options: gpl -O? cs:5 cl:2 make

┌──(kali㉿kali)-[~]
└─$ frida --version
17.1.5

┌──(kali㉿kali)-[~]
└─$ r2pm -i r2frida
INFO: Using r2-5.9.9 and r2pm-5.9.9
Already up to date.
INFO: Starting install for r2frida
INFO: SCRIPT=<<EOF
INFO: unset CFLAGS
unset LDFLAGS
./configure || R2PM_FAIL "Install fail"
if [ -n "${FRIDA_VERSION}" ]; then
${MAKE} frida_version=${FRIDA_VERSION} || R2PM_FAIL "Build failed"
else
${MAKE} || R2PM_FAIL "Build failed"
fi
if [ "$GLOBAL" = 1 ]; then
${R2PM_SUDO} ${MAKE} install || R2PM_FAIL "Install fail"
else
${MAKE} user-install R2_PLUGDIR="${R2PM_PLUGDIR}" || R2PM_FAIL "Install fail"
fi
INFO: EOF
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for working directories... current
using prefix '/usr/local'
checking for pkg-config... /usr/bin/pkg-config
checking for c compiler... gcc
checking exec r2 -v... ok
Using PKGCONFIG: /usr/bin/pkg-config
checking pkg-config flags for r_core... yes
checking for curl... /usr/bin/curl
checking for wget... /usr/bin/wget
checking for git... /usr/bin/git
checking for xz... /usr/bin/xz
creating ./config.mk
creating ./config.h
cleaning temporally files... done

Final report:

  • R2_VERSION = radare2 5.9.9 33663 @ linux-x86-32
    birth: git.5.9.8-728-g9cb56f78e1 2025-06-15__15:08:48
    commit: 9cb56f78e1d32aa6023e777d88c67ed3227cf760
    options: gpl -O? cs:5 cl:2 make
    [ "readlink ext/frida" = frida-linux-17.1.4 ] ||
    (cd ext && rm -f frida ; ln -fs frida-linux-17.1.4 frida)
    rm -f src/_agent*
    make io_frida.so
    make[1]: Entering directory '/home/kali/.local/share/radare2/r2pm/git/r2frida'
    R2PM_OFFLINE=1 r2pm -r src/r2frida-compile -H src/_agent.h -o src/_agent.js -Sc src/agent/index.ts ||
    src/r2frida-compile -H src/_agent.h -o src/_agent.js -Sc src/agent/index.ts
    test -s src/_agent.js || rm -f src/_agent.js
    test -s src/_agent.js || ( rm -f src/_agent.js && make src/_agent.js )
    test -s src/_agent.js || exit 1
    [ -f src/_agent.h ] || (echo Running r2; r2 -NNnfqcpc src/_agent.js | grep 0x > src/_agent.h)
    cc -c -DFRIDA_VERSION_STRING="17.1.4" -DFRIDA_VERSION_MAJOR=17 -fPIC -Wall -Werror -g -I/usr/local/include/libr -DWANT_SESSION_DEBUGGER=1 -Iext/frida src/io_frida.c -o src/io_frida.o
    src/io_frida.c: In function ‘__read’:
    src/io_frida.c:384:9: error: implicit declaration of function ‘r_return_val_if_fail’; did you mean ‘g_return_val_if_fail’? [-Wimplicit-function-declaration]
    384 | r_return_val_if_fail (io && fd && fd->data && buf && count > 0, -1);
    | ^~~~~~~~~~~~~~~~~~~~
    | g_return_val_if_fail
    src/io_frida.c: In function ‘load_scripts’:
    src/io_frida.c:754:9: error: implicit declaration of function ‘r_return_if_fail’; did you mean ‘g_return_if_fail’? [-Wimplicit-function-declaration]
    754 | r_return_if_fail (core && fd && path);
    | ^~~~~~~~~~~~~~~~
    | g_return_if_fail
    make[1]: *** [Makefile:239: src/io_frida.o] Error 1
    make[1]: Leaving directory '/home/kali/.local/share/radare2/r2pm/git/r2frida'
    make: *** [Makefile:178: all] Error 2
    Build failed
    mkdir -p /"/home/kali/.local/share/radare2/plugins"
    mkdir -p /"/home/kali/.local/share/radare2/prefix/bin"
    rm -f "//home/kali/.local/share/radare2/plugins/io_frida.so"
    cp -f io_frida.so* /"/home/kali/.local/share/radare2/plugins"
    cp: cannot stat 'io_frida.so*': No such file or directory
    make: *** [Makefile:344: user-install] Error 1
    Install fail

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions