Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-08 Thread Jeronimo Pellegrini
On Sat, Aug 07, 2010 at 03:27:22PM +0200, Alexander Burger wrote:
 Hi Jeronimo,

Hello!

 On Fri, Aug 06, 2010 at 09:57:36PM +0200, Alexander Burger wrote:
  Bingo! Now I can start 'pico' :)
 
 BTW: Perhaps using 'pico' for the name of the start script is a bit
 impractical. In fact, 'picolisp' was called 'pico' until a few years
 ago, but it conflicts with the editor of the same name (though picoLisp
 is probably older). I think it was Jon Kleiser who recommended to rename
 it. Since then, the executable is called 'picolisp' (as you have also on
 OpenWrt).
 
 For a short-cut startup script, I would recommend 'pil'. You have
 it also in OpenWrt, but it doesn't work:
 
r...@openwrt:/# pil
/usr/lib/picolisp/lib.l open: No such file or directory
 
 The reason is that the link /usr/lib/picolisp is not set.

Hmm, I see.

 In general, I would recommend to keep the binary in bin/ under the
 installation directory, and put a symbolic link to it in /usr/bin/,
 and a link to the installation directory in /usr/lib/picolisp (as
 described in INSTALL).
 
 Then 'pil' would work, and 'pico' would not be necessary.
 
 'pico-dbg' would also not be necessary, as it is (almost) the same as
 calling 'pil @dbg.l'.
 
 What do you think? Can this still be changed in OpenWrt?

I'm not sure if it would be OK for an OpenWRT package to have
executables outside /usr/bin, but I certainly can get things to
work so users can call pil and not pico.

I'll work on that later.

J.
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-08 Thread Alexander Burger
Hi Jeronimo,

 I'm not sure if it would be OK for an OpenWRT package to have
 executables outside /usr/bin, but I certainly can get things to
 work so users can call pil and not pico.

I understand.

/usr/bin/picolisp doesn't need to be a link then, just a 'mv' of the
binary to /usr/bin (as is already now the case) will do.

The second link, /usr/lib/picolisp, is no problem?

I should tell that the latter link has a double function: Besides
providing normal access to lib.l in /usr/lib/picolisp/, it is used
by the binary to locate its installation directory.

If these two entries exist, it is very convenient to write directly
executable picolisp scripts, by using

   #!/usr/bin/picolisp /usr/lib/picolisp/lib.l

as the first line (bin/pil is just an example for that). I would
imagine that especially in embedded systems this might be desirable.

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-07 Thread Alexander Burger
Hi Jeronimo,

On Fri, Aug 06, 2010 at 09:57:36PM +0200, Alexander Burger wrote:
 Bingo! Now I can start 'pico' :)

BTW: Perhaps using 'pico' for the name of the start script is a bit
impractical. In fact, 'picolisp' was called 'pico' until a few years
ago, but it conflicts with the editor of the same name (though picoLisp
is probably older). I think it was Jon Kleiser who recommended to rename
it. Since then, the executable is called 'picolisp' (as you have also on
OpenWrt).

For a short-cut startup script, I would recommend 'pil'. You have
it also in OpenWrt, but it doesn't work:

   r...@openwrt:/# pil
   /usr/lib/picolisp/lib.l open: No such file or directory

The reason is that the link /usr/lib/picolisp is not set.


In general, I would recommend to keep the binary in bin/ under the
installation directory, and put a symbolic link to it in /usr/bin/,
and a link to the installation directory in /usr/lib/picolisp (as
described in INSTALL).

Then 'pil' would work, and 'pico' would not be necessary.

'pico-dbg' would also not be necessary, as it is (almost) the same as
calling 'pil @dbg.l'.

What do you think? Can this still be changed in OpenWrt?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-06 Thread Alexander Burger
OK, now I hit the next problem: After unpacking picolisp-3.0.3-2.tar.gz
in trunk/ (resulting in package/picolisp/), configuring for
MIPS Malta CoreLV board (qemu), selecting M for picolisp
under Languages in menuconfig, I started

   $ make target/linux/clean world

This goes well until it begins to build picolisp. Then I get

   make[5]: Entering directory 
`/usr/abu/openwrt/trunk/build_dir/target-mipsel_r2_uClibc-0.9.30.1/picoLisp-3.0.3/src'
   mipsel-openwrt-linux-uclibc-gcc -o ../lib/ext -m32 -shared -export-dynamic 
ext.o 
   
/usr/abu/openwrt/trunk/staging_dir/toolchain-mipsel_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/bin/ld:
 ext.o: relocation R_MIPS_HI16 against `a local symbol' can not be used when 
making a shared object; recompile with -fPIC
   ext.o: could not read symbols: Bad value
   collect2: ld returned 1 exit status

What might be the reason?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-06 Thread Jeronimo Pellegrini
On Fri, Aug 06, 2010 at 11:38:31AM +0200, Alexander Burger wrote:
 Hi Jeronimo,

Hello Alex!

  Could you try
   make world V=99
  And tell me if you get the same error?
 
 I did that already to get the detailed error message in my last mail. I
 put the V=99 right after the 'make', though, not after 'world', but this
 should probably not make any difference.

Ah, OK. It seems that for the trunk and qemu target something is not
working. I'm sorry, I'll get that fixed.

Anyway, the backfire port works, so for real devices it's possible to
run PicoLisp. (I have it installed in my router and it's been working
fine for simple scripts).

J.

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-06 Thread Jeronimo Pellegrini
Hello,

The 3rd packaging seems to work fine. It looks like -fPIC
is really necessary for shared libraries on qemu/malta
(although not necessarily on the MIPS device, oddly), so
I included it in a patch.

Please try it and tell me if anything is broken!

J.

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-06 Thread Alexander Burger
Hi Jeronimo,

 The 3rd packaging seems to work fine. It looks like -fPIC

Yep, now 'make world' terminated successfully :)


However, though I configured 'picolisp' as M, I cannot find anything
like 'pico' or 'lisp' in the file system. Do I have to mount something?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-06 Thread Jeronimo Pellegrini
On Fri, Aug 06, 2010 at 07:04:49PM +0200, Alexander Burger wrote:
 Hi Jeronimo,

Hi Alex,

  The 3rd packaging seems to work fine. It looks like -fPIC
 
 Yep, now 'make world' terminated successfully :)
 
 However, though I configured 'picolisp' as M, I cannot find anything
 like 'pico' or 'lisp' in the file system. Do I have to mount something?

Isn't it at
 bin/malta/packages/picolisp_3.0.3-3_malta.ipk ?

J.
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-05 Thread Alexander Burger
Hi Jeronimo,

 This is a somewhat late[0] announcement of PicoLisp packages for
 OpenWRT.

Great! Thanks!


 There are also instructions on that page for running OpenWRT
 under qemu (which is useful for testing and staging).

Of course, I'd like to try it :) However, when I follow the advice

   $ make menuconfig
  (choose to build for malta;
   confgure packages)

I cannot find any target malta in the menu(s). What am I doing wrong?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-05 Thread Jeronimo Pellegrini
On Thu, Aug 05, 2010 at 03:49:55PM +0200, Alexander Burger wrote:
 Hi Jeronimo,

Hi Alex,

  There are also instructions on that page for running OpenWRT
  under qemu (which is useful for testing and staging).
 
 Of course, I'd like to try it :) However, when I follow the advice
 
$ make menuconfig
   (choose to build for malta;
confgure packages)
 
 I cannot find any target malta in the menu(s). What am I doing wrong?

Oh, you're probably using the backfire branch on the OpenWRT
subversion repository, right? The malta target is only available
in the trunk branch:

svn co svn://svn.openwrt.org/openwrt/trunk/

I'll update the instructions today.

J.
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-05 Thread Alexander Burger
Hi Jeronimo,

 Oh, you're probably using the backfire branch on the OpenWRT
 subversion repository, right? The malta target is only available
 in the trunk branch:
 
 svn co svn://svn.openwrt.org/openwrt/trunk/
 
 I'll update the instructions today.

The instructions seemed to be all right, as the above check-out
statement is there.

And, in fact, under trunk/target/linux I can find a malta/
directory. Perhaps I need to copy something manually first?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-05 Thread Jeronimo Pellegrini
On Thu, Aug 05, 2010 at 04:49:45PM +0200, Alexander Burger wrote:
 Hi Jeronimo,

Hello!

  Oh, you're probably using the backfire branch on the OpenWRT
  subversion repository, right? The malta target is only available
  in the trunk branch:
  
  svn co svn://svn.openwrt.org/openwrt/trunk/
  
  I'll update the instructions today.
 
 The instructions seemed to be all right, as the above check-out
 statement is there.
 
 And, in fact, under trunk/target/linux I can find a malta/
 directory. Perhaps I need to copy something manually first?

That's strange... When I do make menuconfig the malta option
for target system is there (MIPS Malta CoreLV board (qemu))
That menu is a long list and you have to scroll down to find this
option.
What options do you see in the menu?

J.
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: PicoLisp on wireless routers (with OpenWRT)

2010-08-05 Thread Alexander Burger
Hi Jeronimo,

 That's strange... When I do make menuconfig the malta option
 for target system is there (MIPS Malta CoreLV board (qemu))
 That menu is a long list and you have to scroll down to find this

Oh, uhh :-( It seems that I'm blind!

I was searching down the list, and somehow skipped the MI as I was
searching for Ma. Sorry for the confusion.

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe