On 12/04/2012, at 3:24 PM, john skaller wrote: > > On 12/04/2012, at 1:01 AM, ben wrote: > >> hi >> >> The webserver in /usr/local/bin/webserver respond to static html >> requests. But when I try to call a fdoc it crashes with the following >> message: >> > > Hmm .. that's weird. I just had the same problem on felix-lang.org. > Works fine on my Mac though.. > > This is probably a problem loading the plugins.
Ah.. it's config data. It's not supposed to need that. But when I added it I got a different error: ///////////////////////////////// skaller@felix:~/felix$ webserver Home=/home/skaller FlxHome=/home/skaller/.felix Flxconfig=/home/skaller/.felix/webserver.config webserver config data = C_PATH += /usr/include/c++/4.2.1 C_PATH += /usr/include/c++/4.2.1/x86_64-apple-darwin10 C_PATH += /usr/include/c++/4.4.3 C_PATH += /usr/include/c++/4.4.3/x86_64-linux-gnu C_PATH += /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include extension flx -> flx2html::xlat_felix extension flxh -> flx2html::xlat_felix extension c -> cpp2html::xlat_cpp extension cpp -> cpp2html::xlat_cpp extension cxx -> cpp2html::xlat_cpp extension h -> cpp2html::xlat_cpp extension hpp -> cpp2html::xlat_cpp extension fdoc -> fdoc2html::xlat_fdoc extension fpc -> fpc2html::xlat_fpc extension ml -> ocaml2html::xlat_ocaml extension mli -> ocaml2html::xlat_ocaml extension py -> py2html::xlat_py INSTALL_ROOT=/usr/local/lib/felix/felix-1.1.7dev FLX_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/lib') C_PATH=list('/usr/local/include', '/usr/include', '/usr/include/c++/4.2.1', '/usr/include/c++/4.2.1/x86_64-apple-darwin10', '/usr/include/c++/4.4.3', '/usr/include/c++/4.4.3/x86_64-linux-gnu', '/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include', '/usr/local/lib/felix/felix-1.1.7dev/lib/rtl') FLX_PKGCONFIG_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/config') FLX_WEBSERVER_PLUGIN_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/tools') FDOC_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/doc') DELAY=0.1 PORT=1234 Adding lib py2html Dynamic linkage error filename: py2html.so operation: dlopen what: py2html.so: cannot open shared object file: No such file or directory ////////////////////// Ok, so I tried this (on Linux): ///////////////////////////////// skaller@felix:~/felix$ LD_LIBRARY_PATH=/usr/local/lib webserver Home=/home/skaller FlxHome=/home/skaller/.felix Flxconfig=/home/skaller/.felix/webserver.config webserver config data = C_PATH += /usr/include/c++/4.2.1 C_PATH += /usr/include/c++/4.2.1/x86_64-apple-darwin10 C_PATH += /usr/include/c++/4.4.3 C_PATH += /usr/include/c++/4.4.3/x86_64-linux-gnu C_PATH += /usr/lib/gcc/x86_64-linux-gnu/4.4.3/include extension flx -> flx2html::xlat_felix extension flxh -> flx2html::xlat_felix extension c -> cpp2html::xlat_cpp extension cpp -> cpp2html::xlat_cpp extension cxx -> cpp2html::xlat_cpp extension h -> cpp2html::xlat_cpp extension hpp -> cpp2html::xlat_cpp extension fdoc -> fdoc2html::xlat_fdoc extension fpc -> fpc2html::xlat_fpc extension ml -> ocaml2html::xlat_ocaml extension mli -> ocaml2html::xlat_ocaml extension py -> py2html::xlat_py INSTALL_ROOT=/usr/local/lib/felix/felix-1.1.7dev FLX_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/lib') C_PATH=list('/usr/local/include', '/usr/include', '/usr/include/c++/4.2.1', '/usr/include/c++/4.2.1/x86_64-apple-darwin10', '/usr/include/c++/4.4.3', '/usr/include/c++/4.4.3/x86_64-linux-gnu', '/usr/lib/gcc/x86_64-linux-gnu/4.4.3/include', '/usr/local/lib/felix/felix-1.1.7dev/lib/rtl') FLX_PKGCONFIG_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/config') FLX_WEBSERVER_PLUGIN_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/tools') FDOC_PATH=list('/usr/local/lib/felix/felix-1.1.7dev/doc') DELAY=0.1 PORT=1234 Adding lib py2html Dynamic linkage error filename: py2html.so operation: dlopen what: libflx_pthread_dynamic.so: cannot open shared object file: No such file or directory ////////// That didn't work so I tried this: skaller@felix:~/felix$ LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/felix/felix-1.1.7dev/lib/rtl/ webserver and that actually works! So there are two problems: (1) I incorrectly assumed the default (builtin, hardcoded) config would work, but there's a bug, the plugins aren't included in the config at the point they need to be. Woops! (2) On Mac, /usr/local/lib is on the default search path for shared libraries. On Linux it isn't (at least on the Ubuntu install at Felix-lang.org). Adding LD_LIBRARY_PATH is required, however not just for the plugins, but also the Felix libraries, since the plugins depend on them. It's kinda-weird this works on my Mac WITHOUT DYLD_LIBRARY_PATH since the Felix libraries are still in /usr/lib/felix/felix-1.1.7dev/shlibs which is not on the search path. No idea why but I am guessing great EVIL: the dylibs are remembering the build/release/lib/rtl libs they were linked against, they're not linking against the installed ones at all. Oh yes. Its EVIL: I deleted the build and .. DELAY=0.1 PORT=1234 Adding lib py2html Dynamic linkage error filename: py2html.dylib operation: dlopen what: dlopen(py2html.dylib, 2): Library not loaded: build/release/lib/rtl/libflx_pthread_dynamic.dylib Referenced from: /usr/local/lib/py2html.dylib Reason: image not found Ok, I'll have to think how to fix this. Dynamic linkage is a pain! [Especially as the webserver itself is statically linked and probably already has the code from libflx_pthread linked in .. statically] -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language