Can you check the return value of CorrectA ? i suspect it fails
CorrectA returns -99, which means "address not found". In other words, the shared object runs without exceptions, it just doesn't find the address (because it doesn't load the data files).

Do you have multiple python versions in your system ?
I do but I confirmed the various calls are using the same version (version: 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3])

Are you sure you have not built a 64bit version of uWSGI while trying to load a 
32bit library (or the opposite) ? (this is not supported on Linux)

On startup uWSGI print its architecture.
I'm on a 64-bit platform and the shared object is 64 bit. I'm not sure how to print uWSGI's architecture but the pip output below looks like 64 bit. And when I install the 32-bit CorrectA, ctypes won't even open it (OSError: libCorrectA.so: wrong ELF class: ELFCLASS32), so I don't think there's a mismatched architecture, because like I said, what I'm seeing is that the shared object runs and returns, it just doesn't return the expected response.

  Running setup.py install for uWSGI
    using profile: buildconf/default.ini
detected include path: ['/usr/local/include', '/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include', '/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include-fixed', '/usr/include']
    Patching "bin_name" to properly install_scripts dir
configured CFLAGS: -O2 -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_BUILD_DATE="\"07 August 2012 11:48:06\"" -DUWSGI_HAS_IFADDRS -DUWSGI_LOCK_USE_MUTEX -DUWSGI_EVENT_USE_EPOLL -DUWSGI_EVENT_TIMER_USE_TIMERFD -DUWSGI_EVENT_FILEMONITOR_USE_INOTIFY -DUWSGI_EMBEDDED -DUWSGI_UDP -DUWSGI_PCRE -DUWSGI_ROUTING -DUWSGI_VERSION="\"1.2.4\"" -DUWSGI_VERSION_BASE="1" -DUWSGI_VERSION_MAJOR="2" -DUWSGI_VERSION_MINOR="4" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_ASYNC -DUWSGI_MULTICAST -DUWSGI_MINTERPRETERS -DUWSGI_INI -DUWSGI_YAML -DUWSGI_SNMP -DUWSGI_THREADING -DUWSGI_SENDFILE -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_PLUGIN_DIR=\".\" -DUWSGI_SPOOLER -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);UDEP(router_uwsgi);UDEP(router_redirect);UDEP(router_basicauth);UDEP(zergpool);UDEP(redislog);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);ULEP(router_uwsgi);ULEP(router_redirect);ULEP(router_basicauth);ULEP(zergpool);ULEP(redislog);"
    *** uWSGI compiling server core ***
    [gcc -pthread] utils.o
    [gcc -pthread] protocol.o
    [gcc -pthread] socket.o
    [gcc -pthread] logging.o
    [gcc -pthread] master.o
    [gcc -pthread] master_utils.o
    [gcc -pthread] emperor.o
    [gcc -pthread] notify.o
    [gcc -pthread] mule.o
    [gcc -pthread] subscription.o
    [gcc -pthread] plugins.o
    [gcc -pthread] lock.o
    [gcc -pthread] cache.o
    [gcc -pthread] queue.o
    [gcc -pthread] event.o
    [gcc -pthread] signal.o
    [gcc -pthread] cluster.o
    [gcc -pthread] rpc.o
    [gcc -pthread] gateway.o
    [gcc -pthread] loop.o
    [gcc -pthread] lib/rbtree.o
    [gcc -pthread] lib/amqp.o
    [gcc -pthread] rb_timers.o
    [gcc -pthread] main.o
    [gcc -pthread] proto/base.o
    [gcc -pthread] proto/uwsgi.o
    [gcc -pthread] proto/http.o
    [gcc -pthread] proto/fastcgi.o
    [gcc -pthread] lib/linux_ns.o
    [gcc -pthread] regexp.o
    [gcc -pthread] routing.o
    [gcc -pthread] async.o
    [gcc -pthread] ini.o
    [gcc -pthread] yaml.o
    [gcc -pthread] snmp.o
    [gcc -pthread] sendfile.o
    [gcc -pthread] xmlconf.o
    [gcc -pthread] spooler.o
    *** uWSGI compiling embedded plugins ***
    [gcc -pthread] plugins/python/python_plugin.o
    [gcc -pthread] plugins/python/pyutils.o
    [gcc -pthread] plugins/python/pyloader.o
    [gcc -pthread] plugins/python/wsgi_handlers.o
    [gcc -pthread] plugins/python/wsgi_headers.o
    [gcc -pthread] plugins/python/wsgi_subhandler.o
    [gcc -pthread] plugins/python/web3_subhandler.o
    [gcc -pthread] plugins/python/pump_subhandler.o
    [gcc -pthread] plugins/python/gil.o
    [gcc -pthread] plugins/python/uwsgi_pymodule.o
    [gcc -pthread] plugins/python/profiler.o
    [gcc -pthread] plugins/python/symimporter.o
    [gcc -pthread] plugins/ping/ping_plugin.o
    [gcc -pthread] plugins/cache/cache.o
    [gcc -pthread] plugins/nagios/nagios.o
    [gcc -pthread] plugins/rrdtool/rrdtool.o
    [gcc -pthread] plugins/carbon/carbon.o
    [gcc -pthread] plugins/rpc/rpc_plugin.o
    [gcc -pthread] plugins/fastrouter/fr_sctp.o
    [gcc -pthread] plugins/fastrouter/fr_map.o
    [gcc -pthread] plugins/fastrouter/fastrouter.o
    [gcc -pthread] plugins/fastrouter/fr_events.o
    [gcc -pthread] plugins/http/http.o
    [gcc -pthread] plugins/ugreen/ugreen.o
    [gcc -pthread] plugins/signal/signal_plugin.o
    [gcc -pthread] plugins/syslog/syslog_plugin.o
    [gcc -pthread] plugins/rsyslog/rsyslog_plugin.o
    [gcc -pthread] plugins/logsocket/logsocket_plugin.o
    [gcc -pthread] plugins/router_uwsgi/router_uwsgi.o
    [gcc -pthread] plugins/router_redirect/router_redirect.o
    [gcc -pthread] plugins/router_basicauth/router_basicauth.o
    [gcc -pthread] plugins/zergpool/zergpool.o
    [gcc -pthread] plugins/redislog/redislog_plugin.o
    *** uWSGI linking ***
gcc -pthread -o /usr/local/bin/uwsgi utils.o protocol.o socket.o logging.o master.o master_utils.o emperor.o notify.o mule.o subscription.o plugins.o lock.o cache.o queue.o event.o signal.o cluster.o rpc.o gateway.o loop.o lib/rbtree.o lib/amqp.o rb_timers.o main.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o lib/linux_ns.o regexp.o routing.o async.o ini.o yaml.o snmp.o sendfile.o xmlconf.o spooler.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/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/fastrouter/fr_sctp.o plugins/fastrouter/fr_map.o plugins/fastrouter/fastrouter.o plugins/fastrouter/fr_events.o plugins/http/http.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 -lpthread -lm -rdynamic -ldl -L/usr/lib -lpcre -lxml2 -lpthread -ldl -lutil -lm -L/usr/lib/python2.6/config -lpython2.6 -lcrypt
    *** uWSGI is ready, launch it with /usr/local/bin/uwsgi ***
Successfully installed uWSGI
Cleaning up...


--
Roberto De Ioris
http://unbit.it
JID: [email protected]

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to