caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Native compiler on armel (arm-eabi)
@ 2010-05-24 19:48 Fabiano
  2010-05-24 20:06 ` [Caml-list] " Stéphane Glondu
  2010-05-24 20:12 ` Wojciech Meyer
  0 siblings, 2 replies; 3+ messages in thread
From: Fabiano @ 2010-05-24 19:48 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 6932 bytes --]

Hi,
 I have set up  two virtual machines: emulated arm-eabi(armel) and
oldabi(arm)
(Debian linux) using qemu (Aurelien Jarno's debian images :
http://blog.aurel32.net/?p=46 ) in order to compile arm binaries.

Compiling native code ocaml's compilers (make world.opt or make world;
make opt) works fine on oldabi (arm)etch but fails on the eabi (armel)
lenny's virtual machine.

I have downloaded the last ocaml 11.2 and untarred the archive.
compile commands:
./configure
make world;make opt

the configure output states that the platform is not supported by
native compiler but I have reminds about ocaml's native code compiler
supporting EABI platform.

QUESTION:
Am I right? Is ocaml able to generate native code on armel (arm eabi)?
In case, have you suggestions in order  to solve the issue?

Thanks in advance

I have attached the tail of "make opt" compilation and configure's output.
"make opt" compilation's tail:

ln -s ../byterun/custom.c custom.c
gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
custom.o custom.c
ln -s ../byterun/unix.c unix.c
gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
unix.o unix.c
gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
backtrace.o backtrace.c
gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
natdynlink.o natdynlink.c
gcc -c -DSYS_linux -o arm.o arm.S || \
        { echo "If your assembler produced syntax errors, it is
probably unhappy with the"; echo "preprocessor. Check your assembler,
or try producing arm.o by hand."; exit 2; }
arm.S: Assembler messages:
arm.S:21: Warning: ignoring attempt to redefine built-in register 'sp'
arm.S:22: Warning: ignoring attempt to redefine built-in register 'lr'
arm.S:23: Warning: ignoring attempt to redefine built-in register 'pc'
arm.S:114: Error: selected processor does not support `stfd f0,
[sp,#-8]!'
arm.S:115: Error: selected processor does not support `stfd f1,
[sp,#-8]!'
arm.S:116: Error: selected processor does not support `stfd f2,
[sp,#-8]!'
arm.S:117: Error: selected processor does not support `stfd f3,
[sp,#-8]!'
arm.S:127: Error: selected processor does not support `ldfd f4,
[sp],#8'
arm.S:128: Error: selected processor does not support `ldfd f5,
[sp],#8'
arm.S:129: Error: selected processor does not support `ldfd f6,
[sp],#8'
arm.S:130: Error: selected processor does not support `ldfd f7,
[sp],#8'
arm.S:186: Error: selected processor does not support `stfd f7,
[sp,#-8]!'
arm.S:187: Error: selected processor does not support `stfd f6,
[sp,#-8]!'
arm.S:188: Error: selected processor does not support `stfd f5,
[sp,#-8]!'
arm.S:189: Error: selected processor does not support `stfd f4,
[sp,#-8]!'
arm.S:242: Error: selected processor does not support `ldfd f4,
[sp],#8'
arm.S:243: Error: selected processor does not support `ldfd f5,
[sp],#8'
arm.S:244: Error: selected processor does not support `ldfd f6,
[sp],#8'
arm.S:245: Error: selected processor does not support `ldfd f7,
[sp],#8'
If your assembler produced syntax errors, it is probably unhappy with
the
preprocessor. Check your assembler, or try producing arm.o by hand.
make[2]: *** [arm.o] Error 2
make[2]: Leaving directory `/home/user/ocaml-3.11.2/asmrun'
make[1]: *** [makeruntimeopt] Error 2
make[1]: Leaving directory `/home/user/ocaml-3.11.2'
make: *** [opt] Error 2


full configure output:



Configuring for a armv5tejl-unknown-linux-gnu ...
gcc found
The C compiler is ANSI-compliant.
Checking the sizes of integers and pointers...
OK, this is a regular 32 bit architecture.
64-bit "long long" integer type found (printf with "%ll").
This is a little-endian architecture.
Doubles can be word-aligned.
64-bit integers can be word-aligned.
Native division and modulus have round-towards-zero semantics, will
use them.
ranlib found
#! appears to work in shell scripts
POSIX signal handling found.
getrusage() found.
times() found.
You have BSD sockets.
socklen_t is defined in <sys/socket.h>
inet_aton() found.
IPv6 is supported.
unistd.h found.
off_t is defined in <sys/types.h>
dirent.h found.
rewinddir() found.
lockf() found.
mkfifo() found.
getcwd() found.
getwd() found.
getpriority() found.
utime() found.
utimes() found.
dup2() found.
fchmod() found.
truncate() found.
sys/select.h found.
select() found.
symlink() found.
waitpid() found.
wait4() found.
getgroups() found.
POSIX termios found.
Asynchronous I/O are supported.
setitimer() found.
gethostname() found.
uname() found.
gettimeofday() found.
mktime() found.
setsid() found.
putenv() found.
setlocale() and <locale.h> found.
dlopen() found in -ldl.
Dynamic loading of shared libraries is supported.
mmap() found.
gethostbyname_r() found (with 6 arguments).
gethostbyaddr_r() found (with 8 arguments).
Replay debugger supported.
Cannot detect system stack overflow.
POSIX threads library supported.
Options for linking with POSIX threads: -lpthread
sigwait() found
Bytecode threads library supported.
X11 not found, the "graph" library will not be supported.
NDBM not found, the "dbm" library will not be supported.
Configuring LablTk...
X11 not found.
Configuration failed, LablTk will not be built.

** Configuration summary **

Directories where Objective Caml will be installed:
        binaries.................. /usr/local/bin
        standard library.......... /usr/local/lib/ocaml
        manual pages.............. /usr/local/man (with extension .1)
Configuration for the bytecode compiler:
        C compiler used........... gcc
        options for compiling..... -fno-defer-pop -Wall -
D_FILE_OFFSET_BITS=64 -D_REENTRANT
        options for linking.......  -Wl,-E  -lm  -ldl  -lpthread
        shared libraries are supported
        options for compiling..... -fPIC -fno-defer-pop -Wall -
D_FILE_OFFSET_BITS=64 -D_REENTRANT
        command for building...... gcc -shared -o lib.so -Wl,-rpath,/a/
path objs
Configuration for the native-code compiler:
        hardware architecture..... arm
        OS variant................ linux
        C compiler used........... gcc
        options for compiling..... -Wall -D_FILE_OFFSET_BITS=64 -
D_REENTRANT
        options for linking.......   -lm
assembler ................ as
        preprocessed assembler ... gcc -c
        profiling with gprof ..... not supported
Source-level replay debugger: supported
Additional libraries supported:
        unix str num dynlink bigarray systhreads threads
Configuration for the "num" library:
        target architecture ...... generic (asm level 0)
Configuration for the "graph" library:
        options for compiling ....
        options for linking ...... not found
The "labltk" library: not supported
** Objective Caml configuration completed successfully **

[-- Attachment #2: Type: text/html, Size: 8275 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Native compiler on armel (arm-eabi)
  2010-05-24 19:48 Native compiler on armel (arm-eabi) Fabiano
@ 2010-05-24 20:06 ` Stéphane Glondu
  2010-05-24 20:12 ` Wojciech Meyer
  1 sibling, 0 replies; 3+ messages in thread
From: Stéphane Glondu @ 2010-05-24 20:06 UTC (permalink / raw)
  To: ftarlao; +Cc: caml-list

Fabiano a écrit :
> Am I right? Is ocaml able to generate native code on armel (arm eabi)?
> In case, have you suggestions in order  to solve the issue?

See [1]. In a nutshell: it will be, with OCaml 3.12.0.

FWIW, almost all Debian packages compile natively on armel with it [2].
The notable remaining issue is broken natdynlink [3].

[1] http://caml.inria.fr/mantis/view.php?id=3746
[2] http://ocaml.debian.net/debian/ocaml3120dev23r10396/
[3] http://caml.inria.fr/mantis/view.php?id=5049


Best regards,

-- 
Stéphane


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Native compiler on armel (arm-eabi)
  2010-05-24 19:48 Native compiler on armel (arm-eabi) Fabiano
  2010-05-24 20:06 ` [Caml-list] " Stéphane Glondu
@ 2010-05-24 20:12 ` Wojciech Meyer
  1 sibling, 0 replies; 3+ messages in thread
From: Wojciech Meyer @ 2010-05-24 20:12 UTC (permalink / raw)
  To: ftarlao; +Cc: caml-list

Hi,

Which architecture are you compiling on?

Seems like your architecture does not support floating point
instructions, or they claimed to be unsupported by gas. (no
appropriate coprocessor?)
The first three warnings are produced due to default mapping of
registers of sp,lr,pc to r13,r14,r15, so sounds like a something to do
with the version of gas also.

Wojciech


On Mon, May 24, 2010 at 7:48 PM, Fabiano <ftarlao@gmail.com> wrote:
> Hi,
>  I have set up  two virtual machines: emulated arm-eabi(armel) and
> oldabi(arm)
> (Debian linux) using qemu (Aurelien Jarno's debian images :
> http://blog.aurel32.net/?p=46 ) in order to compile arm binaries.
>
> Compiling native code ocaml's compilers (make world.opt or make world;
> make opt) works fine on oldabi (arm)etch but fails on the eabi (armel)
> lenny's virtual machine.
>
> I have downloaded the last ocaml 11.2 and untarred the archive.
> compile commands:
> ./configure
> make world;make opt
>
> the configure output states that the platform is not supported by
> native compiler but I have reminds about ocaml's native code compiler
> supporting EABI platform.
>
> QUESTION:
> Am I right? Is ocaml able to generate native code on armel (arm eabi)?
> In case, have you suggestions in order  to solve the issue?
>
> Thanks in advance
>
> I have attached the tail of "make opt" compilation and configure's output.
> "make opt" compilation's tail:
>
> ln -s ../byterun/custom.c custom.c
> gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
> DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
> custom.o custom.c
> ln -s ../byterun/unix.c unix.c
> gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
> DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
> unix.o unix.c
> gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
> DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
> backtrace.o backtrace.c
> gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_arm -
> DSYS_linux  -O -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT   -c -o
> natdynlink.o natdynlink.c
> gcc -c -DSYS_linux -o arm.o arm.S || \
>         { echo "If your assembler produced syntax errors, it is
> probably unhappy with the"; echo "preprocessor. Check your assembler,
> or try producing arm.o by hand."; exit 2; }
> arm.S: Assembler messages:
> arm.S:21: Warning: ignoring attempt to redefine built-in register 'sp'
> arm.S:22: Warning: ignoring attempt to redefine built-in register 'lr'
> arm.S:23: Warning: ignoring attempt to redefine built-in register 'pc'
> arm.S:114: Error: selected processor does not support `stfd f0,
> [sp,#-8]!'
> arm.S:115: Error: selected processor does not support `stfd f1,
> [sp,#-8]!'
> arm.S:116: Error: selected processor does not support `stfd f2,
> [sp,#-8]!'
> arm.S:117: Error: selected processor does not support `stfd f3,
> [sp,#-8]!'
> arm.S:127: Error: selected processor does not support `ldfd f4,
> [sp],#8'
> arm.S:128: Error: selected processor does not support `ldfd f5,
> [sp],#8'
> arm.S:129: Error: selected processor does not support `ldfd f6,
> [sp],#8'
> arm.S:130: Error: selected processor does not support `ldfd f7,
> [sp],#8'
> arm.S:186: Error: selected processor does not support `stfd f7,
> [sp,#-8]!'
> arm.S:187: Error: selected processor does not support `stfd f6,
> [sp,#-8]!'
> arm.S:188: Error: selected processor does not support `stfd f5,
> [sp,#-8]!'
> arm.S:189: Error: selected processor does not support `stfd f4,
> [sp,#-8]!'
> arm.S:242: Error: selected processor does not support `ldfd f4,
> [sp],#8'
> arm.S:243: Error: selected processor does not support `ldfd f5,
> [sp],#8'
> arm.S:244: Error: selected processor does not support `ldfd f6,
> [sp],#8'
> arm.S:245: Error: selected processor does not support `ldfd f7,
> [sp],#8'
> If your assembler produced syntax errors, it is probably unhappy with
> the
> preprocessor. Check your assembler, or try producing arm.o by hand.
> make[2]: *** [arm.o] Error 2
> make[2]: Leaving directory `/home/user/ocaml-3.11.2/asmrun'
> make[1]: *** [makeruntimeopt] Error 2
> make[1]: Leaving directory `/home/user/ocaml-3.11.2'
> make: *** [opt] Error 2
>
>
> full configure output:
>
>
>
> Configuring for a armv5tejl-unknown-linux-gnu ...
> gcc found
> The C compiler is ANSI-compliant.
> Checking the sizes of integers and pointers...
> OK, this is a regular 32 bit architecture.
> 64-bit "long long" integer type found (printf with "%ll").
> This is a little-endian architecture.
> Doubles can be word-aligned.
> 64-bit integers can be word-aligned.
> Native division and modulus have round-towards-zero semantics, will
> use them.
> ranlib found
> #! appears to work in shell scripts
> POSIX signal handling found.
> getrusage() found.
> times() found.
> You have BSD sockets.
> socklen_t is defined in <sys/socket.h>
> inet_aton() found.
> IPv6 is supported.
> unistd.h found.
> off_t is defined in <sys/types.h>
> dirent.h found.
> rewinddir() found.
> lockf() found.
> mkfifo() found.
> getcwd() found.
> getwd() found.
> getpriority() found.
> utime() found.
> utimes() found.
> dup2() found.
> fchmod() found.
> truncate() found.
> sys/select.h found.
> select() found.
> symlink() found.
> waitpid() found.
> wait4() found.
> getgroups() found.
> POSIX termios found.
> Asynchronous I/O are supported.
> setitimer() found.
> gethostname() found.
> uname() found.
> gettimeofday() found.
> mktime() found.
> setsid() found.
> putenv() found.
> setlocale() and <locale.h> found.
> dlopen() found in -ldl.
> Dynamic loading of shared libraries is supported.
> mmap() found.
> gethostbyname_r() found (with 6 arguments).
> gethostbyaddr_r() found (with 8 arguments).
> Replay debugger supported.
> Cannot detect system stack overflow.
> POSIX threads library supported.
> Options for linking with POSIX threads: -lpthread
> sigwait() found
> Bytecode threads library supported.
> X11 not found, the "graph" library will not be supported.
> NDBM not found, the "dbm" library will not be supported.
> Configuring LablTk...
> X11 not found.
> Configuration failed, LablTk will not be built.
>
> ** Configuration summary **
>
> Directories where Objective Caml will be installed:
>         binaries.................. /usr/local/bin
>         standard library.......... /usr/local/lib/ocaml
>         manual pages.............. /usr/local/man (with extension .1)
> Configuration for the bytecode compiler:
>         C compiler used........... gcc
>         options for compiling..... -fno-defer-pop -Wall -
> D_FILE_OFFSET_BITS=64 -D_REENTRANT
>         options for linking.......  -Wl,-E  -lm  -ldl  -lpthread
>         shared libraries are supported
>         options for compiling..... -fPIC -fno-defer-pop -Wall -
> D_FILE_OFFSET_BITS=64 -D_REENTRANT
>         command for building...... gcc -shared -o lib.so -Wl,-rpath,/a/
> path objs
> Configuration for the native-code compiler:
>         hardware architecture..... arm
>         OS variant................ linux
>         C compiler used........... gcc
>         options for compiling..... -Wall -D_FILE_OFFSET_BITS=64 -
> D_REENTRANT
>         options for linking.......   -lm
> assembler ................ as
>         preprocessed assembler ... gcc -c
>         profiling with gprof ..... not supported
> Source-level replay debugger: supported
> Additional libraries supported:
>         unix str num dynlink bigarray systhreads threads
> Configuration for the "num" library:
>         target architecture ...... generic (asm level 0)
> Configuration for the "graph" library:
>         options for compiling ....
>         options for linking ...... not found
> The "labltk" library: not supported
> ** Objective Caml configuration completed successfully **
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-24 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-24 19:48 Native compiler on armel (arm-eabi) Fabiano
2010-05-24 20:06 ` [Caml-list] " Stéphane Glondu
2010-05-24 20:12 ` Wojciech Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).