Re: [code] Compiling TextAdept in CentOS

From: Gert Meulyzer <gert.att.gertm.eu>
Date: Tue, 10 Dec 2013 13:34:02 +0100

Hi again,

So I dove into the Makefile to see what could be going wrong and found the steps where the downloads failed.
There are some patch lines in there, so I executed those as well and tried to make again. (One for scintilla and one for lua.)
This time it worked, TextAdept compiled and then started without complaints.
I still don't know why it went wrong, but at least I have a working editor now.

Could it be that CentOS just has very old versions of gcc/make etc and that those don't work properly with the TextAdept make file?

GNU Make 3.81
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)

Gert

---- On Tue, 10 Dec 2013 08:10:18 +0100 Gert Meulyzer&lt;gert.att.gertm.eu&gt; wrote ----

Hi Mitchell,

I ran make deps, but a lot failed. I had to do a couple of the steps by hand because they failed.
It's possible that not everything was done correctly then.

Let me show you how I got in this situation:

$ unzip ~/Downloads/textadept-dcefcbb61eeb.zip
...
$ cd textadept-dcefcbb61eeb/src/
$ make deps
&lt;stuff happens until..&gt;

2013-12-10 08:03:13 (2.08 MB/s) - “scintilla334.tgz” saved [1120330/1120330]

mkdir scintilla &amp;&amp; tar xzf scintilla334.tgz?download -C scintilla &amp;&amp; mv scintilla/*/* scintilla
tar (child): scintilla334.tgz?download: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
make: *** [scintilla] Error 2

So now I have to do this manually:

$ tar xzf scintilla334.tgz -C scintilla &amp;&amp; mv scintilla/*/* scintilla

Then I run make deps again

$ make deps
&lt;stuff happens until..&gt;

2013-12-10 08:04:49 (378 KB/s) - “d71c63cdb776f7d25313f8fcd14f07512ba1f83e” saved [42565]

mkdir -p lua/src/lib/lfs &amp;&amp; unzip -d lua/src/lib/lfs d71c63cdb776f7d25313f8fcd14f07512ba1f83e.zip &amp;&amp; mv lua/src/lib/lfs/*/src/*.c lua/src/lib/lfs/*/src/*.h lua/src/lib/
unzip: cannot find or open d71c63cdb776f7d25313f8fcd14f07512ba1f83e.zip, d71c63cdb776f7d25313f8fcd14f07512ba1f83e.zip.zip or d71c63cdb776f7d25313f8fcd14f07512ba1f83e.zip.ZIP.
make: *** [lua/src/lib/lfs] Error 9

So again, I fix it manually:
$ unzip -d lua/src/lib/lfs d71c63cdb776f7d25313f8fcd14f07512ba1f83e &amp;&amp; mv lua/src/lib/lfs/*/src/*.c lua/src/lib/lfs/*/src/*.h lua/src/lib

now I run make deps again and it finished properly.

$ make
&lt;stuff happens until...&gt;

gcc -c -DLUA_USE_LINUX -Ilua/src lua/src/lib/lfs.c -o lfs.o
lua/src/lib/lfs.c:881: error: expected identifier or ‘(’ before ‘{’ token
lua/src/lib/lfs.c:882: error: expected identifier or ‘(’ before ‘{’ token
make: *** [lfs.o] Error 1

The code around line 881 is this:

#if LUA_VERSION_NUM &gt; 501
static void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l)
{
           luaL_newlib (L, l);
           lua_pushvalue (L, -1);
           lua_setglobal (L, libname);
}
#endif

Regards,

Gert Meulyzer

---- On Mon, 09 Dec 2013 20:03:47 +0100 Mitchell &lt;m.att.foicica.com&gt; wrote ----

Hi Gert,
 
On Mon, 9 Dec 2013, Gert Meulyzer wrote:
 
&gt; Hi,
&gt;
&gt; I'm trying to compile 7.1 on CentOS and am running into this error:
&gt;
&gt; &amp;lt;snip&amp;gt;
&gt; gcc -c -DLUA_USE_LINUX -Ilua/src lua/src/lib/lpeg.c -o lpeg.o
&gt; gcc -c -DLUA_USE_LINUX -Ilua/src lua/src/lib/lfs.c -o lfs.o
&gt; lua/src/lib/lfs.c:881: error: expected identifier or ‘(’ before ‘{’ token
&gt; lua/src/lib/lfs.c:882: error: expected identifier or ‘(’ before ‘{’ token
&gt; make: *** [lfs.o] Error 1
&gt;
&gt; Is this a known issue or am I doing something dumb?
 
I have not run into this issue. I presume that when you ran 'make deps'
first, the lfs patch succeeded? If so, please attach your lfs.c or at
least inline the code around those lines so I can examine it.
 
Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 10 Dec 2013 - 07:34:02 EST

This archive was generated by hypermail 2.2.0 : Wed 11 Dec 2013 - 06:49:47 EST