Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 27/04/2007, à 21:10

Ben31

Installation Caml Light

Mesdames, mesieurs de la comunautée ubuntutienne (ou ubuntu)

Je débute très clairement dans le monde du linux user friendly, fraichement débarqué du monde du windows pas user friendly.
Je dois utiliser caml light au sein de ma formation, et je suis dans la surprise totale car je n'arrive pas à l'installer.

Je suis donc sur un amd64, et les sources sont pour du 32 bit. Sur le net j'ai pour l'instant trouvé une solution, qui consiste à ré-installaer un ubuntu 32bit, mais ca ne me conviens pas... Autant booter sous windows... (Dommage ubuntu avait l'air si bien)

J'ai cru comprendre qu'il existerai un flag à spécifier pour la compilation, afin d'utiliser les librairies de portage 64/32 bit de ubuntu, mais j'avoue ne pas bien savoir dans quoi je vais.

Si vous pouviez m'indiquer une adresse, ou une astuce afin de pouvoir assouvir mes penchants de récursivité (il faut connaitre caml), j'en serais très heureux.

Merci par avance de votre aide.

Ben
smile

#2 Le 01/05/2007, à 14:20

Ben31

Re : Installation Caml Light

Apparement il suffirait de pouvoir compiler un programme 32 bit sur une archi 64 bit...
Existe-t-il un moyen d'effectuer cette manipulation ?

J'ai essayé d'utiliser la verison windows de Caml Light avec wine (que j'ai réussis à compiler en 64 bit), mais CamlWin n'arrive pas à se lancer correctement. (Erreur : "No Bytecode file specified")

Donc si quelqu'un connaitrais un moyen de lancer CamlWin correctement ou de compiler Caml Light 32 bit sur 64 bit, cela me ferait grand plaisir.

Encore merci de votre attention.

Ben

#3 Le 01/05/2007, à 18:14

Geoffrey

Re : Installation Caml Light

tu as quel message d'erreur quand tu compile ?

Hors ligne

#4 Le 02/05/2007, à 13:20

Ben31

Re : Installation Caml Light

Salut Geoffrey,

Je viens donc de lancer les make comme indiqué dans le fichier INSTALL :

* make configure :

cd ../config; sh autoconf "gcc -fno-defer-pop -D__FAVOR_BSD "
Checking the sizes of integers and pointers...
sizes.c: In function ‘main’:
sizes.c:5: attention : incompatible implicit declaration of built-in function ‘printf’
Wow! A 64 bit architecture!
schar.c: In function ‘main’:
schar.c:6: attention : incompatible implicit declaration of built-in function ‘exit’
The char type is signed. Good!
endian.c: In function ‘main’:
endian.c:20: attention : incompatible implicit declaration of built-in function ‘exit’
This is a little-endian architecture.
align.c: In function ‘main’:
align.c:87: attention : incompatible implicit declaration of built-in function ‘exit’
This architecture has no alignment constraints.
dblalign.c: In function ‘main’:
dblalign.c:36: attention : incompatible implicit declaration of built-in function ‘exit’
Doubles can be word-aligned.
bytecopy.c: In function ‘main’:
bytecopy.c:11: attention : incompatible implicit declaration of built-in function ‘memmove’
bytecopy.c:12: attention : incompatible implicit declaration of built-in function ‘exit’
Function "memmove" is provided and handles overlapping moves correctly.
bytecopy.c: In function ‘main’:
bytecopy.c:11: attention : incompatible implicit declaration of built-in function ‘bcopy’
bytecopy.c:12: attention : incompatible implicit declaration of built-in function ‘exit’
Function "bcopy" is provided and handles overlapping moves correctly.
bytecopy.c: In function ‘main’:
bytecopy.c:11: attention : incompatible implicit declaration of built-in function ‘memcpy’
bytecopy.c:12: attention : incompatible implicit declaration of built-in function ‘exit’
The return type for signal handlers appears to be "void".
Signals have the BSD semantics.
rename() found.
You have BSD sockets.
unistd.h found.
dirent.h found.
lockf() found.
mkfifo() found.
getcwd() found.
getwd() found.
getpriority() found.
utime() found.
utimes() found.
dup2() found.
fchmod() found.
truncate() found.
select() found.
symlink() found.
wait3() found.
waitpid() found.
getgroups() found.
POSIX termios found.
async_io.c: In function ‘main’:
async_io.c:35: attention : incompatible implicit declaration of built-in function ‘exit’
Asynchronous I/O are supported.
setitimer() found.
gethostname() found.
uname() found.
gettimeofday() found.

* make world :

cd runtime; make CC="gcc" OPTS="-fno-defer-pop -D__FAVOR_BSD" LIBS="" all
make[1]: entrant dans le répertoire « /home/ben/Desktop/cl75/src/runtime »
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o interp.o interp.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o misc.o misc.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o stacks.o stacks.c
stacks.c: In function ‘realloc_arg_stack’:
stacks.c:56: attention : incompatible implicit declaration of built-in function ‘memmove’
stacks.c: In function ‘realloc_ret_stack’:
stacks.c:90: attention : incompatible implicit declaration of built-in function ‘memmove’
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o fix_code.o fix_code.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o main.o main.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o fail.o fail.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o signals.o signals.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o debugcom.o debugcom.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o freelist.o freelist.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o major_gc.o major_gc.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o minor_gc.o minor_gc.c
minor_gc.c: In function ‘oldify’:
minor_gc.c:65: attention : incompatible implicit declaration of built-in function ‘memmove’
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o memory.o memory.c
memory.c: In function ‘expand_heap’:
memory.c:66: attention : incompatible implicit declaration of built-in function ‘memmove’
memory.c:78: attention : incompatible implicit declaration of built-in function ‘memmove’
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o alloc.o alloc.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o roots.o roots.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o compare.o compare.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o ints.o ints.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o floats.o floats.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o str.o str.c
str.c: In function ‘blit_string’:
str.c:49: attention : incompatible implicit declaration of built-in function ‘memmove’
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o io.o io.c
io.c: In function ‘putblock’:
io.c:137: attention : incompatible implicit declaration of built-in function ‘memmove’
io.c:141: attention : incompatible implicit declaration of built-in function ‘memmove’
io.c: In function ‘getblock’:
io.c:278: attention : incompatible implicit declaration of built-in function ‘memmove’
io.c:282: attention : incompatible implicit declaration of built-in function ‘memmove’
io.c:290: attention : incompatible implicit declaration of built-in function ‘memmove’
io.c: In function ‘input_scan_line’:
io.c:370: attention : incompatible implicit declaration of built-in function ‘memmove’
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o extern.o extern.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o externcp.o externcp.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o intern.o intern.c
intern.c: In function ‘expand_block’:
intern.c:194: attention : incompatible implicit declaration of built-in function ‘memmove’
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o interncp.o interncp.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o hash.o hash.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o sys.o sys.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o meta.o meta.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o parsing.o parsing.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o lexing.o lexing.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o gc_ctrl.o gc_ctrl.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I..   -c -o prims.o prims.c
gcc -O2 -fno-defer-pop -D__FAVOR_BSD -I.. -o camlrun prims.o interp.o misc.o stacks.o fix_code.o main.o fail.o signals.o debugcom.o freelist.o major_gc.o minor_gc.o memory.o alloc.o roots.o compare.o ints.o floats.o str.o io.o extern.o externcp.o intern.o interncp.o hash.o sys.o meta.o parsing.o lexing.o gc_ctrl.o  -lm
sys.o: In function `error_message':
sys.c:(.text+0x2cd): warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
sys.c:(.text+0x2c1): warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
rm -f libcaml.a
ar rc libcaml.a interp.o misc.o stacks.o fix_code.o main.o fail.o signals.o debugcom.o freelist.o major_gc.o minor_gc.o memory.o alloc.o roots.o compare.o ints.o floats.o str.o io.o extern.o externcp.o intern.o interncp.o hash.o sys.o meta.o parsing.o lexing.o gc_ctrl.o
if test -f /usr/bin/ranlib -o -f /bin/ranlib; then ranlib libcaml.a; else true; fi
make[1]: quittant le répertoire « /home/ben/Desktop/cl75/src/runtime »
cp runtime/camlrun .
cd yacc; make CC="gcc" OPTS="-fno-defer-pop -D__FAVOR_BSD" all
make[1]: entrant dans le répertoire « /home/ben/Desktop/cl75/src/yacc »
make[1]: Rien à faire pour « all ».
make[1]: quittant le répertoire « /home/ben/Desktop/cl75/src/yacc »
cp yacc/camlyacc .
cd lib; make CPP="/lib/cpp -P -traditional -Dunix" all
make[1]: entrant dans le répertoire « /home/ben/Desktop/cl75/src/lib »
../camlrun ../camlcomp -stdlib . -O none -g -W arg.mli
make[1]: *** [arg.zi] Erreur de segmentation (vidange mémoire)
make[1]: *** Destruction du fichier « arg.zi »
make[1]: quittant le répertoire « /home/ben/Desktop/cl75/src/lib »
make: *** [world] Erreur 2

Apparement le configure a l'air de tourner, mais le make world bloque sur une erreur de segmentation...

Bon courage, je n'y comprend aps grand chose.

Ben

#5 Le 02/05/2007, à 15:05

Desintegr

Re : Installation Caml Light

Il existe déjà un paquet pour le Caml Light : camlrunm.


Hoc Volo, Sic Jubeo !
Mon wiki : http://desintegr.free.fr

Hors ligne

#6 Le 02/05/2007, à 18:06

Ben31

Re : Installation Caml Light

Salut Desintegr,

Effectivement il existait bien un paquet camlrunm disponible via apt-get.

Une fois installé je l'exécute donc, avec plein d'espoirs, et reçoit l'erreur suivante :

Fatal error: the file XXXX.ml is not a bytecode executable file

Donc apparement ce camlrunm permet d'exécuter des fichiers compilés et/ou executable, je ne sais pas, mais ne permet pas d'interpréter du code Caml Light.

Toujours est-il que je cherche l'environement de développement Caml Light (donc normalement la commande camllight) qui me permettrais d'interpréter mon code contenu dans mes petits fichiers .ml.

J'espère ne pas être passé à côté de la solution en ne comprenant pas le fonctionnement exact de la commande camlrunm, mais pour l'instant je ne vois que la compilation comme solution.

Merci de ta réponse tout de même.

Ben

N.B :
J'ai installé OCaml par le biais d'apt-get (quel fabuleux outil), mais hélas ce n'est toujours pas du Caml Light, et mon projet (fac) doit absolument être en caml light... hmm

#7 Le 21/05/2007, à 19:34

Ben31

Re : Installation Caml Light

J'AI TROUVE !!!!

Voici la solution pour installer caml light 0.75 sur une feisty 64bits :

* Faire comme indiqué dans le fichier INSTALL pour la configuration :

make configure

* Remplacer la ligne :

#define CAML_SIXTYFOUR

par la ligne :

#undef CAML_SIXTYFOUR

dans le fichier ./config/m.h

* Ensuite éditer le MakeFile contenu dans le répertoire src :
Pour bien faire, il faut modifier la ligne

OPTS=-fno-defer-pop -D__FAVOR_BSD

(Un truc dans le genre, ce qui est interessant ici c'est surtout "OPTS=")
A cette ligne il faut ajouter '-m32'. Cela donne donc :

OPTS=-fno-defer-pop -D__FAVOR_BSD -m32

* Il ne reste plus qu'à installer (si ce n'est déjà fait) le package ia32-libs avec un apt-get classique.

sudo apt-get install ia32-libs

* Et voilà !!! on peut enfin compiler et installer ce caml light avec un

make world
sudo make install

Merci pour votre attention, j'espère que cela aidera quelqu'un.
Ben

#8 Le 29/06/2007, à 11:42

papagon

Re : Installation Caml Light

Installe aussi emacs et le paquet tuareg (en + de caml light) !
ça te permet d'éditer ton programme comme un traitement de texte et en plus, le texte est coloré en fontion des types, des fonctions. Bref c'est plus facile pour programmer !


Les ordinateurs sont inutiles. Ils ne savent que donner des réponses.
Pablo Picasso

Hors ligne

#9 Le 19/09/2007, à 17:30

fran.b

Re : Installation Caml Light

J'ai fait un paquet camllight (ou caml-light) en  64bits pour feitsy et gutsy 
deb http://boisson.homeip.net/ubuntu feitsy ./
ou
deb http://boisson.homeip.net/ubuntu gutsy ./

Dernière modification par fran.b (Le 26/09/2007, à 11:08)

Hors ligne

#10 Le 04/03/2008, à 20:00

Fractal

Re : Installation Caml Light

Bonjour smile
Je suis avec un processeur Core 2 Duo 64 bits sous Gutsy et quand j'effectue toutes les opération dictées par Ben31 j'obtiens l'erreur

/usr/include/gnu/stubs.h:7:27: erreur: gnu/stubs-32.h : Aucun fichier ou répertoire de ce type

Est-ce que cela veut dire que les fichiers nécessaires au bon fonctionnement de cette manipulation ne sont pas disposé pareil dans Gutsy et dans Feisty? Et comment le résoudre?

Et sinon comment on fait pour installer des paquets à partir d'une adresse internet?
J'ai essayé

deb http://boisson.homeip.net/ubuntu gutsy ./

mais il me répond que la commande deb est inconnue.

Merci d'avance smile

Fractal wink

Hors ligne

#11 Le 04/03/2008, à 20:18

brakbabord

Re : Installation Caml Light

Bonne nouvelle : Pas besoin de compiler !

http://doc.ubuntu-fr.org/caml_light

Et la doc elle sert à quoi ? wink

Hors ligne

#12 Le 04/03/2008, à 21:15

Fractal

Re : Installation Caml Light

Merci smile
Je penserai à aller chercher dans la doc la prochaine fois, promis wink

Maintenant faut encore que j'apprenne à me servir d'Emacs, parce que depuis la console c'est vraiment pas le top big_smile

Fractal wink

Hors ligne

#13 Le 29/04/2008, à 11:35

fran.b

Re : Installation Caml Light

Juste pour signaler que j'ai compilé camllight pour hardy (version i386 et amd64 avec graphismes et librairies unix). Cf http://doc.ubuntu-fr.org/caml_light

Hors ligne