[racket-users] Re: Problems when compiling Racket from source on ARM

2016-08-11 Thread Rene Schöne
> Follow these steps:
> - Remove the old git repo.
> - Delete every file installed by racket within ~/.local.
> - rm -rf "~/.racket/6.*"
> - mkdir -p "~/.local/bin"
> - export PATH="$PATH:~/.local/bin"
> - git clone --depth 1 --single-branch 
> https://github.com/racket/racket.git racket-git
> - cd racket-git
> - copy the patch
> - patch -p1 -i racket-arm-unwind.patch
> - cd racket/src
> - ./configure --enable-shared --prefix="~/.local" --enable-libffi
> - make
> - make install
> - raco pkg install --auto main-distribution (or any other raco package)

Great, it worked. Many thanks again.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Problems when compiling Racket from source on ARM

2016-08-10 Thread Juan Francisco Cantero Hurtado

On 08/10/2016 01:01 PM, Rene Schöne wrote:

Am Mittwoch, 10. August 2016 03:50:41 UTC+2 schrieb Juan Francisco Cantero 
Hurtado:

On 08/08/16 17:17, Rene Schöne wrote:

Hello,

I am having problems when compiling (the newest version of) Racket from source 
on an ARM machine (a Cubieboard).
The only change I made to the Makefile in the top-level directory is to set

CONFIGURE_ARGS_qq = --enable-shared --prefix ~/.local

I need to compile from source, as I need Racket as a shared library (therefore 
the change in the Makefile).
However, the build process (running make in the top-level directory) fails with 
the following error, for which I can not find anything helpful when browsing 
the web for it:

make[7]: Entering directory '/home/pi/git/racket/racket/src/build/racket/gc2'
env XFORM_PRECOMP=yes ../racketcgc -G /home/pi/git/racket/build/config -cqu 
../../../racket/gc2/xform.rkt --setup . --depends --cpp "gcc -E -I./.. 
-I../../../racket/gc2/../include -g -O2   -DUSE_SENORA_GC   -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -DMZ_USES_SHARED_LIB "  --keep-lines -o xsrc/precomp.h 
../../../racket/gc2/precomp.c
Copying tree...
Copying /home/pi/git/racket/racket/src/racket/gc2/./xform-mod.rkt to 
xform-collects/xform/xform-mod.rkt
lt-racketcgc: ../../../racket/src/unwind/libunwind.c:2711: _ULARM_dwarf_search_unwind_table: 
Assertion `ip >= di->start_ip && ip < di->end_ip' failed.
Aborted
Makefile:201: recipe for target 'xsrc/precomp.h' failed
make[7]: *** [xsrc/precomp.h] Error 134
make[7]: Leaving directory '/home/pi/git/racket/racket/src/build/racket/gc2'

The full output is appended.
"uname -a" yields:
Linux black-pearl 4.1.12-hypriotos-v7+ #2 SMP PREEMPT Tue Nov 3 19:44:55 UTC 
2015 armv7l GNU/Linux

Does anyone have a solution at hand or can point me to one?
If any further information is needed, I am happy to provide it.


Try with the patch attached. Install also libffi and use "--enable-libffi".

Out of curiosity. What distro are you using?.


First, thanks for your quick answer, and to satisfy your curiosity: The machine 
runs HypriotOS, a debian-based distro built to use Docker. See 
http://blog.hypriot.com/about/

Your patch seemed to work: After manual applying (git somehow did not want to 
do it) the previous error disappeared.
However, the build still did not finished cleanly. It seems to me, that raco 
was not built correctly.
I had to change the Makefile to use the racket binary in ~/.local/bin instead 
of a missing one in $REPO/racket/bin/.
I rerun make, but there were more errors, such as a missing directory 
racket/etc (which I created manually -- strange it was not there) and finally 
the error leading me to my assumption about the broken raco:

```
make[1]: Entering directory '/home/pi/git/racket'
racket -G racket/etc -X racket/collects -N raco -l- raco pkg update --all 
--auto --no-setup --scope installation
raco: Unrecognized command: pkg
```

If I run just "raco help", there are no available commands:

```
$ racket -G racket/etc -X racket/collects -N raco -l- raco help
Usage: raco   ...  ...

Frequently used commands:

All available commands:

A command can be specified by an unambiguous prefix.
See `raco help ' for help on a command.
```

In case, it is helpful, I include the output of the first make.
Any suggestions?


Follow these steps:
- Remove the old git repo.
- Delete every file installed by racket within ~/.local.
- rm -rf "~/.racket/6.*"
- mkdir -p "~/.local/bin"
- export PATH="$PATH:~/.local/bin"
- git clone --depth 1 --single-branch 
https://github.com/racket/racket.git racket-git

- cd racket-git
- copy the patch
- patch -p1 -i racket-arm-unwind.patch
- cd racket/src
- ./configure --enable-shared --prefix="~/.local" --enable-libffi
- make
- make install
- raco pkg install --auto main-distribution (or any other raco package)


--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Problems when compiling Racket from source on ARM

2016-08-09 Thread Juan Francisco Cantero Hurtado

On 08/08/16 17:17, Rene Schöne wrote:

Hello,

I am having problems when compiling (the newest version of) Racket from source 
on an ARM machine (a Cubieboard).
The only change I made to the Makefile in the top-level directory is to set

CONFIGURE_ARGS_qq = --enable-shared --prefix ~/.local

I need to compile from source, as I need Racket as a shared library (therefore 
the change in the Makefile).
However, the build process (running make in the top-level directory) fails with 
the following error, for which I can not find anything helpful when browsing 
the web for it:

make[7]: Entering directory '/home/pi/git/racket/racket/src/build/racket/gc2'
env XFORM_PRECOMP=yes ../racketcgc -G /home/pi/git/racket/build/config -cqu 
../../../racket/gc2/xform.rkt --setup . --depends --cpp "gcc -E -I./.. 
-I../../../racket/gc2/../include -g -O2   -DUSE_SENORA_GC   -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -DMZ_USES_SHARED_LIB "  --keep-lines -o xsrc/precomp.h 
../../../racket/gc2/precomp.c
Copying tree...
Copying /home/pi/git/racket/racket/src/racket/gc2/./xform-mod.rkt to 
xform-collects/xform/xform-mod.rkt
lt-racketcgc: ../../../racket/src/unwind/libunwind.c:2711: _ULARM_dwarf_search_unwind_table: 
Assertion `ip >= di->start_ip && ip < di->end_ip' failed.
Aborted
Makefile:201: recipe for target 'xsrc/precomp.h' failed
make[7]: *** [xsrc/precomp.h] Error 134
make[7]: Leaving directory '/home/pi/git/racket/racket/src/build/racket/gc2'

The full output is appended.
"uname -a" yields:
Linux black-pearl 4.1.12-hypriotos-v7+ #2 SMP PREEMPT Tue Nov 3 19:44:55 UTC 
2015 armv7l GNU/Linux

Does anyone have a solution at hand or can point me to one?
If any further information is needed, I am happy to provide it.


Try with the patch attached. Install also libffi and use "--enable-libffi".

Out of curiosity. What distro are you using?.

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
diff --git a/racket/src/racket/sconfig.h b/racket/src/racket/sconfig.h
index ca5cce6..f80ef04 100644
--- a/racket/src/racket/sconfig.h
+++ b/racket/src/racket/sconfig.h
@@ -259,9 +259,6 @@
 #endif
 # if defined(__arm__)
 # define MZ_USE_JIT_ARM
-# ifndef __ANDROID__
-#  define MZ_USE_DWARF_LIBUNWIND
-# endif
 #endif
 
 #endif