Skip to main content

Build bokken with custom prefix

I'm assuming radare is installed already. My radare location is ~/opt/radare2

$ tar xfv r2-bindings-0.9.tar.gz
$ cd r2-bindings-0.9
$ export PKG_CONFIG_PATH=$HOME/opt/radare2/lib/pkgconfig
$ ./configure --prefix=$HOME/opt/r2-bind --enable=python
$ make -C python
$ make install DESTDIR=$HOME/opt/r2-bind PREFIX=/usr PYTHON_PKGDIR=/lib/python/site-packages

The last make invocation looks weird. You may want to take a look at that Makefile, and see how the installation path is constructed.

$ cd ..
$ tar xfvz bokken-1.6.tar.gz
$ cd bokken-1.6
$ patch -p1 ../bokken.patch

The patch is needed for the libraries and modules to be found, since we are installing bokken with a custom prefix.


--- bokken-1.6/bokken   2012-01-24 07:59:00.000000000 +0200
+++ bokken-1.6-new/bokken       2012-06-12 15:43:52.000000000 +0300
@@ -10,5 +10,5 @@
 # distorm in bokken+pyew mode needs this for now.
+export LD_LIBRARY_PATH=$BOKKEN_DIR/lib:$HOME/opt/r2-bind/lib/python/site-packages/r2:$HOME/opt/radare2/lib
Only in bokken-1.6-new: bokken~
diff -u bokken-1.6/ bokken-1.6-new/
--- bokken-1.6/        2012-01-24 07:59:00.000000000 +0200
+++ bokken-1.6-new/    2012-06-12 15:52:31.000000000 +0300
@@ -21,6 +21,8 @@
 import sys, os
+sys.path.append(os.getenv("HOME") + "/opt/r2-bind/lib/python/site-packages")
 # go with GTK, but first check about DISPLAY environment variable
 if sys.platform != "win32":
     display = os.getenv("DISPLAY").strip()

Update 1: Make sure you have swig installed.

Post new comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
 o          `O          OoooOOoO            `o    O         
O o .oOOo. o o O
o O O O O O
O O o o oOo
o o o .oO O `oOOoOO. o o o O
O O O o o O o o O O OoO
`o O o O' O O o O O o o o o
`OoO' `OoO' `OooO' OOooOooO O o o O O O O

Enter the code depicted in ASCII art style.