[uWSGI] Compiling uWSGI (custom building tools)

Roberto Bouza bouzafr at gmail.com
Thu Apr 17 23:39:36 CEST 2014


Hello,

I built the whole GCC/Binutils/glibc/python bundle (because we needed a
good static python executable), so now that I have all the suite up and
running, I'm still having some issues
with uWSGI and I was hoping to get some help.

The first error I get is this:

In file included from
/usr/local/python-static/2.7.6/include/python2.7/unicodeobject.h:120:0,
                 from
/usr/local/python-static/2.7.6/include/python2.7/Python.h:85,
                 from plugins/python/uwsgi_python.h:2,
                 from plugins/python/pyutils.c:1:
/usr/local/glibc/2.19/include/wchar.h: In function 'wctob':
/usr/local/glibc/2.19/include/wchar.h:395:1: error: comparison of unsigned
expression >= 0 is always true [-Werror=type-limits]
 { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'
 ^
In file included from
/usr/local/python-static/2.7.6/include/python2.7/unicodeobject.h:120:0,
                 from
/usr/local/python-static/2.7.6/include/python2.7/Python.h:85,
                 from plugins/python/uwsgi_python.h:2,
                 from plugins/python/pyloader.c:1:
/usr/local/glibc/2.19/include/wchar.h: In function 'wctob':
/usr/local/glibc/2.19/include/wchar.h:395:1: error: comparison of unsigned
expression >= 0 is always true [-Werror=type-limits]
 { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'
 ^
In file included from
/usr/local/python-static/2.7.6/include/python2.7/unicodeobject.h:120:0,
                 from
/usr/local/python-static/2.7.6/include/python2.7/Python.h:85,
                 from plugins/python/uwsgi_python.h:2,
                 from plugins/python/python_plugin.c:1:
/usr/local/glibc/2.19/include/wchar.h: In function 'wctob':
/usr/local/glibc/2.19/include/wchar.h:395:1: error: comparison of unsigned
expression >= 0 is always true [-Werror=type-limits]
 { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'
 ^
In file included from
/usr/local/python-static/2.7.6/include/python2.7/unicodeobject.h:120:0,
                 from
/usr/local/python-static/2.7.6/include/python2.7/Python.h:85,
                 from plugins/python/uwsgi_python.h:2,
                 from plugins/python/wsgi_handlers.c:1:
/usr/local/glibc/2.19/include/wchar.h: In function 'wctob':
/usr/local/glibc/2.19/include/wchar.h:395:1: error: comparison of unsigned
expression >= 0 is always true [-Werror=type-limits]
 { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f'

Which If I remove *-Werror* from the uwsgiconfig.py (It looks like a hack
to me) can get past this error.

Then I get a lot of this (a few per library included) just pasting the end
of it:

...
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/bz2module.c:2290:
undefined reference to `BZ2_bzDecompressEnd'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/bz2module.c:2298:
undefined reference to `BZ2_bzDecompressEnd'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/bz2module.c:2312:
undefined reference to `BZ2_bzDecompressEnd'
/usr/local/python-static/2.7.6/lib/python2.7/config/libpython2.7.a(bz2module.o):
In function `Util_UnivNewlineRead':
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/bz2module.c:357:
undefined reference to `BZ2_bzRead'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/bz2module.c:344:
undefined reference to `BZ2_bzRead'
/usr/local/python-static/2.7.6/lib/python2.7/config/libpython2.7.a(bz2module.o):
In function `BZ2File_seek':
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/bz2module.c:1091:
undefined reference to `BZ2_bzReadClose'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/bz2module.c:1106:
undefined reference to `BZ2_bzReadOpen'
/usr/local/python-static/2.7.6/lib/python2.7/config/libpython2.7.a(callbacks.o):
In function `CThunkObject_dealloc':
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/_ctypes/callbacks.c:26:
undefined reference to `ffi_closure_free'
/usr/local/python-static/2.7.6/lib/python2.7/config/libpython2.7.a(callbacks.o):
In function `_ctypes_alloc_callback':
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/_ctypes/callbacks.c:426:
undefined reference to `ffi_closure_alloc'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/_ctypes/callbacks.c:464:
undefined reference to `ffi_prep_cif'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/_ctypes/callbacks.c:476:
undefined reference to `ffi_prep_closure_loc'
/usr/local/python-static/2.7.6/lib/python2.7/config/libpython2.7.a(callproc.o):
In function `_call_function_pointer':
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/_ctypes/callproc.c:801:
undefined reference to `ffi_prep_cif'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/_ctypes/callproc.c:836:
undefined reference to `ffi_call'
/home/rbouza/development/Packages/build/tmp/Python-2.7.6/./Modules/_ctypes/callproc.c:836:
undefined reference to `ffi_call'
collect2: error: ld returned 1 exit status
*** error linking uWSGI ***
make: *** [all] Error 1

But all the LDFLAGS and CFLAGS are there here is the linking line:

*** uWSGI linking ***
/usr/local/gcc/4.8.2/bin/gcc -o uwsgi -L/usr/local/gcc/4.8.2/lib
-L/usr/local/gcc/4.8.2/lib64 -L/usr/local/binutils/2.24/lib
-L/usr/local/glibc/2.19/lib -L/usr/local/libev/4.15/lib
-L/usr/local/libffi/3.0.13/lib64 -L/usr/local/readline/6.2/lib
-L/usr/local/zlib/1.2.8/lib -L/usr/local/bzip2/1.0.6/lib
-L/usr/local/ncurses/5.9/lib -L/usr/local/openssl/1.0.1g/lib
-L/usr/local/gdbm/1.11/lib
-L/usr/local/sqlite/3.8.4.2/lib-L/usr/local/python-static/2.7.6/lib
-lev -ldl core/utils.o core/protocol.o
core/socket.o core/logging.o core/master.o core/master_utils.o
core/emperor.o core/notify.o core/mule.o core/subscription.o core/stats.o
core/sendfile.o core/async.o core/master_checks.o core/fifo.o
core/offload.o core/io.o core/static.o core/websockets.o core/spooler.o
core/snmp.o core/exceptions.o core/config.o core/setup_utils.o core/clock.o
core/init.o core/buffer.o core/reader.o core/writer.o core/alarm.o
core/cron.o core/hooks.o core/plugins.o core/lock.o core/cache.o
core/daemons.o core/errors.o core/hash.o core/master_events.o
core/chunked.o core/queue.o core/event.o core/signal.o core/strings.o
core/progress.o core/timebomb.o core/ini.o core/fsmon.o core/mount.o
core/metrics.o core/plugins_builder.o core/sharedarea.o core/rpc.o
core/gateway.o core/loop.o core/cookie.o core/querystring.o
core/rb_timers.o core/transformations.o core/uwsgi.o proto/base.o
proto/uwsgi.o proto/http.o proto/fastcgi.o proto/scgi.o proto/puwsgi.o
lib/linux_ns.o core/zlib.o core/yaml.o core/ssl.o core/legion.o
core/xmlconf.o core/dot_h.o core/config_py.o plugins/python/python_plugin.o
plugins/python/pyutils.o plugins/python/pyloader.o
plugins/python/wsgi_handlers.o plugins/python/wsgi_headers.o
plugins/python/wsgi_subhandler.o plugins/python/web3_subhandler.o
plugins/python/pump_subhandler.o plugins/python/gil.o
plugins/python/uwsgi_pymodule.o plugins/python/profiler.o
plugins/python/symimporter.o plugins/python/tracebacker.o
plugins/python/raw.o plugins/gevent/gevent.o plugins/gevent/hooks.o
plugins/ping/ping_plugin.o plugins/cache/cache.o plugins/nagios/nagios.o
plugins/rrdtool/rrdtool.o plugins/carbon/carbon.o plugins/rpc/rpc_plugin.o
plugins/corerouter/cr_common.o plugins/corerouter/cr_map.o
plugins/corerouter/corerouter.o plugins/fastrouter/fastrouter.o
plugins/http/http.o plugins/http/keepalive.o plugins/http/https.o
plugins/http/spdy3.o plugins/ugreen/ugreen.o plugins/signal/signal_plugin.o
plugins/syslog/syslog_plugin.o plugins/rsyslog/rsyslog_plugin.o
plugins/logsocket/logsocket_plugin.o plugins/router_uwsgi/router_uwsgi.o
plugins/router_redirect/router_redirect.o
plugins/router_basicauth/router_basicauth.o plugins/zergpool/zergpool.o
plugins/redislog/redislog_plugin.o plugins/mongodblog/mongodblog_plugin.o
plugins/router_rewrite/router_rewrite.o plugins/router_http/router_http.o
plugins/logfile/logfile.o plugins/router_cache/router_cache.o
plugins/rawrouter/rawrouter.o plugins/router_static/router_static.o
plugins/sslrouter/sslrouter.o plugins/spooler/spooler_plugin.o
plugins/cheaper_busyness/cheaper_busyness.o
plugins/symcall/symcall_plugin.o plugins/transformation_tofile/tofile.o
plugins/transformation_gzip/gzip.o plugins/transformation_chunked/chunked.o
plugins/transformation_offload/offload.o
plugins/router_memcached/router_memcached.o
plugins/router_redis/router_redis.o plugins/router_hash/router_hash.o
plugins/router_expires/expires.o plugins/router_metrics/plugin.o
plugins/transformation_template/tt.o plugins/stats_pusher_socket/plugin.o
-lpthread -lm -rdynamic -ldl -lz -lssl -lcrypto -lxml2 -lz -lm -lpthread
-ldl -lutil -lm
/usr/local/python-static/2.7.6/lib/python2.7/config/libpython2.7.a -lutil
-lcrypt

*System info:*

$> uname -a
Linux localhost 2.6.32-279.19.1.el6.x86_64 #1 SMP Tue Dec 18 15:04:44 PST
2012 x86_64 x86_64 x86_64 GNU/Linux
$> cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)

uWSGI 2.0.3

Any help is appreciated! Thank you!

-- 
Roberto Bouza Fraga.
www: http://www.robertobouza.com
t: http://twitter.com/bouzafr - @bouzafr
e: bouzafr at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.unbit.it/pipermail/uwsgi/attachments/20140417/9360bf44/attachment-0001.html>


More information about the uWSGI mailing list