[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] GSL Shell new beta release with anti-gran graphics module
- From: Sam Roberts <vieuxtech@...>
- Date: Thu, 3 Dec 2009 16:01:53 -0800
On Thu, Dec 3, 2009 at 1:58 PM, Francesco Abbate <firstname.lastname@example.org> wrote:
> 2009/12/3 Sam Roberts <email@example.com>:
>> Do you expect the gsl module to be useable independently of your
>> shell? The graphing capability in particular caught my attention.
> ENABLE_COMPLEX = yes
> BUILD_LUA_DLL = no
> To have a 100% orthodox GSL module you should build it by disable the
> complex number support and enable the build as a Lua DLL.
> Unfortunately if you disable complex numbers you will miss important
> submodules like FFT but other functions will be available. I recommend
> anyway to enable at least support for complex numbers.
Sorry, I've had lots of problems with LNUM before. Maybe it's better,
now, but I'm no longer a fan of hacking the interpreter.
And we are thinking of moving to Mike Pall's JIT, I don't think LNUM
is going to work with it.
Would complex support with a more portable, userdata-based approach
(like http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lcomplex) be too,
There are some problems with the build system.
Empty strings are being passed on the g++ command line:
make DEFS='""' PLATFORM=linux -C agg-plot
make: Entering directory `/home/sroberts/s/gslshell/trunk/agg-plot'
echo g++ -O2 "" -I.. -I../lua/src -I../lua/etc -I/usr/include/agg2 -c cplot.cpp
g++ -O2 "" -I.. -I../lua/src -I../lua/etc -I/usr/include/agg2
-Wp,-MMD,.deps/cplot.pp -c cplot.cpp
Root cause is your call to recursive make doesn't work with an empty
SUBDIRS_DEFS, which occurs in "DLL" builds (maybe rename this to
"MODULE", btw). I did this to fix it:
--- Makefile (revision 35)
+++ Makefile (working copy)
@@ -64,6 +64,7 @@
CFLAGS += -fpic
DEFS += -DUSE_SEPARATE_NAMESPACE
TARGETS = $(LUA_DLL)
+ SUBDIRS_DEFS += -DNO_GSL_SHELL
SUBDIRS_DEFS += -DGSL_SHELL
TARGETS = $(GSL_SHELL)
Personally, I wouldn't use a recursive make system:
Troubleshooting this was made more painful by the use of "@" in the
Makefiles, because the echoed cmd line looked fine, but the real one
wasn't fine. I did this:
--- agg-plot/Makefile (revision 35)
+++ agg-plot/Makefile (working copy)
@@ -64,18 +64,17 @@
- @echo $(CXXCOMPILE) -c $<
- @$(CXXCOMPILE) -Wp,-MMD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
+ $(CXXCOMPILE) -Wp,-MMD,.deps/$(*F).pp -c $<
+ -cp .deps/$(*F).pp .deps/$(*F).P; \
tr ' ' '\012' < .deps/$(*F).pp \
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
>> .deps/$(*F).P; \
Also, there is an architecture assumption. I think better by default
not to assume architecture, let people add extra optimization flags if
they want to:
--- lua/src/Makefile (revision 35)
+++ lua/src/Makefile (working copy)
@@ -7,7 +7,7 @@
# Your platform. See PLATS for possible values.
PLATFORM = none
-CC= gcc --std=c99 -march=i586
+CC= gcc --std=c99
CFLAGS= -g $(DEFS) $(MYCFLAGS)
AR= ar rcu
And at the end I got this:
% lua -l gsl
lua: error loading module 'gsl' from file './gsl.so':
./gsl.so: undefined symbol: xwin_thread_function
No time to look further right now.
> There is also the higher file 'igsl.lua' that gives access to some
> basic facilities functions and it does depends on the |x| syntax. This
> shouldn't be a problem because this module's purpose is to serve the
> final user in the interactive shell and it is not needed to have
> access to core GSL functionalities.