On a clean macos system r2pm -ci r2ai (latest r2 master) will fail:
r2pm -ci r2ai
INFO: Cleaning r2ai
INFO: Using r2-6.0.2 and r2pm-6.0.2
INFO: Cleaning r2ai
INFO: git clone --depth=1 --recursive https://github.com/radareorg/r2ai /Users/admin/.local/share/radare2/r2pm/git/r2ai
Cloning into '/Users/admin/.local/share/radare2/r2pm/git/r2ai'...
remote: Enumerating objects: 188, done.
remote: Counting objects: 100% (188/188), done.
remote: Compressing objects: 100% (173/173), done.
remote: Total 188 (delta 6), reused 113 (delta 4), pack-reused 0 (from 0)
Receiving objects: 100% (188/188), 2.23 MiB | 4.93 MiB/s, done.
Resolving deltas: 100% (6/6), done.
INFO: Starting install for r2ai
INFO: SCRIPT=<<EOF
INFO: make -C src
make -C src user-install
INFO: EOF
make: pkg-config: Command not found
cc -I. -fPIC -Wall -g -DUSE_R2_CURL=1 -DUSE_LIBCURL=0 -c -o r2ai.o r2ai.c
In file included from r2ai.c:5:
./r2ai.h:4:10: fatal error: 'r_core.h' file not found
4 | #include <r_core.h>
| ^~~~~~~~~~
1 error generated.
make: *** [r2ai.o] Error 1
rm -f /Users/admin/.local/share/radare2/plugins/r2ai.dylib
mkdir -p /Users/admin/.local/share/radare2/plugins
cp -f r2ai.dylib /Users/admin/.local/share/radare2/plugins
cp: r2ai.dylib: No such file or directory
make: *** [user-install] Error 1
After looking at the r2ai repo I saw it uses pkg-config --cflags r_core to get the CFLAGS, but this silently fails if you do not manually install pkg-config. I will send a PR to the homebrew repo, but this would probably be good to test for and warn the users that packages will not install without it.
On a clean macos system
r2pm -ci r2ai(latest r2 master) will fail:After looking at the
r2airepo I saw it usespkg-config --cflags r_coreto get the CFLAGS, but this silently fails if you do not manually installpkg-config. I will send a PR to the homebrew repo, but this would probably be good to test for and warn the users that packages will not install without it.