~alpine/devel

2 2

[alpine-devel] haserl on x86_64

Juraj Šujan <sujan@sofy.sk>
Details
Message ID
<4D2C6BA8.3070005@sofy.sk>
Sender timestamp
1294756776
DKIM signature
missing
Download raw message
Hi everyone,

I tried x86_64 edge version of Alpine Linux (btw. thanks a lot for this 
great distro!) on my home server and went into problems with ACF. I read 
instructions on wiki, installed it and run mini_httpd, but in my browser 
only this error message appeared:

Error passing the lua library to the lua vm: luascript.lua: bad header 
in precompiled chunk

After much struggle I realised, that problem is in haserl package and 
more specifically in lua chunk, which is inserted into haserl binary. In 
haserl sources, there is a file called haserl_lualib.inc, precompiled 
(probably) for x86 architecture, which is inserted into haserl as is, 
not recompiled by automake process. Obviously, this could cause problems 
on other architectures, such as x86_64.

After little searching I found a solution, looks like maintainer of 
haserl knows about this (or similar) issue, because he has included some 
hints into source files and Makefile. This is from Makefile:

haserl_lualib.inc : haserl_lualib.lua
         @echo '-----------------------------------------------------'
         @echo 'Whoops.   haserl_lualib.inc is old.  You will need'
         @echo 'to compile lua2c by hand, or help the maintainer'
         @echo 'get automake to do it for you.'
         @echo ''
         @echo 'For now, to compile lua2c:'
         @echo ''
         @echo 'gcc -I<luaheaderdir> -Wl,-E -L<lualibdir> -o lua2c 
lua2c.c -llua -ldl -lm'
         @echo ''
         @echo ''
         @echo 'Then follow the instructions in lua2c.c to create a'
         @echo 'new haserl_lualib.inc'
         @echo ''
         @echo 'Sorry.'
         @echo '-----------------------------------------------------'
         @exit 1

So I inserted some lines into haserl APKBUILD:

         ./configure --prefix=/usr --with-lua || return 1

        # inserted lines for recompiling problematic file haserl_lualib.inc
        cd src
        gcc -I/usr/include -Wl,-E -L/usr/lib -o lua2c lua2c.c -llua -ldl -lm
        luac -s -o foo haserl_lualib.lua
        ./lua2c haserl_lualib foo >haserl_lualib.inc
        cd ..

         make || return 1

After recompilation and installation of new package, haserl and ACF now 
works for me without any problem!

I don't know if anyone else has this issue, but I hope this will help 
someone.

Kind regards,

Juraj Šujan



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Juraj Šujan <sujan@sofy.sk>
Details
Message ID
<4D2C6CE0.40402@sofy.sk>
In-Reply-To
<4D2C6BA8.3070005@sofy.sk> (view parent)
Sender timestamp
1294757088
DKIM signature
missing
Download raw message
OMG, I have found now, that it is already on bug tracker, sorry about this.

Kind regards,

Juraj Šujan



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20110111180826.73f7e5cb@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<4D2C6CE0.40402@sofy.sk> (view parent)
Sender timestamp
1294765706
DKIM signature
missing
Download raw message
On Tue, 11 Jan 2011 15:44:48 +0100
Juraj Šujan <sujan@sofy.sk> wrote:

> OMG, I have found now, that it is already on bug tracker, sorry about
> this.

and we fixed that just the other day.

Thanks for thinking of us though. Taking time analyze the situation and
share it. Always appreciated.

Thanks!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)