Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add quick fix for checking port-drives and nif-files versions

Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
  • Loading branch information...
commit a920d04e50671dc9de46fb7a1f47d52d6a08685d 1 parent 8ad3bbc
@lemenkov authored
Showing with 21 additions and 0 deletions.
  1. +8 −0 erlang-find-provides.sh
  2. +13 −0 erlang-find-requires.sh
View
8 erlang-find-provides.sh
@@ -102,6 +102,14 @@ for bd in $basedirs; do
# Add BIFs for HiPE
grep "bif " $BUILDDIR/erts/emulator/hipe/*.tab | awk -F "bif " '{print "erlang(" $2 ")"}'
+
+ ERL_DRV_MAJOR=`grep "^#define ERL_DRV_EXTENDED_MAJOR_VERSION" erts/emulator/beam/erl_driver.h | cut -f 2`
+ ERL_DRV_MINOR=`grep "^#define ERL_DRV_EXTENDED_MINOR_VERSION" erts/emulator/beam/erl_driver.h | cut -f 2`
+ echo "erlang(erl_drv_version) = $ERL_DRV_MAJOR.$ERL_DRV_MINOR"
+
+ ERL_NIF_MAJOR=`grep "^#define ERL_NIF_MAJOR_VERSION" erts/emulator/beam/erl_nif.h | cut -d " " -f 3`
+ ERL_NIF_MINOR=`grep "^#define ERL_NIF_MINOR_VERSION" erts/emulator/beam/erl_nif.h | cut -d " " -f 3`
+ echo "erlang(erl_nif_version) = $ERL_NIF_MAJOR.$ERL_NIF_MINOR"
;;
"wx")
# wx module doesn't contain app-file.
View
13 erlang-find-requires.sh
@@ -27,6 +27,19 @@ filelist=`sed "s/['\"]/\\\&/g"`
/usr/lib/rpm/rpmdeps --requires $filelist
+# Check for possible Port- and NIF-libraries
+sofiles==$(echo $filelist | tr [:blank:] '\n' | grep -o -E '.*/priv/.*\.so$')
+if [ "$sofiles" != "" ]
+then
+ ERL_DRV_MAJOR=`grep "^#define ERL_DRV_EXTENDED_MAJOR_VERSION" /usr/lib*/erlang/usr/include/erl_driver.h | cut -f 2`
+ ERL_DRV_MINOR=`grep "^#define ERL_DRV_EXTENDED_MINOR_VERSION" /usr/lib*/erlang/usr/include/erl_driver.h | cut -f 2`
+ echo "erlang(erl_drv_version) = $ERL_DRV_MAJOR.$ERL_DRV_MINOR"
+
+ ERL_NIF_MAJOR=`grep "^#define ERL_NIF_MAJOR_VERSION" /usr/lib*/erlang/usr/include/erl_nif.h | cut -d " " -f 3`
+ ERL_NIF_MINOR=`grep "^#define ERL_NIF_MINOR_VERSION" /usr/lib*/erlang/usr/include/erl_nif.h | cut -d " " -f 3`
+ echo "erlang(erl_nif_version) = $ERL_NIF_MAJOR.$ERL_NIF_MINOR"
+fi
+
# Get the list of built *.beam files
beamfiles=$(echo $filelist | tr [:blank:] '\n' | grep -o -E '.*/ebin/.*\.beam$')
/usr/lib/rpm/erlang-find-requires.escript $beamfiles | sort | uniq
Please sign in to comment.
Something went wrong with that request. Please try again.