Slackware - ARM This forum is for the discussion of Slackware ARM. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-04-2016, 07:00 AM
|
#1
|
Member
Registered: May 2004
Distribution: BSD
Posts: 269
Rep: 
|
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.
|
|
|
01-05-2016, 09:01 AM
|
#2
|
Slackware Contributor
Registered: Apr 2008
Distribution: Slackware
Posts: 1,675
|
Quote:
Originally Posted by lems
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.
|
|
|
01-05-2016, 09:59 AM
|
#3
|
Member
Registered: May 2004
Distribution: BSD
Posts: 269
Original Poster
Rep: 
|
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!
|
|
|
01-05-2016, 06:27 PM
|
#4
|
Member
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212
Rep:
|
@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 .
Without the patch it didn't build.
Last edited by slacksam; 01-05-2016 at 06:32 PM.
|
|
1 members found this post helpful.
|
01-06-2016, 04:52 AM
|
#5
|
Member
Registered: May 2004
Distribution: BSD
Posts: 269
Original Poster
Rep: 
|
@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.
|
|
|
All times are GMT -5. The time now is 10:27 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|