Open thamugadi opened 7 months ago
that error is weird: make[2]: /count.sh: Command not found
and then i see ../../shlr/spp/spp.h:83:20: error: r_util.h: No such file or directory
thats very weird. i cant repro in my macppc it seems like there's something wrong or missing vars in the makefiles in your side.. weird
after lots of smol fixes i end up spotting all the problems and managed to create a branch that builds for me. Can you give it a try? i cant merge it because its introducing lots of warnings, but i didnt find a way to make r_vec compile for gcc4 without those:
https://github.com/radareorg/radare2/pull/22774
you can do this:
git checkout gcc4-fixes
sys/install.sh --disable-debugger
the debugger was building and working at some point, but it's not the case right now. That could be the next step to be done when i get this PR merged without warnings.
hi, I tried what you suggested, but I'm still getting the same errors as previously quoted
Thats weird, i cant see the errors you posted. But i plan to continue working on this because the large pr is not yet merged and there are more things to refine
I got v5.9.0 built on Tiger/PowerPC using GCC 5. There's some C11-isms (redefinitions) which have crept into the radare codebase that I sidestepped by using GCC 5 rather than 4.0. This is the draft formula with my patches (see after the END statement) that can be used until I have upstreamed everything to radare repo.
@thamugadi This is because it arbitrarily pick cc
for compiler in a middle of the build, ignoring env setting. Notice, what happens once it goes into arm64 directory:
/opt/local/bin/gcc-mp-13 -c -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/../shlr/grub/include -DR2_PLUGIN_INCORE -Iarch/include -Iarch -pipe -Os -arch ppc -MD -fno-common -fPIC -Wall -g -DR2__UNIX__=1 -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -I../../shlr/zip/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/../shlr/sdb/include -fvisibility=hidden -o fs.o fs.c
/opt/local/bin/gcc-mp-13 -c -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/../shlr/grub/include -DR2_PLUGIN_INCORE -Iarch/include -Iarch -pipe -Os -arch ppc -MD -fno-common -fPIC -Wall -g -DR2__UNIX__=1 -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -I../../shlr/zip/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/../shlr/sdb/include -fvisibility=hidden -o fs_file.o fs_file.c
/opt/local/bin/gcc-mp-13 -c -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/../shlr/grub/include -DR2_PLUGIN_INCORE -Iarch/include -Iarch -pipe -Os -arch ppc -MD -fno-common -fPIC -Wall -g -DR2__UNIX__=1 -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -Igrub/include -I../../shlr/zip/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/../shlr/sdb/include -fvisibility=hidden -o fs_shell.o fs_shell.c
make[5]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/fs'
"/opt/local/bin/gcc-mp-13 -dynamiclib -fPIC -o libr_fs.dylib -Wl,-install_name,/opt/local/lib/libr_fs.dylib p/fs_ext2.o p/fs_fat.o p/fs_fb.o p/fs_hfs.o p/fs_hfsplus.o p/fs_io.o p/fs_iso9660.o p/fs_jfs.o p/fs_minix.o p/fs_ntfs.o p/fs_posix.o p/fs_r2.o p/fs_reiserfs.o p/fs_sfs.o p/fs_tar.o p/fs_udf.o p/fs_ufs.o p/fs_xfs.o p/fs_zip.o fs.o fs_file.o fs_shell.o -L/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/util -L/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/io -L/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/socket -L/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/cons -L/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/crypto -lr_util -lr_io -lr_socket -lr_cons -lr_crypto -fPIC -fvisibility=hidden -L/opt/local/lib -Wl,-headerpad_max_install_names -arch ppc /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/../shlr/grub/libgrubfs.a -lzip -fvisibility=hidden"
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/fs'
make[4]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/fs'
make[4]: `libr_fs.a' is up to date.
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/fs'
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/fs'
cd arch-arm64 && git checkout -q radare2-wip > /dev/null && git reset --hard 55d73c6bbb94448a5c615933179e73ac618cf876
HEAD is now at 55d73c6 Remove c99 dependency
/usr/bin/make arm64dis.a
make[5]: Entering directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/arch/p/arm/v35'
cc -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/arch/p/arm/v35/arch-arm64/disassembler/ -fPIC -DUNUSED=R_UNUSED -fPIC -c -o arch-arm64/disassembler/decode.o arch-arm64/disassembler/decode.c
cc -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/arch/p/arm/v35/arch-arm64/disassembler/ -fPIC -DUNUSED=R_UNUSED -fPIC -c -o arch-arm64/disassembler/decode0.o arch-arm64/disassembler/decode0.c
cc -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/arch/p/arm/v35/arch-arm64/disassembler/ -fPIC -DUNUSED=R_UNUSED -fPIC -c -o arch-arm64/disassembler/decode1.o arch-arm64/disassembler/decode1.c
cc -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/arch/p/arm/v35/arch-arm64/disassembler/ -fPIC -DUNUSED=R_UNUSED -fPIC -c -o arch-arm64/disassembler/decode2.o arch-arm64/disassembler/decode2.c
cc -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/arch/p/arm/v35/arch-arm64/disassembler/ -fPIC -DUNUSED=R_UNUSED -fPIC -c -o arch-arm64/disassembler/decode_fields32.o arch-arm64/disassembler/decode_fields32.c
cc -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_radare2/radare2/work/radare2-5.9.2/libr/arch/p/arm/v35/arch-arm64/disassembler/ -fPIC -DUNUSED=R_UNUSED -fPIC -c -o arch-arm64/disassembler/decode_scratchpad.o arch-arm64/disassembler/decode_scratchpad.c
arch-arm64/disassembler/decode.c: In function ‘aarch64_decompose’:
arch-arm64/disassembler/decode.c:13: warning: integer constant is too large for ‘long’ type
arch-arm64/disassembler/decode.c:14: warning: integer constant is too large for ‘long’ type
arch-arm64/disassembler/decode_scratchpad.c:365:7: error: invalid suffix "b00000" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:367:7: error: invalid suffix "b00001" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:369:7: error: invalid suffix "b00010" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:371:7: error: invalid suffix "b00011" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:373:7: error: invalid suffix "b00100" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:375:7: error: invalid suffix "b00101" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:377:7: error: invalid suffix "b00110" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:379:7: error: invalid suffix "b00111" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:381:7: error: invalid suffix "b01000" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:383:7: error: invalid suffix "b01001" on integer constant
arch-arm64/disassembler/decode_scratchpad.c:385:7: error: invalid suffix "b01010" on integer constant
I have opened an issue for a compiler choice bug: https://github.com/radareorg/radare2/issues/22955
On a side note, this looks wrong:
checking build system type... PowerMacintosh-unknown-darwin
checking host system type... PowerMacintosh-unknown-darwin
checking target system type... PowerMacintosh-unknown-darwin
It should be powerpc-apple-darwin
instead, or powerpc64-apple-darwin
for ppc64
. This is likely https://github.com/radareorg/radare2/issues/22956
I've already talked about it on the discord server, so I'm making an issue :)
Environment
Description
Building radare2 fails on a PowerPC Mac.
Test