Change in mncc-python[master]: regen-mncc-py.sh: Document how to obtain required bins from source

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Sep 9 18:11:34 UTC 2020


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/mncc-python/+/20054 )


Change subject: regen-mncc-py.sh: Document how to obtain required bins from source
......................................................................

regen-mncc-py.sh: Document how to obtain required bins from source

Change-Id: Ifc54ea883dd9f11bf6497e81eaa00bb6ddf50807
---
M regen-mncc-py.sh
1 file changed, 23 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/mncc-python refs/changes/54/20054/1

diff --git a/regen-mncc-py.sh b/regen-mncc-py.sh
index f1c85db..a1981b4 100755
--- a/regen-mncc-py.sh
+++ b/regen-mncc-py.sh
@@ -3,14 +3,36 @@
 echo Unfortunately, this package is long unmaintained and only available on Debian8
 echo
 
+# If your distro doesn't provide python-ctypeslib:
+# svn co "https://svn.python.org/projects/ctypes/trunk/ctypeslib/"
+# cd ctypeslib
+# python2 ./setup.py install --prefix /tmp/out
+# ln -s h2xml.py /tmp/out/bin/h2xml
+# ln -s xml2py.py /tmp/out/bin/xml2py
+# export PYTHONPATH="$PYTHONPATH:/tmp/out/lib/python2.7/site-packages"
+# export PATH="$PATH:/tmp/out/bin/"
+# ./regen-mncc-py.sh
+# == Troubleshooting:
+# * h2ml: Failing with tracebak OSError Not found:
+#   One may be missing gccxml. On arch, install gccxml-git from AUR.
+# * h2xml failing due to missing gccxml_builtins.h:
+#   Create empty file /tmp/include/gccxml_builtins.h and pass "-I /tmp/include/" to h2xml.
+# * Missing __builtin_bswap16/32/64:
+#   Copy from /usr/include/bits/byteswap.h defines __bswap_constant_16/32/64 to
+#   either start of mncc.h itself or /tmp/include/gccxml_builtins.h, and rename
+#   them as __builtin_bswap16/32/64.
+
 if [ ! -x `which h2xml` ]; then
 	echo No h2xml executable found - python-ctypeslib not installed?
+	exit 1
 fi
 
 if [ ! -x `which xml2py` ]; then
 	echo No xml2py executable found - python-ctypeslib not installed?
+	exit 1
 fi
 
+set -xe
 cp ./mncc.h /tmp/mncc.h
-h2xml ./mncc.h -c -o mncc.xml
+h2xml -I /tmp/include/ ./mncc.h -c -o mncc.xml
 xml2py mncc.xml -k dest -v -o mncc.py

-- 
To view, visit https://gerrit.osmocom.org/c/mncc-python/+/20054
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: mncc-python
Gerrit-Branch: master
Gerrit-Change-Id: Ifc54ea883dd9f11bf6497e81eaa00bb6ddf50807
Gerrit-Change-Number: 20054
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200909/00024323/attachment.htm>


More information about the gerrit-log mailing list