#797053 [PATCH] Always build with -pthread

Package:
lua5.1
Source:
lua5.1
Description:
Simple, extensible, embeddable programming language
Submitter:
"Meskanen, Vesa"
Date:
2015-08-29 18:48:05 UTC
Severity:
normal
#797053#5
Date:
2015-08-27 12:04:48 UTC
From:
To:
Dear Maintainer,

A multithreaded server where each thread uses its own lua state to run lua code crashes during socket IO/http calls via lua-socket version 3.0~rc1-3.  Crashes do not occur if I use my own lua compilation with -pthread flag. There seems to be some discussion about this topic in the internet, for example: https://lwn.net/Articles/654762/  .

Therefore I request that lua would be built with the -pthread flag in upcoming package versions.

Several other well known scripting languages such as Python, Perl and Ruby  are compiled with -pthread to allow safe multithreading.

A suggested pacth from diff:
---
 debian/rules | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 6b17acb..f800c54 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,9 +20,8 @@ DOC_DIR = debian/$(LUA)-doc/usr/share/doc/$(LUA)-doc
 LUA_MULTIARCH_INCLUDE = $(DEB_DESTDIR)/include/$(DEB_HOST_MULTIARCH)/
 LUA_MULTIARCH = lua5.1-deb-multiarch.h

#797053#8
Date:
2015-08-29 18:45:40 UTC
From:
To:
Control: reassign -1 lua5.1 5.1.5-7.1