0.
sudo add-apt-repository ppa:npalix/coccinelle
sudo apt-get update
https://github.com/coccinelle/coccinelle/releases
1.
sudo apt-get install gcc g++ binutils patch bzip2 flex make gettext pkg-config unzip zlib1g-dev libc6-dev subversion libncurses5-dev gawk sharutils curl libxml-parser-perl ocaml-nox ocaml-nox ocaml ocaml-findlib libpcre3-dev binutils-gold python-yaml
2.
sudo rm -rf /usr/bin/ocaml* /usr/lib/ocaml/
3.
sudo apt-get purge camlp4 camlp4-extra libfindlib-ocaml libfindlib-ocaml-dev libmenhir-ocaml-dev libpcre-ocaml libpcre-ocaml-dev ocaml ocaml-base ocaml-base-nox ocaml-compiler-libs ocaml-findlib ocaml-interp ocaml-native-compilers ocaml-nox
4.
wget https://launchpadlibrarian.net/86710925/ocaml_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710921/ocaml-nox_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710928/ocaml-native-compilers_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710929/ocaml-interp_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710930/ocaml-compiler-libs_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710927/ocaml-base_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710926/ocaml-base-nox_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710923/camlp4_3.12.1-2ubuntu2_amd64.deb
wget https://launchpadlibrarian.net/86710924/camlp4-extra_3.12.1-2ubuntu2_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/t/tcl8.5/libtcl8.5_8.5.15-2ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/t/tcl8.5/tcl8.5_8.5.15-2ubuntu1_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/t/tk8.5/tk8.5_8.5.15-2ubuntu3_amd64.deb
wget http://mirrors.kernel.org/ubuntu/pool/main/t/tk8.5/libtk8.5_8.5.15-2ubuntu3_amd64.deb
5.
sudo dpkg -i ocaml-base-nox_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i ocaml-interp_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i ocaml-nox_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i ocaml-compiler-libs_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i ocaml-native-compilers_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i camlp4_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i camlp4-extra_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i libtcl8.5_8.5.15-2ubuntu1_amd64.deb
sudo dpkg -i tcl8.5_8.5.15-2ubuntu1_amd64.deb
sudo dpkg -i libtk8.5_8.5.15-2ubuntu3_amd64.deb
sudo dpkg -i tk8.5_8.5.15-2ubuntu3_amd64.deb
sudo dpkg -i ocaml-base_3.12.1-2ubuntu2_amd64.deb
sudo dpkg -i ocaml_3.12.1-2ubuntu2_amd64.deb
6.
sudo apt-get install global python-dev python-yaml
sudo apt-get install ocaml-findlib menhir libmenhir-ocaml-dev libpycaml-ocaml-dev libpcre-ocaml-dev
*** It failed... :-(
via opam
$ sudo apt-get install opam
ocaml-nox is already the newest version (4.02.3-5ubuntu2)
$opam init --comp=4.02.3
$ opam switch 4.02.3
tools/coccinelle/Makefile
PKG_VERSION:=1.0.7
#https://github.com/coccinelle/coccinelle/archive/1.0.7.tar.gz
PKG_SOURCE:=$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/coccinelle/coccinelle/archive/
under build_dir/coccinelle-1.0.7/
./autogen
./configure
./make
./make install -->> run OpenWrt/make V=s -->> it will run "make install"
openwrt/build_dir/host/coccinelle-1.0.7$ ./configure --prefix=/home/openwrt/staging_dir/host --disable-opt
openwrt/build_dir/host/coccinelle-1.0.7$ make
openwrt/build_dir/host/coccinelle-1.0.7$ make install
openwrt/build_dir/host/coccinelle-1.0.7$ ./configure --prefix=/home/openwrt/staging_dir/host --disable-opt
openwrt/build_dir/host/coccinelle-1.0.7$ make
openwrt/build_dir/host/coccinelle-1.0.7$ make install
No comments:
Post a Comment