Re: detach.lua broken after upgrade to lua 5.1

2006-05-18 Thread Norbert Tretkowski
* Matthieu Moy wrote:
> csant <[EMAIL PROTECTED]> writes:
> > detach.lua script got broken after switching to lua 5.1 in late darcs
> > pulls, with error
> > /usr/local/bin/ion3:
> > /home/csant/.ion3/default-session--0/detach.lua:192:  attempt
> > to call a table value
> 
> I have no time to fix this now, I'll probably do it when the snapshot
> arrives in Debian if no one did it before.

I just uploaded the new release to Debian experimental. The reason why
I choosed experimental instead of unstable is that most scripts fail
with lua 5.1. Until the package is available in the archive, you can
get it from here:

http://merkel.debian.org/~nobse/ion3/

Norbert


ion-3ds-20060519

2006-05-18 Thread Tuomo Valkonen

Some notable changes in this release include

 * Lua 5.1 is now required.

 * Framed transients on by default now. New binding context
   "WFrame.toplevel" and "WMPlex.toplevel" were added to allow
   for separate sets of bindings for nested transient frames and
   top-level frames. Some of the bindings in the default binding
   maps that are likely to be unwanted on transient frames were
   moved to this contexts. Old custom bindings will continue to
   work unless they modify the defaults by unbinding some of the
   moved bindings.

 * Pressing Mod1+K K in the default bindings now switches to any
   region with the "activity" flag set (indicated by the a box
   at a corner of the screen), if there's one, before cycling to
   previously active region. The same effect can be achieved in
   your custom bindings with

ioncore.activity_goto() or ioncore.goto_previous()

-- 
Tuomo


Re: detach.lua broken after upgrade to lua 5.1

2006-05-18 Thread Matthieu Moy
csant <[EMAIL PROTECTED]> writes:

> Hi,
>
> detach.lua script got broken after switching to lua 5.1 in late darcs
> pulls, with error
>   /usr/local/bin/ion3:
>   /home/csant/.ion3/default-session--0/detach.lua:192:  attempt
>   to call a table value

I have no time to fix this now, I'll probably do it when the snapshot
arrives in Debian if no one did it before.

-- 
Matthieu


Re: darcs snapshot building error with lua 5.1

2006-05-18 Thread Matthieu Moy
Tuomo Valkonen <[EMAIL PROTECTED]> writes:

> On 2006-05-18, csant <[EMAIL PROTECTED]> wrote:
>> Yes, that fixed it:
>
> Now I just need a darcs patch...

Here it is, sir :-)


New patches:

[Use -lm and -ldl in the test for -llua
[EMAIL PROTECTED] {
hunk ./configure.ac 247
+AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
+AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"], [])
hunk ./configure.ac 251
- [LUA_LIBS="$LUA_LIBS -llua$with_lua_suffix"],
+ [LUA_LIBS="$LUA_LIBS -llua$with_lua_suffix $lua_extra_libs"],
hunk ./configure.ac 254
- [$LUA_LIBS])
-AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"], [])
-AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
+ [$LUA_LIBS $lua_extra_libs])
}

Context:

[bugfix in lua 5.1 + other usefull checks
[EMAIL PROTECTED]
 The test for the liblua version was completely buggy. Sorry.
 
 Tests added for other headers:
 X11/SM/SMlib.h, X11/Xresource.h and libintl.h
 (with error messages pointing to the name of Debian packages)
 
 Test for xmessage (with a warning only, since ion can probably still
 work without xmessage)
 
 
] 
[Update configure.ac for lua 5.1
[EMAIL PROTECTED] 
[sigusr2
Sergej Pupykin <[EMAIL PROTECTED]>**20060516183934
 
 Allows to create lua hook for SIGUSR2.
 Can be usefull (for example) for status line changing from media player...
 
 Usage example:
  ioncore.get_hook("ioncore_sigusr2_hook"):add(
  function(reg)
  mod_statusbar.inform("status_name", "SIGUSR2 catched")
  mod_statusbar.update()
  end
  )
] 
[README etc. updates.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060516173216] 
[Fixed string.gsub issues with Lua 5.1.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060516172437
 
 Lua 5.0:
 "... If the value returned by this function is a string, then it is
 used as the replacement string; otherwise, the replacement string is the
 empty string."
 
 Lua 5.1:
 "If the value returned by the table query or by the function call is a string
 or a number, then it is used as the replacement string; otherwise, if it is
 false or nil, then there is no replacement (that is, the original match is
 kept in the string)."
 
] 
[Few more missing table-iteration changes.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060516162001] 
[lua5.1 incompatible changes
Etan Reisner <[EMAIL PROTECTED]>**20060324001923
 The _LOADED variable became package.loaded.
 The contents of lualib were merged into lua itself, so remove -llualib from the build line.
 Debian now uses pkg-config for the lua stuff not lua-config.
] 
[lua5.1 backwards compatible changes
Etan Reisner <[EMAIL PROTECTED]>**20060324000942
 Whether intentional or not lua 5.1 no longer allows
 tab={}
 for k,v in tab do
 ...
 end
 and requires
 for k,v in pairs(tab) do
 ...
 end
 instead.
] 
[Do not spew out stack traces all the time when warn() is called.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060506211848] 
[framed_transients is on by default now.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060426174917] 
[Added WFrame.toplevel and WMPlex.toplevel binding maps.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060426174521
 - These are not used by frames for transients.
 - Changed the default bindings accordingly.
] 
[Added toggle for showing tab numbers.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060422160831
 - WFrame:set_numbers with the usual 'set'/'unset'/'toggle' parametrisation.
] 
[Removed obsolete references to -i18n flag.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060420191909] 
[The frame_add_last option had been broken.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060413220508
 - Since switching to use of placeholders for initial management 
   setup, the flag was no longer checked.
] 
[Added stuff for accessing regions with activity/urgency bit set.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060402193647] 
[Extended Mod1+K K binding.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060402193345
 - Go to first region demanding attention or previously active region:
   "ioncore.activity_goto() or ioncore.goto_previous()".
] 
[Separated and cleaned up some stacking code from mod_floatws.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060401143807] 
[Changes in default_ws_type lookup.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060331181416] 
[Use SIZEPOLICY_FULL_BOUNDS for client windows in mplexes.
Tuomo Valkonen <[EMAIL PROTECTED]>**20060328201807
 - Needed to communicate available area for transients.
] 
[TAG ion-3ds-20060326
Tuomo Valkonen <[EMAIL PROTECTED]>**20060326093710] 
Patch bundle hash:
2bc8fda4d878d6b6313f4d1a08fddbdfc4b1c032

-- 
Matthieu


Re: darcs snapshot building error with lua 5.1

2006-05-18 Thread Tuomo Valkonen
On 2006-05-18, csant <[EMAIL PROTECTED]> wrote:
> Yes, that fixed it:

Now I just need a darcs patch...

-- 
Tuomo



Re: Lua 5.1 switch and the scripts repository

2006-05-18 Thread Tuomo Valkonen
On 2006-05-18, Jürgen Hötzel <[EMAIL PROTECTED]> wrote:
>>   for k, vin ipairs(table) do ... end.
>^^
> this is only for iterating arrays. You probably want
>
> for k, v in pairs(table) do ... end

Yes, that's what I meant.

-- 
Tuomo



Re: Lua 5.1 switch and the scripts repository

2006-05-18 Thread Jürgen Hötzel
On Thu, May 18, 2006 at 06:08:41PM +, Tuomo Valkonen wrote:
> Please notice that many of the scripts in the Ion scripts repository
> may have stopped working after the switch to Lua 5.1. They should
> be updated appropriately. The most important incompatibility is
> that the syntax
> 
>   for k, v in t do ... end
> 
> for iterating the table t is no longer supported. Instead, one 
> must explicitly use an iterator:
> 
>   for k, vin ipairs(table) do ... end.
   ^^
this is only for iterating arrays. You probably want

for k, v in pairs(table) do ... end

if you have arbitrary keys instead of ordered integer index keys (1,2,3...)

Jürgen





detach.lua broken after upgrade to lua 5.1

2006-05-18 Thread csant

Hi,

detach.lua script got broken after switching to lua 5.1 in late darcs  
pulls, with error
	/usr/local/bin/ion3: /home/csant/.ion3/default-session--0/detach.lua:192:  
attempt to call a table value



/c


Lua 5.1 switch and the scripts repository

2006-05-18 Thread Tuomo Valkonen
Please notice that many of the scripts in the Ion scripts repository
may have stopped working after the switch to Lua 5.1. They should
be updated appropriately. The most important incompatibility is
that the syntax

for k, v in t do ... end

for iterating the table t is no longer supported. Instead, one 
must explicitly use an iterator:

for k, vin ipairs(table) do ... end.

Other incompatibilities may be found in the Lua 5.1 manual at



-- 
Tuomo



Re: darcs snapshot building error with lua 5.1

2006-05-18 Thread csant
On Thu, 18 May 2006 10:03:01 +0200, Matthieu Moy <[EMAIL PROTECTED]>  
wrote:



csant <[EMAIL PROTECTED]> writes:


Still failing with the same error after applying the patch to a clean
tree  before running autoreconf.


Then, can you try this one (on a clean tree):

--- old-ion-3/configure.ac  2006-05-18 13:21:14.347139320 +0200
+++ new-ion-3/configure.ac  2006-05-18 13:21:14.400131264 +0200
@@ -244,14 +244,14 @@
 elif test "x$with_lua_prefix" != x; then
 LUA_LIBS="-L$with_lua_prefix/lib"
 fi
+AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
+AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"],  
[])

 AC_CHECK_LIB([lua$with_lua_suffix],
  [lua_call],
- [LUA_LIBS="$LUA_LIBS -llua$with_lua_suffix"],
+ [LUA_LIBS="$LUA_LIBS -llua$with_lua_suffix  
$lua_extra_libs"],
  [AC_MSG_ERROR([*** Can't find lua_call in  
lua$with_lua_suffix.
   *** Check for liblua installation or  
--with-lua-libraries or --with-lua-suffix options])],

- [$LUA_LIBS])
-AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"],  
[])

-AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
+ [$LUA_LIBS $lua_extra_libs])
 dnl }}}
dnl liblua_version {{{


Yes, that fixed it:
on a clean tree I configured and compiled without problem after applying  
the patch.



If it doesn't work, it'd be great if you can investigate a bit on your
side. AIUI, you need to add "-lm" to the command line compiling the
test (the one that appears here in config.log:
configure:5837: checking for lua_call in -llua5.1
configure:5867: gcc -o conftest -g -O2   conftest.c -llua5.1  -lm  >&5
configure:5873: $? = 0
)


It luckily worked :) I am not familiar with auto(re)conf stuff, and it  
might have take a while for me to work my way into it. Many thanks!


/c



--
[Quote]
I have measured out my life with coffee spoons;
~~~ T.S. Eliot


Re: darcs snapshot building error with lua 5.1

2006-05-18 Thread Tuomo Valkonen
On 2006-05-18 10:03 +0200, Matthieu Moy wrote:
> csant <[EMAIL PROTECTED]> writes:
> 
> > Still failing with the same error after applying the patch to a clean
> > tree  before running autoreconf.
> 
> Then, can you try this one (on a clean tree):

If you people can fix this issue, I'll make a new release.

-- 
Tuomo


Re: Can't compile ion

2006-05-18 Thread Tuomo Valkonen
On 2006-05-18, Clemence Magnien <[EMAIL PROTECTED]> wrote:
> Thanks for your help, I swithched back to lua 5.0 and this got me a
> lot further in the build, but both builds still fail unfortunately.

Seems like there's something terribly wrong with your system.
Neither of these prolems should have anything to do with Ion itself.

-- 
Tuomo



Re: Can't compile ion

2006-05-18 Thread Clemence Magnien
On Wed, May 17, 2006 at 05:22:04PM -0400, Etan Reisner wrote:
> lua 5.1 is new, ion only got support for it yesterday/today in the darcs 
> repository. To use the released versions you need a lua 5.0.x version.

Thanks for your help, I swithched back to lua 5.0 and this got me a
lot further in the build, but both builds still fail unfortunately.

ion-2-20040729 fails with
gcc ion.o -g -Os -o ion -Wl,--export-dynamic  ../ioncore/ioncore.a 
../luaextl/luaextl.a ../libtu/libtu.a -lm -L/usr/X11R6/lib -lX11 -lXext 
-lXinerama -L/usr/lib -llua -llualib -lltdl -Wl,--rpath -Wl,/usr/local/lib/ion 
-Wl,--rpath -Wl,/usr/lib
/usr/bin/ld: cannot find -lltdl

I suspect I set the LTDL_LIB flag wrong, but I do have /usr/lib/libltdl.so.3.1.4
and /usr/lib/libltdl.so.3 in /usr/lib.

As for ion ion-3ds-20060326, it fails with
gcc  ion-statusd.o exec.o extlrx.o exports.o  -g -Os  -L../../libmainloop 
-lmainloop -L../../libextl -lextl -L../../libtu -ltu -L/usr/lib -llua -llualib 
-ldl -lm -o ion-statusd/usr/bin/ld: ion-statusd: hidden symbol 
`__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) 
is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

As before, any help for compiling one or the other version would be greatly
appreciated.

Cheers,
Clemence

-- 
Ce qui se concoit bien s'exprime clairement.
-
http://clemence.magnien.free.fr/
Tel : 01 55 55 86 27


Re: darcs snapshot building error with lua 5.1

2006-05-18 Thread Matthieu Moy
csant <[EMAIL PROTECTED]> writes:

> Still failing with the same error after applying the patch to a clean
> tree  before running autoreconf.

Then, can you try this one (on a clean tree):

--- old-ion-3/configure.ac  2006-05-18 13:21:14.347139320 +0200
+++ new-ion-3/configure.ac  2006-05-18 13:21:14.400131264 +0200
@@ -244,14 +244,14 @@
 elif test "x$with_lua_prefix" != x; then
 LUA_LIBS="-L$with_lua_prefix/lib"
 fi
+AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
+AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"], [])
 AC_CHECK_LIB([lua$with_lua_suffix],
  [lua_call],
- [LUA_LIBS="$LUA_LIBS -llua$with_lua_suffix"],
+ [LUA_LIBS="$LUA_LIBS -llua$with_lua_suffix $lua_extra_libs"],
  [AC_MSG_ERROR([*** Can't find lua_call in lua$with_lua_suffix.
   *** Check for liblua installation or --with-lua-libraries or 
--with-lua-suffix options])],
- [$LUA_LIBS])
-AC_CHECK_LIB([dl], [dlopen], [lua_extra_libs="$lua_extra_libs -ldl"], [])
-AC_CHECK_LIB([m], [exp], [lua_extra_libs="$lua_extra_libs -lm"], [])
+ [$LUA_LIBS $lua_extra_libs])
 dnl }}}
 
 dnl liblua_version {{{



If it doesn't work, it'd be great if you can investigate a bit on your
side. AIUI, you need to add "-lm" to the command line compiling the
test (the one that appears here in config.log:
configure:5837: checking for lua_call in -llua5.1
configure:5867: gcc -o conftest -g -O2   conftest.c -llua5.1  -lm  >&5
configure:5873: $? = 0
)

Thanks a lot,

-- 
Matthieu