How to compile 32bit based libraries?

1 post / 0 new
#1 Fri, 2018-01-19 01:03
kaldor
  • kaldor's picture
  • Offline
  • Last seen: 2 months 1 week ago
  • Joined: 2018-01-19

specifically, trying to install python xattr using pip, and easy_install, and getting this:

/ # easy_install-3.6 xattr
Searching for xattr
Reading <a href="https://pypi.python.org/simple/xattr/
Downloading" rel="nofollow">https://pypi.python.org/simple/xattr/
Downloading</a> <a href="https://pypi.python.org/packages/18/37/2c68110bd5d52d656e7c3bad3003be78146d6cabf00cf8bdfc7d22029d7c/xattr-0.9.2.tar.gz#md5=308b6fc77183d3c01048250d1df60165
Best" rel="nofollow">https://pypi.python.org/packages/18/37/2c68110bd5d52d656e7c3bad3003be78146d6cabf00cf8bdfc7d22029d7c/xattr-0.9.2.tar.gz#md5=308b6fc77183d3c01048250d1df60165
Best</a> match: xattr 0.9.2
Processing xattr-0.9.2.tar.gz
Writing /tmp/easy_install-avch7tn7/xattr-0.9.2/setup.cfg
Running xattr-0.9.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-avch7tn7/xattr-0.9.2/egg-dist-tmp-4wjmzc25
c/_cffi_backend.c:2:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
/ # apk add   python3-dev
(1/1) Installing python3-dev (3.6.3-r9)
Executing busybox-1.27.2-r6.trigger
OK: 354 MiB in 68 packages
/ # easy_install-3.6 xattr
Searching for xattr
Reading <a href="https://pypi.python.org/simple/xattr/
Downloading" rel="nofollow">https://pypi.python.org/simple/xattr/
Downloading</a> <a href="https://pypi.python.org/packages/18/37/2c68110bd5d52d656e7c3bad3003be78146d6cabf00cf8bdfc7d22029d7c/xattr-0.9.2.tar.gz#md5=308b6fc77183d3c01048250d1df60165
Best" rel="nofollow">https://pypi.python.org/packages/18/37/2c68110bd5d52d656e7c3bad3003be78146d6cabf00cf8bdfc7d22029d7c/xattr-0.9.2.tar.gz#md5=308b6fc77183d3c01048250d1df60165
Best</a> match: xattr 0.9.2
Processing xattr-0.9.2.tar.gz
Writing /tmp/easy_install-obpee5_b/xattr-0.9.2/setup.cfg
/ # easy_install-3.6 xattr
Searching for xattr
Reading <a href="https://pypi.python.org/simple/xattr/
Downloading" rel="nofollow">https://pypi.python.org/simple/xattr/
Downloading</a> <a href="https://pypi.python.org/packages/18/37/2c68110bd5d52d656e7c3bad3003be78146d6cabf00cf8bdfc7d22029d7c/xattr-0.9.2.tar.gz#md5=308b6fc77183d3c01048250d1df60165
Best" rel="nofollow">https://pypi.python.org/packages/18/37/2c68110bd5d52d656e7c3bad3003be78146d6cabf00cf8bdfc7d22029d7c/xattr-0.9.2.tar.gz#md5=308b6fc77183d3c01048250d1df60165
Best</a> match: xattr 0.9.2
Processing xattr-0.9.2.tar.gz
Writing /tmp/easy_install-s0v1emlo/xattr-0.9.2/setup.cfg
Running xattr-0.9.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-s0v1emlo/xattr-0.9.2/egg-dist-tmp-m5_2aa5q
 
Installed /tmp/easy_install-s0v1emlo/xattr-0.9.2/.eggs/cffi-1.11.4-py3.6-linux-x86_64.egg
Searching for pycparser
Reading <a href="https://pypi.python.org/simple/pycparser/
Downloading" rel="nofollow">https://pypi.python.org/simple/pycparser/
Downloading</a> <a href="https://pypi.python.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz#md5=72370da54358202a60130e223d488136
Best" rel="nofollow">https://pypi.python.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz#md5=72370da54358202a60130e223d488136
Best</a> match: pycparser 2.18
Processing pycparser-2.18.tar.gz
Writing /tmp/easy_install-s0v1emlo/xattr-0.9.2/temp/easy_install-upardux8/pycparser-2.18/setup.cfg
Running pycparser-2.18/setup.py -q bdist_egg --dist-dir /tmp/easy_install-s0v1emlo/xattr-0.9.2/temp/easy_install-upardux8/pycparser-2.18/egg-dist-tmp-725iunv2
warning: no previously-included files matching 'yacctab.*' found under directory 'tests'
warning: no previously-included files matching 'lextab.*' found under directory 'tests'
warning: no previously-included files matching 'yacctab.*' found under directory 'examples'
warning: no previously-included files matching 'lextab.*' found under directory 'examples'
zip_safe flag not set; analyzing archive contents...
pycparser.ply.__pycache__.ygen.cpython-36: module references __file__
pycparser.ply.__pycache__.yacc.cpython-36: module references __file__
pycparser.ply.__pycache__.yacc.cpython-36: module MAY be using inspect.getsourcefile
pycparser.ply.__pycache__.yacc.cpython-36: module MAY be using inspect.stack
pycparser.ply.__pycache__.lex.cpython-36: module references __file__
pycparser.ply.__pycache__.lex.cpython-36: module MAY be using inspect.getsourcefile
creating /tmp/easy_install-s0v1emlo/xattr-0.9.2/.eggs/pycparser-2.18-py3.6.egg
Extracting pycparser-2.18-py3.6.egg to /tmp/easy_install-s0v1emlo/xattr-0.9.2/.eggs
 
Installed /tmp/easy_install-s0v1emlo/xattr-0.9.2/.eggs/pycparser-2.18-py3.6.egg
build/temp.linux-x86_64-3.6/_lib.c:928:94: error: unknown type name 'u_int32_t'
 static ssize_t xattr_getxattr(const char *path, const char *name, void *value, ssize_t size, u_int32_t position, int options) {
                                                                                              ^~~~~~~~~
build/temp.linux-x86_64-3.6/_lib.c:939:94: error: unknown type name 'u_int32_t'
 static ssize_t xattr_setxattr(const char *path, const char *name, void *value, ssize_t size, u_int32_t position, int options) {
                                                                                              ^~~~~~~~~
build/temp.linux-x86_64-3.6/_lib.c:983:85: error: unknown type name 'u_int32_t'
 static ssize_t xattr_fgetxattr(int fd, const char *name, void *value, ssize_t size, u_int32_t position, int options) {
                                                                                     ^~~~~~~~~
build/temp.linux-x86_64-3.6/_lib.c:994:85: error: unknown type name 'u_int32_t'
 static ssize_t xattr_fsetxattr(int fd, const char *name, void *value, ssize_t size, u_int32_t position, int options) {
                                                                                     ^~~~~~~~~
build/temp.linux-x86_64-3.6/_lib.c: In function '_cffi_d_xattr_fgetxattr':
build/temp.linux-x86_64-3.6/_lib.c:1107:10: warning: implicit declaration of function 'xattr_fgetxattr' [-Wimplicit-function-declaration]
   return xattr_fgetxattr(x0, x1, x2, x3, x4, x5);
          ^~~~~~~~~~~~~~~
build/temp.linux-x86_64-3.6/_lib.c: In function '_cffi_d_xattr_fsetxattr':
build/temp.linux-x86_64-3.6/_lib.c:1294:10: warning: implicit declaration of function 'xattr_fsetxattr' [-Wimplicit-function-declaration]
   return xattr_fsetxattr(x0, x1, x2, x3, x4, x5);
          ^~~~~~~~~~~~~~~
build/temp.linux-x86_64-3.6/_lib.c: In function '_cffi_d_xattr_getxattr':
build/temp.linux-x86_64-3.6/_lib.c:1371:10: warning: implicit declaration of function 'xattr_getxattr' [-Wimplicit-function-declaration]
   return xattr_getxattr(x0, x1, x2, x3, x4, x5);
          ^~~~~~~~~~~~~~
build/temp.linux-x86_64-3.6/_lib.c: In function '_cffi_d_xattr_setxattr':
build/temp.linux-x86_64-3.6/_lib.c:1579:10: warning: implicit declaration of function 'xattr_setxattr' [-Wimplicit-function-declaration]
   return xattr_setxattr(x0, x1, x2, x3, x4, x5);
          ^~~~~~~~~~~~~~