LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 01-04-2016, 07:00 AM   #1
lems
Member
 
Registered: May 2004
Distribution: BSD
Posts: 269

Rep: Reputation: 120Reputation: 120
compiling d/clisp on ARM (Raspberry Pi)


Hello,

in README_REMOVED_PACKAGES.TXT, I found the following note:

Code:
Package.........................Reason it was removed

...
  clisp                         Does not compile on ARM
...
However, there are patches for ARM in ArchLinuxARM's github repository:

https://github.com/archlinuxarm/PKGB...er/extra/clisp

I'm not sure what's the actual error, but on my Raspberry Pi B (512 MB RAM), I seem to be out of RAM or so?

Code:
make[1]: Leaving directory '/tmp/clisp-2.49/with-gcc-wall/po'
rm -rf data
mkdir data
cd data && ln -s ../../utils/unicode/UnicodeDataFull.txt .
cd data && ln -s ../../doc/Symbol-Table.text .
gcc -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -falign-functions=4 -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I.  -Wl,--export-dynamic spvw.o spvwtabf.o spvwtabs.o spvwtabo.o eval.o control.o encoding.o pathname.o stream.o socket.o io.o funarg.o array.o hashtabl.o list.o package.o record.o weak.o sequence.o charstrg.o debug.o error.o misc.o time.o predtype.o symbol.o lisparit.o i18n.o foreign.o unixaux.o built.o ariarm.o modules.o /usr/lib/libreadline.so -lncurses -ldl /usr/lib/libavcall.a /usr/lib/libcallback.a  -L/usr/lib -lsigsegv -L/usr/lib -lc libgnu_cl.a -o lisp.run
./lisp.run -B . -N locale -E UTF-8 -Epathname 1:1 -Emisc 1:1 -norc -m 2MW -lp ../src/ -x '(and (load "../src/init.lisp") (sys::saveinitmem) (ext::exit)) (ext::exit t)'
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2010

Type :h and hit Enter for context help.

;; Loading file ../src/defseq.lisp ...
;; Loaded file ../src/defseq.lisp
;; Loading file ../src/backquote.lisp ...
;; Loaded file ../src/backquote.lisp
*** - handle_fault error2 ! address = 0x4 not in [0x1a7f0000,0x1a7f0000) !
SIGSEGV cannot be cured. Fault address = 0x4.
GC count: 1
Space collected by GC: 0 0
Run time: 0 840000
Real time: 1 521904
GC time: 0 0
Permanently allocated: 90464 bytes.
Currently in use: 524228 bytes.
Free space: 60 bytes.
Makefile:1744: recipe for target 'interpreted.mem' failed
make: *** [interpreted.mem] Segmentation fault
It's unfortunate, since I seem to be able to run the clisp binary. When I run /tmp/clisp-2.49/with-gcc-wall/lisp.run, it seems to have been compiled fine:

Code:
nicolas:/home/lems$ /tmp/clisp-2.49/with-gcc-wall/lisp.run
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Welcome to GNU CLISP 2.49 (2010-07-07) <http://clisp.cons.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2010

Type :h and hit Enter for context help.


WARNING: No initialization file specified.
Please try: /tmp/clisp-2.49/with-gcc-wall/lisp.run -M lispinit.mem

WARNING: No installation directory specified.
Please try: /tmp/clisp-2.49/with-gcc-wall/lisp.run -B /usr/local/lib/clisp
> (+ 1 2 3)
6
> ^D
Bye.
I thought maybe the SlackwareARM devs (drmozes?) could try that clisp ARM patch, and provide a binary. Otherwise, I guess I have to look into cross-compilation or find an alternative Common Lisp implementation for ARM. So far, ecl did compile fine, and it might be enough for learning the basics of CL, which is what I wanted to do.

Anyway, maybe those patches are worth considering, maybe not. I was just wondering why ArchLinuxARM had a clisp package, and SlackwareARM did not.

lems

edit: Just for the record, I used the clisp SlackBuild from a Slackware x86_64 mirror, and just made the SlackBuild apply those two patches from ArchLinuxARM's github repository. Other than that, I did not change anything.

edit II: This seems to be the source of the patch: http://sourceforge.net/p/clisp/patches/33/

Last edited by lems; 01-04-2016 at 07:44 AM.
 
Old 01-05-2016, 09:01 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675

Rep: Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373Reputation: 1373
Quote:
Originally Posted by lems View Post
I thought maybe the SlackwareARM devs (drmozes?) could try that clisp ARM patch, and provide a binary. Otherwise, I guess I have to look into cross-compilation or find an alternative Common Lisp implementation for ARM. So far, ecl did compile fine, and it might be enough for learning the basics of CL, which is what I wanted to do.
I've tried many times to build clisp over the years, and have tried every patch anywhere both for clisp and ffcall.
I've grabbed the latest ffcall and clisp + patches from Fedora, and have now got clisp working!!

I usually tried 2-3 times a year to see if it built. I have seen other people with the same clisp issue on other architectures but never much of a resolution. It might be one of those things where you have the right set of headers, toolchain and library versions to make it just work -- cause I tried so many variants of things and nothing worked until now.
Thanks for prompting me to try it again.
 
Old 01-05-2016, 09:59 AM   #3
lems
Member
 
Registered: May 2004
Distribution: BSD
Posts: 269

Original Poster
Rep: Reputation: 120Reputation: 120
This is great news! It seems Fedora uses those two patches that Arch uses, too; but there are others I did not know about. Thanks a lot, Stuart!
 
Old 01-05-2016, 06:27 PM   #4
slacksam
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212

Rep: Reputation: 40
@lems:
On my RasPi 2 with Slackware-ARM-current, I now used the patch from sourceforge you posted, and it worked.

The steps were:
  • Downloading the clisp Slackbuild from the sources of -current
  • Downloading the patch from sourceforge
  • Adding the patch into line 112 of the Slackbuild like this:
Before
Code:
tar xvf $CWD/clisp-$VERSION.tar.?z* || exit 1
cd clisp-$DIRNAME || exit 1
chown -R root:root .
After
Code:
tar xvf $CWD/clisp-$VERSION.tar.?z* || exit 1
cd clisp-$DIRNAME || exit 1
patch -p1 --verbose  < $CWD/clisp-arm.patch || exit 1
chown -R root:root .
  • Starting the Slackbuild

Without the patch it didn't build.

Last edited by slacksam; 01-05-2016 at 06:32 PM.
 
1 members found this post helpful.
Old 01-06-2016, 04:52 AM   #5
lems
Member
 
Registered: May 2004
Distribution: BSD
Posts: 269

Original Poster
Rep: Reputation: 120Reputation: 120
@slacksam: Good to know it compiles on the RPI2, thanks. Seems like that extra RAM is helping? Now that Stuart kindly provided a clisp package for ARM, I tried, just for fun, to build sbcl from SlackBuilds.org. But I got a similar error:

Code:
/$f=./local-target-features.lisp-expr
//entering make-host-1.sh
//building cross-compiler, and doing first genesis
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Welcome to GNU CLISP 2.49+ (2010-07-17) <http://clisp.org/>

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2010

Type :h and hit Enter for context help.

5
;; Loading file src/cold/shared.lisp ...
;;  Loading file src/cold/read-from-file.lisp ...
;;  Loaded file src/cold/read-from-file.lisp
;;  Loading file src/cold/rename-package-carefully.lisp ...
;;  Loaded file src/cold/rename-package-carefully.lisp
;;  Loading file src/cold/with-stuff.lisp ...
;;  Loaded file src/cold/with-stuff.lisp
;;  Loading file src/cold/ansify.lisp ...
*** - handle_fault error2 ! address = 0x36a644e0 not in [0x19f80000,0x1a0f05dc) !
SIGSEGV cannot be cured. Fault address = 0x36a644e0.
GC count: 0
Space collected by GC: 0 0
Run time: 0 420000
Real time: 0 505693
GC time: 0 0
Permanently allocated: 94464 bytes.
Currently in use: 2607308 bytes.
Free space: 16 bytes.
make-host-1.sh: line 34:  2466 Segmentation fault      $SBCL_XC_HOST < make-host-1.lisp

+==============================================================================
| building development/sbcl failed
+==============================================================================
It compiled fine on my x86_64 desktop running -current. I succeeded in compiling openjdk using Alien BOB's SlackBuild on my RPI, though, so I'm able to use abcl, too. I'm glad I have clisp available, since it's also quite fast on my RPI, as opposed to the other two implementations I could use now: ecl (OK) and abcl (jvm; slower).

Last edited by lems; 01-06-2016 at 04:54 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware ARM 14.1 on a Raspberry Pi Exaga Slackware - Installation 2 11-17-2013 08:11 AM
compiling hello world C program for arm ARM926EJ-S rev 5 (v5l) with arm-linux-gnueabi golden_boy615 Linux - Embedded & Single-board computer 2 04-23-2013 10:30 AM
Issues compiling GCC v4.7.1 while building LFS for ARM (Raspberry Pi) jvilla1983 Linux From Scratch 7 12-25-2012 02:03 PM
Compiling and installing e17 on Slackware ARM 14 on Raspberry pi, hung on Lua Henesy Slackware 0 11-20-2012 12:28 AM
Compiling debian arm for NSLU2 - arm-linux-gnueabi-objdump not found ergosteur Linux - Kernel 3 10-30-2010 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration