-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r2dec seems broken as of 9646f560d169ab684ff67f2fbf6f8b3c61588bb4 #296
Comments
commit 6ba7ae5 works: ❯ git checkout 6ba7ae5
Note: switching to '6ba7ae5'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 6ba7ae5 Add missing "b.le" on arm
❯ make -C p USE_JSC=1 V=
make: Entering directory '/root/.local/share/radare2/r2pm/git/r2dec/p'
awk '{if(/@JSC_SOURCES@/)exit;print}' < r2dec_jsc.c.in > r2dec_jsc.c
python make_jsc.py .. >> r2dec_jsc.c
awk 'BEGIN{A=0}{if(A==1){print}if(/@JSC_SOURCES@/)A=1}' < r2dec_jsc.c.in >> r2dec_jsc.c
make build
make[1]: Entering directory '/root/.local/share/radare2/r2pm/git/r2dec/p'
echo "[CC] duktape/duktape.o"
[CC] duktape/duktape.o
cc -DR2DEC_HOME="/root/.local/share/radare2/r2pm/git/r2dec/" -g -O3 -std=c99 -Wall -fPIC -I./duktape -DUSE_JSC=1 -g -O3 -std=c99 -Wall -fPIC -I./duktape -DUSE_JSC=1 -I/usr/local/include/libr -c duktape/duktape.c -o duktape/duktape.o
echo "[CC] duktape/duk_console.o"
[CC] duktape/duk_console.o
cc -DR2DEC_HOME="/root/.local/share/radare2/r2pm/git/r2dec/" -g -O3 -std=c99 -Wall -fPIC -I./duktape -DUSE_JSC=1 -g -O3 -std=c99 -Wall -fPIC -I./duktape -DUSE_JSC=1 -I/usr/local/include/libr -c duktape/duk_console.c -o duktape/duk_console.o
echo "[CC] core_pdd.o"
[CC] core_pdd.o
cc -DR2DEC_HOME="/root/.local/share/radare2/r2pm/git/r2dec/" -g -O3 -std=c99 -Wall -fPIC -I./duktape -DUSE_JSC=1 -g -O3 -std=c99 -Wall -fPIC -I./duktape -DUSE_JSC=1 -I/usr/local/include/libr -c core_pdd.c -o core_pdd.o
echo "[CC] core_pdd.so"
[CC] core_pdd.so
cc -lm -L/usr/local/lib -lr_core -lr_config -ldl -lr_debug -ldl -lr_bin -ldl -lr_lang -ldl -lr_anal -ldl -lr_bp -ldl -lr_egg -ldl -lr_asm -ldl -lr_flag -ldl -lr_search -ldl -lr_syscall -ldl -lr_fs -ldl -lr_io -ldl -lr_socket -ldl -lr_cons -ldl -lr_magic -ldl -lr_crypto -ldl -lr_arch -ldl -lr_esil -ldl -lr_reg -ldl -lr_util -ldl -shared duktape/duktape.o duktape/duk_console.o core_pdd.o -o core_pdd.so
make[1]: Leaving directory '/root/.local/share/radare2/r2pm/git/r2dec/p'
make: Leaving directory '/root/.local/share/radare2/r2pm/git/r2dec/p' Radare2 version 5.8.9 (although, looking at the latest r2dec commits, I don't think it matters) ❯ radare2 -v
radare2 5.8.9 31530 @ linux-x86-64
birth: git.5.8.8-888-g4ceb8ebba3 2023-11-23__19:36:13
commit: 4ceb8ebba36c9aefa6803f70e88248469b486f87
options: gpl -O? cs:5 cl:2 make |
yes ofc. @trufae you should use tags not master as is, unless you update it to use meson and the new folder structure. |
I updated the package and it should work. Did you updated the database? |
@dguerri please confirm this is fixed and close the issue :) |
r2pm -Uci r2dec -U updates the database |
It seems to be failing silently as ❯ r2pm -Uci r2dec
INFO: Nothing to upgrade
INFO: Cleaning r2dec
INFO: Using r2-5.8.9 and r2pm-5.8.9
INFO: Cleaning r2dec
INFO: git clone --depth=10 --recursive https://github.com/wargio/r2dec-js /root/.local/share/radare2/r2pm/git//r2dec
Cloning into '/root/.local/share/radare2/r2pm/git//r2dec'...
remote: Enumerating objects: 258, done.
remote: Counting objects: 100% (258/258), done.
remote: Compressing objects: 100% (197/197), done.
remote: Total 258 (delta 87), reused 170 (delta 52), pack-reused 0
Receiving objects: 100% (258/258), 1.50 MiB | 7.04 MiB/s, done.
Resolving deltas: 100% (87/87), done.
INFO: Starting install for r2dec
INFO: R2PM_NEEDS: Found gcc in PATH
INFO: R2PM_NEEDS: Found make in PATH
INFO: R2PM_NEEDS: Found ninja in PATH
INFO: SCRIPT=<<EOF
INFO: meson b --reconfigure || exit 1
( cd b && ninja ) || exit 1
if [ "${GLOBAL}" = 1 ]; then
${R2PM_SUDO} ninja uninstall
${R2PM_SUDO} ninja install V= USE_JSC=1 || exit 1
else
mkdir -p ${R2PM_PLUGDIR}
cp -f b/libcore_pdd.${R2_LIBEXT} ${R2PM_PLUGDIR}
echo "${R2PM_PLUGDIR}/libcore_pdd.${R2_LIBEXT}"
fi
INFO: EOF
Directory does not contain a valid build tree:
/root/.local/share/radare2/r2pm/git/r2dec/b
❯ echo $?
0 |
This worked: cd /root/.local/share/radare2/r2pm/git/r2dec
meson . b
ninja install |
I think it's somehow trying to use the old build "system" with meson and ninja instead of make |
works fine here
|
i added an |
Weird! Could it be the meson version? I will look into it as soon I am back home. |
I am still seeing the above issue on a vanilla Ubuntu 22.04.3. Meson version 0.61.2 ❯ r2pm -Uic r2dec
INFO: Nothing to upgrade
INFO: Cleaning r2dec
INFO: Using r2-5.8.9 and r2pm-5.8.9
INFO: Cleaning r2dec
INFO: git clone --depth=10 --recursive https://github.com/wargio/r2dec-js /root/.local/share/radare2/r2pm/git//r2dec
Cloning into '/root/.local/share/radare2/r2pm/git//r2dec'...
remote: Enumerating objects: 258, done.
remote: Counting objects: 100% (258/258), done.
remote: Compressing objects: 100% (197/197), done.
remote: Total 258 (delta 87), reused 170 (delta 52), pack-reused 0
Receiving objects: 100% (258/258), 1.50 MiB | 6.85 MiB/s, done.
Resolving deltas: 100% (87/87), done.
INFO: Starting install for r2dec
INFO: R2PM_NEEDS: Found gcc in PATH
INFO: R2PM_NEEDS: Found make in PATH
INFO: R2PM_NEEDS: Found ninja in PATH
INFO: R2PM_NEEDS: Found meson in PATH
INFO: SCRIPT=<<EOF
INFO: rm -rf b
meson b --reconfigure || exit 1
ninja -C b || exit 1
if [ "${GLOBAL}" = 1 ]; then
${R2PM_SUDO} ninja uninstall
${R2PM_SUDO} ninja install || exit 1
else
mkdir -p ${R2PM_PLUGDIR}
cp -f b/libcore_pdd.${R2_LIBEXT} ${R2PM_PLUGDIR}
echo "${R2PM_PLUGDIR}/libcore_pdd.${R2_LIBEXT}"
fi
INFO: EOF
Directory does not contain a valid build tree:
/root/.local/share/radare2/r2pm/git/r2dec/b ❯ meson -v
0.61.2
❯ cat /etc/issue.net
Ubuntu 22.04.3 LTS
❯ pwd
/root/.local/share/radare2/r2pm/git/r2dec
❯ rm -rf b
❯ meson . b
The Meson build system
Version: 0.61.2
Source dir: /root/.local/share/radare2/r2pm/git/r2dec
Build dir: /root/.local/share/radare2/r2pm/git/r2dec/b
Build type: native build
Project name: r2dec
Project version: undefined
C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
C linker for the host machine: cc ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
Executing subproject libquickjs
libquickjs| Project name: quickjs
libquickjs| Project version: 2021-03-27-frida
libquickjs| C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0")
libquickjs| C linker for the host machine: cc ld.bfd 2.38
libquickjs| Run-time dependency threads found: YES
libquickjs| Library dl found: YES
libquickjs| Library m found: YES
libquickjs| Has header "unistd.h" : YES
libquickjs| Checking for function "malloc_usable_size" : YES
libquickjs| Configuring config.h using configuration
libquickjs| Build targets in project: 2
libquickjs| Subproject libquickjs finished.
Program radare2 found: YES (/usr/local/bin/radare2)
Library r_core found: YES
Library r_util found: YES
Library r_cons found: YES
Library r_config found: YES
Library r_io found: YES
Message: radare2 include dir: /usr/local/include/libr
Message: radare2 library dir: /usr/local/lib
Message: radare2 plugin dir: /usr/local/lib/radare2/5.8.9
Build targets in project: 6
r2dec undefined
Subprojects
libquickjs: YES
Found ninja-1.10.1 at /usr/bin/ninja
❯ ninja -C b
ninja: Entering directory `b'
[18/18] Linking target libcore_pdd.so |
I see you are using MacOS, and the version of meson shipped with homebrew is ❯ brew info meson
==> meson: stable 1.3.0 (bottled), HEAD Maybe a safe option could be to wipe meson . b Instead of meson b --reconfigure |
try again, i removed the --reconfigure flag |
with r2pm:
Manually:
The text was updated successfully, but these errors were encountered: