> On Mon, 15 Apr 2013 15:57:58 +0200, "Roberto De Ioris" > <[email protected]> wrote: >>The easiest way is compiling directly on arm, you only need >>build-essential and python packages to build it > > As much as possible, I prefer to cross-compile to avoid wearing the > NAND memory. Besides, the appliance only has 512M RAM, and the CPU is > slower than a PC. > > But anyway, I ran the followings on the appliance: > 1. apt-get install build-essential python > 2. apt-get install python-dev > 3. wget -c http://projects.unbit.it/downloads/uwsgi-1.9.5.tar.gz > 4. tar xzvf uwsgi-1.9.5.tar.gz > 5. cd uwsgi-1.9.5 > 6. make > > ... and it seems to work: > ========== > ... > ############## end of uWSGI configuration ############# > *** uWSGI is ready, launch it with ./uwsgi *** > make: warning: Clock skew detected. Your build may be incomplete. > > /tmp/uwsgi-1.9.5# ./uwsgi > *** Starting uWSGI 1.9.5 (32bit) on [Mon Jan 24 17:33:08 2000] *** > compiled with version: 4.4.5 on 24 January 2000 17:25:05 > os: Linux-2.6.32-5-kirkwood #1 Mon Feb 25 13:55:40 UTC 2013 > nodename: debian > machine: armv5tel > clock source: unix > detected number of CPU cores: 1 > current working directory: /tmp/uwsgi-1.9.5 > detected binary path: /tmp/uwsgi-1.9.5/uwsgi > uWSGI running as root, you can use --uid/--gid/--chroot options > *** WARNING: you are running uWSGI as root !!! (use the --uid flag) > *** > *** WARNING: you are running uWSGI without its master process manager > *** > your memory page size is 4096 bytes > detected max file descriptor number: 1024 > lock engine: pthread robust mutexes > The -s/--socket option is missing and stdin is not a socket. > ========== > > Next, I followed the "Quickstart for python/WSGI applications" to > create a basic Python script and launch it through uWSGI: > http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html > > ========== > /tmp/uwsgi-1.9.5# ./uwsgi --http :9090 --wsgi-file hello.py > *** Starting uWSGI 1.9.5 (32bit) on [Mon Jan 24 17:37:02 2000] *** > compiled with version: 4.4.5 on 24 January 2000 17:25:05 > os: Linux-2.6.32-5-kirkwood #1 Mon Feb 25 13:55:40 UTC 2013 > nodename: debian > machine: armv5tel > clock source: unix > detected number of CPU cores: 1 > current working directory: /tmp/uwsgi-1.9.5 > detected binary path: /tmp/uwsgi-1.9.5/uwsgi > uWSGI running as root, you can use --uid/--gid/--chroot options > *** WARNING: you are running uWSGI as root !!! (use the --uid flag) > *** > *** WARNING: you are running uWSGI without its master process manager > *** > your memory page size is 4096 bytes > detected max file descriptor number: 1024 > lock engine: pthread robust mutexes > uWSGI http bound on :9090 fd 4 > spawned uWSGI http 1 (pid: 6317) > uwsgi socket 0 bound to TCP address 127.0.0.1:59744 (port > auto-assigned) fd 3 > Python version: 2.6.6 (r266:84292, Dec 27 2010, 23:43:15) [GCC 4.4.5 > 20100902 (prerelease)] > Fatal Python error: exceptions bootstrapping error. > Aborted > ========== > > Apparently, Python must be compiled in a particular way: > www.raspberrypi.org/phpBB3/viewtopic.php?f=32&t=15370 > ========== > /tmp/uwsgi-1.9.5# python > Python 2.6.6 (r266:84292, Dec 27 2010, 21:57:32) > [GCC 4.4.5 20100902 (prerelease)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> from distutils import sysconfig >>>> sysconfig.get_config_var('Py_ENABLE_SHARED') > 0 > ========== > > It looks like the standard Python available for ARM isn't compiled the > right way: > ./configure --enable-shared; make; make install; > > Thank you. > > _______________________________________________ > uWSGI mailing list > [email protected] > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >
You solve the issue (known by ages, but no-one was able to fix it with the result of dozens of broken packages on debian), by building the python support as a plugin: UWSGI_PROFILE=core make python uwsgiconfig.py --plugin plugins/python core then just remember to add --plugin = python to the configs/commandline -- Roberto De Ioris http://unbit.it _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
