The file in question is of course plugins/erlang/uwsgiplugin.py
W dniu 11.02.2012 15:27, Łukasz Czuja pisze:
Hi,
I've managed to compile & link erlang plugin on CentOS 5.7.
uwsgiconfig.py for that plugin was missing libdir/includepath
discovery. Please find the code below as a solution:
uwsgiconfig.py
import os
NAME='erlang'
try:
ERLANGPATH = os.environ['UWSGICONFIG_ERLANGPATH']
except:
ERLANGPATH = 'erl'
GCC_LIST = [ 'erlang' ]
# top libdir: code:lib_dir()
# erlang version: erlang:system_info(version)
#rootdir = os.popen(ERLANGPATH + " -noshell -noinput -eval
\"io:format('~s~n', [code:root_dir()])\" -s erlang
halt").read().rstrip()
includedir = os.popen(ERLANGPATH + " -noshell -noinput -eval
\"io:format('~s~n', [code:lib_dir(erl_interface, include)])\" -s
erlang halt").read().rstrip()
libpath = os.popen(ERLANGPATH + " -noshell -noinput -eval
\"io:format('~s~n', [code:lib_dir(erl_interface, lib)])\" -s erlang
halt").read().rstrip()
CFLAGS = [ '-I' + includedir ] # '-I' + rootdir + '/usr/include'
LDFLAGS = [ '-L' + libpath ]
#os.environ['LD_RUN_PATH'] = libpath
LIBS = [ '-lei' ] # [ '-lerl_interface', '-lei' ]
Please include it in uWSGI source. I left some comments which may be
useful if you decide to evolve this plugin some day.
Hope this helps. Cheers.
--
Pozdrawiam,
Łukasz Czuja
Programista / Analityk / Architekt IT
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi