Reply
Thread Tools
Jef91's Avatar
Posts: 191 | Thanked: 129 times | Joined on Dec 2009 @ Bloomington, IL
#1
Alrighty - so in order to recompile a package for my N900 I first need clisp working in my scratchbox server. However I have been unable to get it setup thus far, I am getting the following message when I get to the configure part of the installation:
Code:
Configure findings:
  FFI:        no (user requested: default)
  readline:   yes (user requested: default)
  libsigsegv: no, consider installing GNU libsigsegv
./configure: libsigsegv was not detected, thus some features, such as
  generational garbage collection and
  stack overflow detection in interpreted Lisp code
cannot be provided.
Please do this:
  mkdir tools; cd tools; prefix=`pwd`/arm-unknown-linux-gnu
  wget http://ftp.gnu.org/pub/gnu/libsigsegv/libsigsegv-2.5.tar.gz
  tar xfz libsigsegv-2.5.tar.gz
  cd libsigsegv-2.5
  ./configure --prefix=${prefix} && make && make check && make install
  cd ../..
  ./configure --with-libsigsegv-prefix=${prefix} 
If you insist on building without libsigsegv, please pass
  --ignore-absence-of-libsigsegv
to this script:
  ./configure --ignore-absence-of-libsigsegv
However I have the package it claims is "missing" installed on my sandbox server:

Code:
[sbox-FREMANTLE_ARMEL: ~/maxima/clisp-2.44.1] > dpkg -l libsigsegv
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                      Version                   Description
+++-=========================-=========================-==================================================================
ii  libsigsegv                2.5-1                     <insert up to 60 chars description>
Ideas/suggestions?

~Jeff
 
Posts: 14 | Thanked: 21 times | Joined on Nov 2009 @ Moscow
#2
I've managed to build CLISP (with FFI support) on N900. It was very torturous experience involving learning ARM assembly, working around GCC miscompilations and unexpected optimizations, fighting bugs like accidental endianness switch, malloc+mprotect problems and so on, and so on. As far as I understand, CLISP's ARM support was done for RISC OS and it depends on its 26-bit calling convention (APCS-26). It worked on N8x0 by pure accident, and with newer kernel / libc on Fremantle it all went haywire. As of now, I have working CLISP, ASDF, SLIME. Most important libaries seem to work. I'm currently trying to get cl-gtk2 to work (as of now, it segfaults) to see whether ffcall still has any serious problems and to make a nice GUI demo. I'll prepare and distribute all necessary patches soon, but if you're in hurry, you can get my preliminary patch against clisp-2.48 here (didn't make the ffcall patch yet). BTW, there's little hope to get CLISP to run under qemu. You're better off using it on the device or under x86 scratchbox, where you can also use SBCL to have more comfortable development environment, if your code is portable enough. CLISP can be used later for deployment on the device.

Edit: don't waste your time even trying to build clisp under ARM scratchbox. Build it on the device with the patch linked from this message. You'll need to add SDK repository and free up some space in the root partition to be able to install gcc, binutils etc.
I repartitioned my device and moved /usr to eMMC in order to achieve this. There are also other approaches, see wiki.

Last edited by fionbio; 2010-01-18 at 13:25.
 
Posts: 48 | Thanked: 9 times | Joined on Jan 2010
#3
This is slightly off topic, but fionbio, I'm relatively new to the N900, and I would want to install SBCL on it. How will I do that? Any help would be greatly appreciated, sir.
 
Posts: 14 | Thanked: 21 times | Joined on Nov 2009 @ Moscow
#4
Originally Posted by ebzzry View Post
This is slightly off topic, but fionbio, I'm relatively new to the N900, and I would want to install SBCL on it. How will I do that? Any help would be greatly appreciated, sir.
Unfortunately right now it's impossible SBCL doesn't have a working ARM port. Here is an unfinished attempt by Alastair Bridgewater, but there's still a lot of work to be done to make it work and no one seems to be willing to do it. Maybe I'll take a stab at it someday as I did learn some ARM assembly while porting CLISP, but I don't quite believe in success. Another possibility is to try to port CCL instead, they say this may turn out to be easier...

In addition to patched CLISP, I think it should be possible to get ECL to work under Maemo. It seems that it became relatively modern CL implementaion, but as far as I understand it still has problems with unicode support, and in my case that means a great PITA with cyrillic letters.
 

The Following User Says Thank You to fionbio For This Useful Post:
Posts: 48 | Thanked: 9 times | Joined on Jan 2010
#5
Originally Posted by fionbio View Post
Unfortunately right now it's impossible SBCL doesn't have a working ARM port. Here is an unfinished attempt by Alastair Bridgewater, but there's still a lot of work to be done to make it work and no one seems to be willing to do it. Maybe I'll take a stab at it someday as I did learn some ARM assembly while porting CLISP, but I don't quite believe in success. Another possibility is to try to port CCL instead, they say this may turn out to be easier...
OK. One thing that caught my attention is being able to use SBCL under x86 scratchbox. Can you elaborate more on that?


Originally Posted by fionbio View Post
In addition to patched CLISP, I think it should be possible to get ECL to work under Maemo. It seems that it became relatively modern CL implementaion, but as far as I understand it still has problems with unicode support, and in my case that means a great PITA with cyrillic letters.
1- Where is this patched CLISP (and accompanying documentation, if any)?
2- Will ECL out of the box run on the N900?
 
Posts: 14 | Thanked: 21 times | Joined on Nov 2009 @ Moscow
#6
Originally Posted by ebzzry View Post
OK. One thing that caught my attention is being able to use SBCL under x86 scratchbox. Can you elaborate more on that?
I didn't try it yet, but I think CLISP should work out of the box on x86 scratchbox (it's just Linux on x86, after all) and then it should be possible to use it to build SBCL.

Originally Posted by ebzzry View Post
1- Where is this patched CLISP (and accompanying documentation, if any)?
Well, if you want a relatively easy to install CLISP package, you'll have to wait a few days until I make it, sorry, too busy right now I'll need to publish it along with all my latest patches so that I don't violate GPL in any way. As I've already mentioned,
here is the patch for clisp-2.48, but building it from sources is rather tedious.

2- Will ECL out of the box run on the N900?
I don't know, didn't try yet. There was an effort to make ECL work on iPhone and seems like some of the problems were ARM-related, so I'm not 100% sure there will be no problems with ECL on Maemo. Also I suspect that you'll have gcc on the device to be able to compile lisp code with ECL.
 

The Following 2 Users Say Thank You to fionbio For This Useful Post:
Posts: 48 | Thanked: 9 times | Joined on Jan 2010
#7
Originally Posted by fionbio View Post
I didn't try it yet, but I think CLISP should work out of the box on x86 scratchbox (it's just Linux on x86, after all) and then it should be possible to use it to build SBCL.
OK



Originally Posted by fionbio View Post
Well, if you want a relatively easy to install CLISP package, you'll have to wait a few days until I make it, sorry, too busy right now I'll need to publish it along with all my latest patches so that I don't violate GPL in any way. As I've already mentioned,
here is the patch for clisp-2.48, but building it from sources is rather tedious.
OK. I'll keep a close watch on that.



Originally Posted by fionbio View Post
I don't know, didn't try yet. There was an effort to make ECL work on iPhone and seems like some of the problems were ARM-related, so I'm not 100% sure there will be no problems with ECL on Maemo. Also I suspect that you'll have gcc on the device to be able to compile lisp code with ECL.
Thanks for the tips. I'm very excited to have CL on the N900. I'll watch this thread for updates.
 
Jef91's Avatar
Posts: 191 | Thanked: 129 times | Joined on Dec 2009 @ Bloomington, IL
#8
Originally Posted by fionbio View Post
Well, if you want a relatively easy to install CLISP package, you'll have to wait a few days until I make it
Waiting eagerly! I've been tearing my hair out trying to get clisp recompiled for armel :-/

~Jeff
 
Posts: 14 | Thanked: 21 times | Joined on Nov 2009 @ Moscow
#9
I've posted what I've achieved so far here. No debs yet, sorry, only binaries in .tar.gz, still need some debugging to do to make FFI work properly in debian configuration...
 
Posts: 48 | Thanked: 9 times | Joined on Jan 2010
#10
Originally Posted by fionbio View Post
I've posted what I've achieved so far here. No debs yet, sorry, only binaries in .tar.gz, still need some debugging to do to make FFI work properly in debian configuration...
Wow! Can't wait to have the debs! :-)
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 18:48.