You are not logged in.

#1 2008-02-22 21:42:47

cbertelli
Member
Registered: 2008-02-22
Posts: 10

[request] wordgrinder

Hello,
this is an interesting word processor for the console.
This is the home page:
http://wordgrinder.sourceforge.net/
The slogan is: "WordGrinder: a word processor for processing words"
which is in the same mood as "a simple lightweight linux distribution".
It's based on lua and requires the language and LuaFilesystem.
I couldn't build it myself due to errors I couldn't solve.
Carlo

Last edited by cbertelli (2008-02-22 21:44:14)

Offline

#2 2008-02-23 12:52:16

Raisuli
Member
Registered: 2007-09-28
Posts: 135

Re: [request] wordgrinder

I would like to second this request. Sounds like a very interesting project.

Offline

#3 2008-02-23 14:04:17

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

Hello,

there are some errors in th c-code I think.

gcc "-Wall" "-Os"  "-I/usr/include/ncursesw" "-I/usr/include/lua5.1" "-D_XOPEN_SOURCE_EXTENDED" "-D_XOPEN_SOURCE" "-DVERSION=\"0.2\"" "-DFILEFORMAT=2" "-DPREFIX=\"$startdir/pkg/usr\"" "-DNDEBUG"  -c -o ".pm-cache/1-utils.o" "src/c/utils.c"
In file included from src/c/utils.c:9:
src/c/globals.h:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'readu8'
src/c/globals.h:51: error: expected declaration specifiers or '...' before 'wint_t'
src/c/utils.c:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'readu8'
src/c/utils.c:60: error: expected declaration specifiers or '...' before 'wint_t'
src/c/utils.c: In function 'writeu8':
src/c/utils.c:64: error: 'ch' undeclared (first use in this function)
src/c/utils.c:64: error: (Each undeclared identifier is reported only once
src/c/utils.c:64: error: for each function it appears in.)
src/c/utils.c: In function 'readu8_cb':
src/c/utils.c:94: error: 'wint_t' undeclared (first use in this function)
src/c/utils.c:94: error: expected ';' before 'c'
src/c/utils.c:99: error: 'c' undeclared (first use in this function)
src/c/utils.c:99: warning: implicit declaration of function 'readu8'
src/c/utils.c: In function 'writeu8_cb':
src/c/utils.c:107: error: 'wint_t' undeclared (first use in this function)
src/c/utils.c:107: error: expected ';' before 'c'
src/c/utils.c:111: error: 'c' undeclared (first use in this function)
src/c/utils.c:111: error: too many arguments to function 'writeu8'
rm -f ".pm-cache/1-utils.o"
pm: object 'cfile', defined at pmfile:71, failed to build with return code 256
==> ERROR: Build Failed.
    Aborting...

Offline

#4 2008-02-25 21:53:09

cbertelli
Member
Registered: 2008-02-22
Posts: 10

Re: [request] wordgrinder

These errors are corrected in a debian package that released a patch:
http://ftp.de.debian.org/debian/pool/ma … -2.diff.gz
The diff file corrects most of the problems but lets in some "debianism" in the name of libraries and include files.
I was not able correct these.
BTW, to compile this package you need lua-filesystem which could be found in one of the optional repositories.

Offline

#5 2008-02-25 21:57:44

cbertelli
Member
Registered: 2008-02-22
Posts: 10

Re: [request] wordgrinder

Sorry, lua-filesystem is not in an optional repository, but in AUR:
http://aur.archlinux.org/packages.php?ID=13323

Offline

#6 2008-02-25 22:01:13

finferflu
Forum Fellow
From: Manchester, UK
Registered: 2007-06-21
Posts: 1,899
Website

Re: [request] wordgrinder

Wow! this is very cool! I don't like how CLI text editors handle plain text files. This one is quite interesting smile


Have you Syued today?
Free music for free people! | Earthlings

"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery

Offline

#7 2008-02-27 19:37:57

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

Hello

I still have a problem.

# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
# 
pkgname=wordgrinder  
pkgver=0.2
pkgrel=1 
pkgdesc="a word processor for processing words"
url="http://wordgrinder.sourceforge.net/"
arch=('i686')
license=('GPL')
depends=('luafilesystem')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2" \
"http://ftp.de.debian.org/debian/pool/main/w/wordgrinder/wordgrinder_0.2-2.diff.gz")
md5sums=('3ba1fd6f348e7cb16bb5b6f4c6b598a7' 'd7c4d407308eb85c6c76f07270f3fb20')
build() {
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 < ../${pkgname}_${pkgver}-2.diff || return 1
  sed -i 's/lua5.1/lua/g' pmfile
  ./pm || return 1
  ./pm install || return 1
}

The debian patches mentioned by cbertelli are applied, but  I got something new.

/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../liblua.so: undefined reference to `dlsym'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../liblua.so: undefined reference to `dlerror'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../liblua.so: undefined reference to `dlopen'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../liblua.so: undefined reference to `dlclose'
collect2: ld gab 1 als Ende-Status zurück
rm -f ".pm-cache/21-15-utils"
pm: object 'cprogram', defined at pmfile:70, failed to build with return code 256
==> FEHLER: Build fehlgeschlagen.
    Breche ab ...

This means nothing to me.

Offline

#8 2008-02-27 19:52:30

lman
Member
From: CZ
Registered: 2007-12-18
Posts: 255

Re: [request] wordgrinder

wow, that looks a bit like t602 on my first ms-dos computer big_smile I like it.

Last edited by lman (2008-02-27 19:52:41)

Offline

#9 2008-02-29 12:07:04

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

Any suggestions? I think some dependencys are mising, but I have no idea which.

Offline

#10 2008-03-01 08:02:55

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [request] wordgrinder

Following PKGBUILD works (currently only on x86_64). The problem here, I believe,  is with the lua i686 package. Submit bug report.

pkgname=wordgrinder  
pkgver=0.2
pkgrel=1 
pkgdesc="a word processor for processing words"
url="http://wordgrinder.sourceforge.net/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('luafilesystem')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2" \
"http://ftp.de.debian.org/debian/pool/main/w/wordgrinder/wordgrinder_0.2-2.diff.gz")
md5sums=('3ba1fd6f348e7cb16bb5b6f4c6b598a7' 'd7c4d407308eb85c6c76f07270f3fb20')
build() {
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 < ../${pkgname}_${pkgver}-2.diff || return 1
  sed -i 's/lua5.1/lua/g' pmfile
  sed -i "s|PREFIX = \"/usr\"|PREFIX = \"$startdir/pkg/usr\"|" pmfile

  ./pm || return 1
  ./pm install || return 1
}

Offline

#11 2008-03-01 12:06:29

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

I did so. Task 9729 in the bugtracker, if you like to follow.

Offline

#12 2008-05-17 08:50:06

juergen
Developer
From: Frankfurt/Germany
Registered: 2005-04-11
Posts: 48
Website

Re: [request] wordgrinder

Uh, yet onother build system written in Lua. Try this ugly sed patching. Lua needs dynamic linking
loader for loading C extensions on runtime...

pkgname=wordgrinder  
pkgver=0.2
pkgrel=1 
pkgdesc="a word processor for processing words"
url="http://wordgrinder.sourceforge.net/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('luafilesystem')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2" \
"http://ftp.de.debian.org/debian/pool/main/w/wordgrinder/wordgrinder_0.2-2.diff.gz")
md5sums=('3ba1fd6f348e7cb16bb5b6f4c6b598a7' 'd7c4d407308eb85c6c76f07270f3fb20')
build() {
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 < ../${pkgname}_${pkgver}-2.diff || return 1
  sed -i 's/lua5.1/lua/g' pmfile
  sed -i "s|PREFIX = \"/usr\"|PREFIX = \"$startdir/pkg/usr\"|" pmfile
  sed -i 's/^CLINKFLAGS = EMPTY/CLINKFLAGS={"-ldl"}/' c.pm

  ./pm || return 1
  ./pm install || return 1
}

Offline

#13 2008-05-17 09:00:14

juergen
Developer
From: Frankfurt/Germany
Registered: 2005-04-11
Posts: 48
Website

Re: [request] wordgrinder

Forget my previous post. The dl dependency should be part of liblua.so. 5.1.3-3 will be out soon...

Offline

#14 2008-05-17 11:23:49

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

The build system seems to be not only ugly but unusable.
I get

[haawda@bertrand wordgrinder]$ wordgrinder
Lua error: ...by_me/wordgrinder/pkg/usr/share/wordgrinder/main.lua:16: module 'lfs' not found:
    no field package.preload['lfs']
    no file './lfs.lua'
    no file '/usr/share/lua/5.1/lfs.lua'
    no file '/usr/share/lua/5.1/lfs/init.lua'
    no file '/usr/lib/lua/5.1/lfs.lua'
    no file '/usr/lib/lua/5.1/lfs/init.lua'
    no file './lfs.so'
    no file '/usr/lib/lua/5.1/lfs.so'
    no file '/usr/lib/lua/5.1/loadall.so'
stack traceback:
    [C]: in function 'require'
    ...by_me/wordgrinder/pkg/usr/share/wordgrinder/main.lua:16: in main chunk

so the build system builds binaries that search for their files in the build directory.

Offline

#15 2008-05-17 13:54:24

juergen
Developer
From: Frankfurt/Germany
Registered: 2005-04-11
Posts: 48
Website

Re: [request] wordgrinder

You forgot to install luafilesystem?

Offline

#16 2008-05-17 14:12:49

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

That was my first guess too, but, no, it is installed.

I tried to move the line

sed -i "s|PREFIX = \"/usr\"|PREFIX = \"$startdir/pkg/usr\"|" pmfile

between the two ./pm lines, without success.

Offline

#17 2008-05-17 14:17:57

juergen
Developer
From: Frankfurt/Germany
Registered: 2005-04-11
Posts: 48
Website

Re: [request] wordgrinder

This must be a problem with your luafilesystem installation:

Stefan Husmann wrote:
[haawda@bertrand wordgrinder]$ wordgrinder
....
    no file '/usr/lib/lua/5.1/lfs.so'
...

If you installaed luafilesystem from AUR:

bash-3.2$ pacman -Qo /usr/lib/lua/5.1/lfs.so
/usr/lib/lua/5.1/lfs.so ist in luafilesystem 1.3.0-1 enthalten

Offline

#18 2008-05-17 14:27:03

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: [request] wordgrinder

Backspace does not seem to work with this program. Is this a "feature"?

Offline

#19 2008-05-17 16:27:04

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

juergen wrote:

This must be a problem with your luafilesystem installation:

Stefan Husmann wrote:
[haawda@bertrand wordgrinder]$ wordgrinder
....
    no file '/usr/lib/lua/5.1/lfs.so'
...

If you installaed luafilesystem from AUR:

bash-3.2$ pacman -Qo /usr/lib/lua/5.1/lfs.so
/usr/lib/lua/5.1/lfs.so ist in luafilesystem 1.3.0-1 enthalten

You are right. I had a release 1.4.1, installed with a PKGBUILD, and that package was broken.  Downgrading helped.

Ashren wrote:

Backspace does not seem to work with this program. Is this a "feature"?

Same here. And it is imho a bug, since the Navigation menu tells us, it shoud be the case that Backspace deletes a charakter.

Last edited by Stefan Husmann (2008-05-17 16:33:39)

Offline

#20 2008-05-18 07:39:28

angvp
Forum Fellow
From: Buenos Aires, Argentina
Registered: 2008-05-15
Posts: 32
Website

Re: [request] wordgrinder

What about this:

Extracted from the main page of wordgrinder:

WordGrinder is distributed as source. It's written in a combination of C and Lua. This means you have to have Lua installed if you want to use it. It also makes extensive use of Unicode, which means you'll need a Unicode-aware version of ncurses. Full instructions are included in the README, but you may (depending on whether your OS has them packaged for you) need to compile the following packages:

    * Lua 5.1
    * LuaFileSystem 1.2

Debian and Ubuntu have all the necessary requirements pre-packaged. (That's what the author wrote it on.)

i think that lua must be in the dependencies array ;-)

Offline

#21 2008-05-18 09:07:43

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: [request] wordgrinder

No. luafilesystem depends on lua, so the lua dependency is already fulfilled.

Offline

Board footer

Powered by FluxBB