Ron Hudson | 1 Dec 2003 01:18
Favicon

trouble updating a lua 4.0 program to run with lua 5.0

Ok, I am re-writing my lua startrek program to run under 5.0

$lua trek.lua

several seconds wait  - then

$

no output.
Changed all the write(  to io.write(

the program should not exit by itself either...

any general hints to find out what exactly is going on inside.

I have added io.write( at several places - still no output
no error messages or anything.

Roberto Ierusalimschy | 1 Dec 2003 13:59
Picon
Picon

gcc 3.2.2


There are some reports of problems when compiling Lua with gcc 3.2.2.
Does anyone have any experience using Lua with gcc 3.2.2 (or higher
versions)?

-- Roberto

Daniel Silverstone | 1 Dec 2003 14:20
Favicon
Gravatar

Re: gcc 3.2.2

On Mon, 2003-12-01 at 12:59, Roberto Ierusalimschy wrote:
> There are some reports of problems when compiling Lua with gcc 3.2.2.
> Does anyone have any experience using Lua with gcc 3.2.2 (or higher
> versions)?

Debian Lua packages are compiled with Gcc 3.3.2 and they're pretty much
okay.

There are some warnings, but nothing terrible

D.

--

-- 
Daniel Silverstone                       http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler: Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org       KeyId: 20687895

Reuben Thomas | 1 Dec 2003 14:23
Gravatar

Re: gcc 3.2.2

> There are some reports of problems when compiling Lua with gcc 3.2.2.
> Does anyone have any experience using Lua with gcc 3.2.2 (or higher
> versions)?

I used GCC 3.2.2 on RedHat 9; you know about my problems in detail (when
using dynamic linking I get hard to isolate crashes from trivial scripts).

I find that loading libraries (of my own) dynamically during execution
works fine.

I haven't yet tried rebuilding using GCC 3.3.2 on Fedora Core 1.

--

-- 
http://www.mupsych.org/~rrt/
C++, n.  an octopus made by nailing extra legs onto a dog (Anon)

Steve Elkins | 1 Dec 2003 14:32

Re: gcc 3.2.2

On Mon, 01 Dec 2003 10:59:24 -0200
Roberto Ierusalimschy <roberto <at> inf.puc-rio.br> wrote:

> There are some reports of problems when compiling Lua with gcc 3.2.2.

What kind of problems?

> Does anyone have any experience using Lua with gcc 3.2.2 (or higher
> versions)?

I use 3.2.2 routinely without seeing any problems but maybe I'm not 
paying close enough attention.

What should I be watching?

Thanks,
Steve

Zdenek Stangl | 1 Dec 2003 14:37

RE: gcc 3.2.2

gcc 3.2.x is modified to be ISO C++ compliant. For mor info try to look here http://www.redhat.com/advice/speaks_gcc.html

Zdenek.

-----Original Message-----
From: Roberto Ierusalimschy [mailto:roberto <at> inf.puc-rio.br]
Sent: Monday, December 01, 2003 1:59 PM
To: Lua discussion list
Subject: gcc 3.2.2

There are some reports of problems when compiling Lua with gcc 3.2.2.
Does anyone have any experience using Lua with gcc 3.2.2 (or higher
versions)?

-- Roberto

Roberto Ierusalimschy | 1 Dec 2003 15:11
Picon
Picon

Re: gcc 3.2.2

> What kind of problems?

Unexplained "seg. faults" with some simple tests.

In one machine it seems that the cause is the one Reuben has reported
about dynamic linking. (I forgot that his problem was with this version
of gcc.) The other machine uses static linking, but it is an Itanium CPU,
so maybe the problem is not directly related to gcc 3.2.2. (So the next
question would be about experience with Lua 5.0 in an Itanium machine ;)

-- Roberto

Daniel Silverstone | 1 Dec 2003 15:24
Favicon
Gravatar

Re: gcc 3.2.2

On Mon, 2003-12-01 at 14:11, Roberto Ierusalimschy wrote:
> > What kind of problems?
> Unexplained "seg. faults" with some simple tests.

Could you give an example of a test which segfaults? I have a friend
with an ia64 box and I can get him to help me diagnose if Debian has
these problems.

Debian's Lua is compiled with shared objects and seems to work on every
platform Debian compiles for.

D.

--

-- 
Daniel Silverstone                       http://www.digital-scurf.org/
Hostmaster, Webmaster, and Chief Code Wibbler: Digital-Scurf Unlimited
GPG Public key available from keyring.debian.org       KeyId: 20687895

Reyn Vlietstra | 1 Dec 2003 17:46
Picon

Re: gcc 3.2.2

Hello.

a friend of mine had a problem like that(seg faults with simple tests).
He was using the dynamic library, the matter was apparently resolved
when he added -fpic (to the makefile), it might have been a
misconfiguration, but took a while to track down and fix. 
Funny things is that it worked when ran through valgrind.

I'm not sure what version of gcc he was using (prolly 3.3.2), but if 
he made a misconfiguration mistake, so could others.

Hope I'm not just blabbering ;)

On Mon, 2003-12-01 at 16:11, Roberto Ierusalimschy wrote:
> > What kind of problems?
> 
> Unexplained "seg. faults" with some simple tests.
> 
> In one machine it seems that the cause is the one Reuben has reported
> about dynamic linking. (I forgot that his problem was with this version
> of gcc.) The other machine uses static linking, but it is an Itanium CPU,
> so maybe the problem is not directly related to gcc 3.2.2. (So the next
> question would be about experience with Lua 5.0 in an Itanium machine ;)
> 
> -- Roberto
> 
> 
> ************************************************************
> Scanned by  <at> lantic IS Virus Control Service
> This message was scanned for viruses and dangerous content.
(Continue reading)

Gunnar Zötl | 1 Dec 2003 18:32
Picon

Re[2]: lua_load hook (was On the subject of Lua's grammar... --[[ ]])


RI> BTW, Lua 5.1 removes the restriction that you cannot call Lua from a
RI> reader. In particular it provides the "load" function in Lua, so it will
RI> be possible to write such hooks in Lua itself.

great news :-)

Gunnar


Gmane