2 Replies Latest reply on Apr 15, 2015 1:41 PM by enginec

    Cannot install uwsgi on galileo gen 2

    enginec

      Hello guys, I hope to deploy a django-based website on my galileo-gen-2 to control the gpio of galileo board, so I try to install uwsgi on galileo, but it fails because cannot find "libpython2.7.a"

       

      Here are steps I do, I use Yocto to build my image:

      1. Download Yocto project provided from intel download center "Board_Support_Package_Sources_for_Intel_Quark_v1.0.0.7z"

      2. Unzip the project and use "meta-clanton_v1.1.0-dirty" to build image.

      3. source iot-devkit-init-buildenv, and using "hob" to custom image.

      4. select "quark" as machine and "image-full" as recipe, then edit recipes, add "gcc" recipe.("python" recipe is included by default), click "Build package"

      5. after building success, then select packages"gcc"(for compiling), "binutils"(for assembling and linking), "python-dev"(depended by uwsgi). By the way "libpython2" is included by default. then start building image.

      6. put the image onto microSD card, plug into board and reboot.

      7. install pip on galileo, use install script provided from official pip. type command "python get-pip.py", which installing pip succesfully.

      8. use pip to install uwsgi, type command "pip install uwsgi", after about 25 minutes compiling time, it comes up with follwing error:

      """

      *** uWSGI linking ***
      i586-poky-linux-gcc  -m32 -march=i586 -o /usr/bin/uwsgi  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/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/pri586-poky-linux-gcc: error: /usr/lib/python2.7/config/libpython2.7.a: No such file or directory
      ofiler.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 -lpthread -ldl -lpthread -lutil -lm /usr/lib/python2.7/config/libpython2.7.a -lutil -lcrypt
      *** error linking uWSGI ***

      """

       

      I observe the /usr/lib/python2.7/config/, there is no file named libpython2.7.a

       

      root@quark:~# ls /usr/lib/python2.7/config/

      Makefile      Setup         Setup.config  Setup.local   config.c      config.c.in   install-sh    makesetup     python.o

       

       

      after googling libpython2.7, it seems that this library is belongs to "libpython2.7" package. I have added it while building image(called "libpython2"), but why there is no libpython2.7.a on it?

      I am new to galileo board and yocto project, so I have read related documents from yocto and intel galileo. But it seems there is less related resource.Can someone point me out the right way to do or reference to research?