radareorg / radare2-bindings

Bindings of the r2 api for Valabind and friends
GNU Lesser General Public License v3.0
131 stars 92 forks source link

`prefix` directive in configuration tool has no effect on install target(s) #172

Open RomanHargrave opened 7 years ago

RomanHargrave commented 7 years ago

I'm trying to build a package for some of the python bindings so that I can manage them with apt (as I do with many other packages on my system). I've invoked configure as follows ./configure --prefix=$PWD/_package_root_ --enable=python. After successfully compiling the bindings, though, attempting to install the bindings fails because the target tries to touch files outside of that directory (specifically, it wants to copy files to /usr/lib/x86_64-linux-gnu-radare2/1.1.0/).

Full transcript of failed install:

make -C libr/lang/p install
make[1]: Entering directory '/usr/local/src/radare2-bindings/libr/lang/p'
mkdir -p //usr/lib/x86_64-linux-gnu/radare2/1.1.0/
[ -n "`ls *.so`" ] && cp -f *.so //usr/lib/x86_64-linux-gnu/radare2/1.1.0/ || true
cp: cannot create regular file '//usr/lib/x86_64-linux-gnu/radare2/1.1.0/lang_csharp.so': Permission denied
cp: cannot create regular file '//usr/lib/x86_64-linux-gnu/radare2/1.1.0/lang_duktape.so': Permission denied
cp: cannot create regular file '//usr/lib/x86_64-linux-gnu/radare2/1.1.0/lang_python.so': Permission denied
cp -f radare.lua //usr/lib/x86_64-linux-gnu/radare2/1.1.0/
cp: cannot create regular file '//usr/lib/x86_64-linux-gnu/radare2/1.1.0/radare.lua': Permission denied
Makefile:106: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/usr/local/src/radare2-bindings/libr/lang/p'
Makefile:150: recipe for target 'install-plugins' failed
make: *** [install-plugins] Error 2
radare commented 5 years ago

yeah, its using the info taken from r2 because it shuold match the same version. not sure if we should make --prefix work only when its different than the default. so, keeping current behaviour, but allowing to specify a different path or destdir