lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The problem is that not all variants of pthread have pthread_setname_np, but I don't know how to detect that situation for all possible configurations.
Among others, Debian doesn't have it, but how do I know that Lanes is built with Debian?
I just don't want to jump through the autoconf hoops...

2012/11/23 "Гришин В.С." <Vladislav.Grishin@vts24.ru>

# lua test_lane.lua
2       4
Segmentation fault

# luarocks remove lanes
Checking stability of dependencies on the absence of
lanes 3.1.6-2...

Removing lanes 3.1.6-2...
Removal successful.

# luarocks install lanes
...

run script again

# lua test_lane.lua
lua: error loading module 'lanes.core' from file '/usr/local/lib/lua/5.1/lanes/core.so':
        /usr/local/lib/lua/5.1/lanes/core.so: undefined symbol: pthread_setname_np
stack traceback:
        [C]: ?
        [C]: in function 'require'
        /usr/local/share/lua/5.1/lanes.lua:116: in function 'configure'
        test_lane.lua:1: in main chunk
        [C]: ?


Vladislav

21.11.2012 12:01, Benoit Germain пишет:
Yeah I know, another fix is in the pipe (it is issue #16).
I should be able to commit a fix this evening.

2012/11/21 "Гришин В.С." <Vladislav.Grishin@vts24.ru>
Hi,

The bug disappeared. Thanks.

But!

After start of a script which is taken from an example there is a mistake

#lua test_lane.lua
2       4
Segmentation fault   <-------!!!ERROR!!!


#cat test_lane.lua


local lanes = require "lanes".configure()
f = lanes.gen( function( n) return 2 * n end)
a = f( 1)
b = f( 2)
print( a[1], b[1] )     -- 2    4


Vladislav


20.11.2012 20:36, Hisham пишет:

Hi,

I tested the fix from #38 and the module loads fine on Linux. I
uploaded a new revision of the rockspec.

Vladislav, please remove the old version ("luarocks remove lanes") and
try again.

Thanks for the report,

-- Hisham
http://hisham.hm/

On Tue, Nov 20, 2012 at 1:15 PM, "Гришин В.С."
<Vladislav.Grishin@vts24.ru> wrote:
How much is the time it is required for mistake correction?

Vladislav

20.11.2012 18:02, Benoit Germain пишет:

Hi,

I believe it is a bug in the rockpec that forgets to tell the build
subsystem to link against pthread. See issue #38.

2012/11/20 "Гришин В.С." <Vladislav.Grishin@vts24.ru>
Hi, I installed on my system with CentOS5.8 lua,luarocks

http://www.lua.org/ftp/lua-5.1.5.tar.gz
http://luarocks.org/releases/luarocks-2.0.12.tar.gz


By luarocks I installed lanes 3.1.6-1

without any errors !!!

But I run from lua console a following commands (from example Lua Lanes)
and get error

[root@storage2 src]# lua
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
local lanes = require "lanes".configure()
error loading module 'lanes.core' from file
'/usr/local/lib/lua/5.1/lanes/core.so':
         /usr/local/lib/lua/5.1/lanes/core.so: undefined symbol:
pthread_mutexattr_settype
stack traceback:
         [C]: ?
         [C]: in function 'require'
         /usr/local/share/lua/5.1/lanes.lua:58: in function 'configure'
         stdin:1: in main chunk
         [C]: ?
local lanes = require "lanes"
lanes.configure()
stdin:1: attempt to index global 'lanes' (a nil value)
stack traceback:
         stdin:1: in main chunk
         [C]: ?

what did I make not correctly?


Please help.



Vladislav







--
Benoit.







--
Benoit.






--
Benoit.