Closed robertoll closed 2 years ago
cd radare2; sys/install.sh
do this line work? The line you used should work too, but its just to confirm a theory. Also do mk/gcc.mk exists? Looks like your copy of the source is missing some files?
Tried going into the directory and running sys/install.sh, but same issue.
The mk/gcc.mk exists, I git cloned from https://github.com/radareorg/radare2 several times after removing the directory, same issue.
Found out there was something after the strangely encoded characters with VSCodium, this is line 12 after deleting strange characters:
STATIC_ANAL_PLUGINS= p/6502.mk p/6502_cs.mk p/8051.mk p/alpha.mk p/amd29k.mk p/arc.mk p/arm_cs.mk p/arm_gnu.mk p/arm_v35.mk p/avr.mk p/bf.mk p/bpf.mk p/bpf_cs.mk p/chip8.mk p/cr16.mk p/cris.mk p/dalvik.mk p/ebc.mk p/evm_cs.mk p/gb.mk p/h8300.mk p/i4004.mk p/i8080.mk p/java.mk p/jdh8.mk p/kvx.mk p/lh5801.mk p/lm32.mk p/loongarch_gnu.mk p/m680x_cs.mk p/m68k_cs.mk p/malbolge.mk p/mcore.mk p/mcs96.mk p/mips_cs.mk p/mips_gnu.mk p/msp430.mk p/nios2.mk p/null.mk p/or1k.mk p/pdp11_gnu.mk p/pic.mk p/pickle.mk p/ppc_cs.mk p/ppc_gnu.mk p/propeller.mk p/pyc.mk p/riscv.mk p/riscv_cs.mk p/rsp.mk p/s390_cs.mk p/s390_gnu.mk p/sh.mk p/snes.mk p/sparc_cs.mk p/sparc_gnu.mk p/tms320.mk p/tricore.mk p/v810.mk p/v850.mk p/vax.mk p/wasm.mk p/ws.mk p/x86_cs.mk p/xap.mk p/xcore_cs.mk p/xtensa.mk p/z80.mk
But I'm still getting:
libr/config.mk:47: Data/radare2/libr/../mk/gcc.mk: No such file or directory
gmake: *** No rule to make target 'Data/radare2/libr/../mk/gcc.mk'. Stop.
The strange thing here is that Data is not the directory where radare2 is placed. There must be something writing a badly encoded character during the generation of the config.mk:
configure-plugins: Generating libr/config.mk
I've looked at configure-plugins where config.mk is generated, but can't see anything wrong, it seems it reads the libr/config.mk.head, libr/config.mk.tail, and in the middle it runs the following code:
generate_configmk () {
splugins=""
plugins=""
oldlib=""
for a in `echo "${STATIC} ${SHARED}" | tr " " "\n" | sort` ; do
lib=$(echo $a | cut -d . -f 1) # library
plg=$(echo $a | cut -d . -f 2) # plugin name
if [ ! "$oldlib" = "$lib" ]; then
[ -n "$oldlib" ] && printf "\n"
oldlib=$lib
uclib=$(echo $lib | tr '[a-z]' '[A-Z]')
printf "STATIC_${uclib}_PLUGINS="
plugins="${plugins} __${uclib}"
fi
printf " p/${plg}.mk"
done
echo
for a in ${SHARED} ; do
lib=$(echo $a | cut -d . -f 1) # library
plg=$(echo $a | cut -d . -f 2) # plugin name
uclib=$(echo $lib | tr '[a-z]' '[A-Z]')
if [ -z "`echo ${splugins} | grep __${uclib}`" ]; then
splugins="${splugins} __${uclib}"
printf "SHARED_${uclib}_TARGETS="
fi
printf " p/io_${plg}.${EXT}"
done
echo
}
I'm almost certain that it's when it starts writing the plugins part that is corrupting the config.mk file, because the head and tail parts seem identical, it just copies them on the file.
I'm about to give up and look for another tool to debug ELF files
Use the meson build system or the release builds or r2env. I have never seen or reproduced any of the problems you are having so its hard to say whats going on.
are you using a posix shell?
Which version of gnu make do you use?
Wtf is "Data"? Do your builddir have spaces in the path? Gnu make cant cope with that. just use meson if thats the case
Data/radare2/libr/../mk/gcc.mk:
Another reason for having this Data
could be because you have overriden the LIBR env var or so? do you have any special environment variables set? export| grep Data
may give you a hint
Ok, it seems it was something to do with the directory, one of the folders had a space on it. Git cloned to root and installed without issue, thanks a lot for the help trufae.
Description
I opened config.mk with vim, and there's a never ending line 12 with the strange characters, other lines seem fine, deleted the line and now got the following instead of NUL character:
Any idea why this is happening? Tried searching with no avail. Any help is welcome, thanks.