Précédent   Forum du club des développeurs et IT Pro > Autres langages > Langages fonctionnels > F#
F# Forum d'entraide sur la programmation en langage fonctionnel F#
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 23/05/2008, 18h38   #1
gorgonite
Rédacteur/Modérateur

 
Avatar de gorgonite
 
Homme Nicolas Vallée
Ingénieur d'études
Inscription : décembre 2005
Messages : 9 978
Détails du profil
Informations personnelles :
Nom : Homme Nicolas Vallée
Âge : 28
Localisation : France

Informations professionnelles :
Activité : Ingénieur d'études
Secteur : Transports

Informations forums :
Inscription : décembre 2005
Messages : 9 978
Points : 18 177
Points : 18 177
Par défaut installation de F# 1.4.9.17

Salut,


j'essaie de tester une version plus récente de f#
mais petit problème avec mon install-mono.sh


Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Cannot open assembly bin/fsc.exe.
Mono Ahead of Time compiler - compiling assembly /home/gorgonite/temp/FSharp-1.9.4.17/bin/fsi.exe
**
** ERROR:(inssel.c:527):mini_emit_aotconst: assertion failed: (cfg->got_var)
Stacktrace:


Native stacktrace:

	mono [0x816b1fa]
	[0xb7f27440]
	/lib/tls/i686/cmov/libc.so.6(abort+0x101) [0xb7ceca01]
	/usr/lib/libglib-2.0.so.0(g_assertion_message+0x121) [0xb7eac3e1]
	/usr/lib/libglib-2.0.so.0 [0xb7eac93d]
	mono [0x808753a]
	mono [0x80881e5]
	mono(mono_burg_emit+0xb3bb) [0x809432b]
	mono [0x8136f7d]
	mono [0x8136f57]
	mono [0x815762c]
	mono [0x8063914]
	mono(mono_main+0x133c) [0x805b96c]
	mono [0x805a122]
	/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7cd6450]
	mono [0x805a091]

Debug info from gdb:

(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb7c7e940 (LWP 17477)]
[New Thread 0xb731db90 (LWP 17479)]
[New Thread 0xb7f13b90 (LWP 17478)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xb7f27410 in __kernel_vsyscall ()
  3 Thread 0xb7f13b90 (LWP 17478)  0xb7f27410 in __kernel_vsyscall ()
  2 Thread 0xb731db90 (LWP 17479)  0xb7f27410 in __kernel_vsyscall ()
  1 Thread 0xb7c7e940 (LWP 17477)  0xb7f27410 in __kernel_vsyscall ()

Thread 3 (Thread 0xb7f13b90 (LWP 17478)):
#0  0xb7f27410 in __kernel_vsyscall ()
#1  0xb7e41196 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08105c91 in ?? ()
#3  0xb7f13344 in ?? ()
#4  0x00000000 in ?? ()

Thread 2 (Thread 0xb731db90 (LWP 17479)):
#0  0xb7f27410 in __kernel_vsyscall ()
#1  0xb7e3daa5 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x081088ff in ?? ()
#3  0xb78171dc in ?? ()
#4  0xb78171c4 in ?? ()
#5  0x00000001 in ?? ()
#6  0x00000000 in ?? ()

Thread 1 (Thread 0xb7c7e940 (LWP 17477)):
#0  0xb7f27410 in __kernel_vsyscall ()
#1  0xb7d8f881 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7ebde14 in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
#3  0xb7ebe1dc in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
#4  0x0816b295 in ?? ()
#5  0xbfbb84a8 in ?? ()
#6  0xbfbb84a4 in ?? ()
#7  0xbfbb84a0 in ?? ()
#8  0xbfbb849c in ?? ()
#9  0x00000000 in ?? ()
#0  0xb7f27410 in __kernel_vsyscall ()


=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Aborted
__________________
Evitez les MP pour les questions techniques... il y a des forums
Contributions sur DVP : Mes Tutos | Mon Blog
gorgonite est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/05/2008, 19h06   #2
LLB
Membre Expert
 
Inscription : mars 2002
Messages : 962
Détails du profil
Informations forums :
Inscription : mars 2002
Messages : 962
Points : 1 149
Points : 1 149
Il faut utiliser la version 1.9.4.18 qui corrige les problèmes avec mono.

En attendant qu'elle soit publiée (je ne sais pas si elle va l'être rapidement), voici quelques indications. Par chance, j'ai installé la version 1.9.4.17 aujourd'hui tout en notant ce qu'il fallait faire dans un fichier. Cependant, le mode interactif ne fonctionne pas sous mono avec cette version.


1) Vérifier que mono est à jour.
Par exemple, la version 1.2.3.1 ne fonctionne pas avec cette version de F#. La version 1.2.6 (ce n'est pas la dernière) devrait suffire.

2) Après avoir récupéré le fichier zip :

Code :
1
2
3
4
5
$ unzip fsharp-1.9.4.17.zip
$ cd FSharp-1.9.4.17
$ chmod +x install-mono.sh
$ sed -i.bak 's/^mono/mono --runtime=v2.0.50727/' install-mono.sh
$ ./install-mono.sh
Ignore les messages d'erreurs.

3) Test.

Code :
1
2
3
4
5
$ cd bin
$ echo 'printfn "test"' > test.fs
$ mono --runtime=v2.0.50727 fscp10.exe test.fs
$ mono test.exe
test
LLB est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/05/2008, 19h19   #3
gorgonite
Rédacteur/Modérateur

 
Avatar de gorgonite
 
Homme Nicolas Vallée
Ingénieur d'études
Inscription : décembre 2005
Messages : 9 978
Détails du profil
Informations personnelles :
Nom : Homme Nicolas Vallée
Âge : 28
Localisation : France

Informations professionnelles :
Activité : Ingénieur d'études
Secteur : Transports

Informations forums :
Inscription : décembre 2005
Messages : 9 978
Points : 18 177
Points : 18 177
Citation:
Envoyé par LLB Voir le message
1) Vérifier que mono est à jour.
Par exemple, la version 1.2.3.1 ne fonctionne pas avec cette version de F#. La version 1.2.6 (ce n'est pas la dernière) devrait suffire.

j'ai celle-ci :
Code :
1
2
3
4
5
root@GorgonMobile:~# aptitude show  mono-runtime 
Paquet*: mono-runtime
État: installé
Automatiquement installé: oui
Version*: 1.2.6+dfsg-6ubuntu3
Citation:
Envoyé par LLB Voir le message
2) Après avoir récupéré le fichier zip :

Code :
1
2
3
4
5
$ unzip fsharp-1.9.4.17.zip
$ cd FSharp-1.9.4.17
$ chmod +x install-mono.sh
$ sed -i.bak 's/^mono/mono --runtime=v2.0.50727/' install-mono.sh
$ ./install-mono.sh
j'ai d'abord fait un dos2unix car install-mono.sh foirait la dernière fois à cause de cela
ensuite, j'ai bien mis le runtime


et enfin, je me prends l'erreur décrite au début
__________________
Evitez les MP pour les questions techniques... il y a des forums
Contributions sur DVP : Mes Tutos | Mon Blog
gorgonite est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/05/2008, 19h35   #4
LLB
Membre Expert
 
Inscription : mars 2002
Messages : 962
Détails du profil
Informations forums :
Inscription : mars 2002
Messages : 962
Points : 1 149
Points : 1 149
Citation:
Envoyé par LLB Voir le message
Ignore les messages d'erreurs.
mono --aot ne doit pas être appelé sur les fsc.exe et fsi.exe. Tu peux donc virer les deux dernières lignes du script, ou ignorer les erreurs ou utiliser le script suivant :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh

# This script is for use with CLIs on Unix, e.g. Mono
gacutil -i bin/FSharp.Core.dll
gacutil -i bin/FSharp.Core10.dll
gacutil -i bin/FSharp.Compatibility.dll
gacutil -i bin/FSharp.Compatibility10.dll
gacutil -i bin/FSharp.Compiler.dll
gacutil -i bin/FSharp.Compiler10.dll

chmod u+x bin/fscp10.exe
chmod u+x bin/fsi10.exe
chmod u+x bin/fslexp10.exe
chmod u+x bin/fsyaccp10.exe

# This part pre-compiles using Mono's --aot
# Note as of Mono 1.1.17 precompiling only works for .NET 1.0 binaries

mono --runtime=v2.0.50727 --aot bin/FSharp.Core10.dll
mono --runtime=v2.0.50727 --aot bin/FSharp.Compatibility10.dll

echo "Pre-compiling FSharp.Compiler10.dll (may take a while)..."
mono --runtime=v2.0.50727 --aot bin/FSharp.Compiler10.dll

mono --runtime=v2.0.50727 --aot bin/fscp10.exe
mono --runtime=v2.0.50727 --aot bin/fsi10.exe
#mono --aot bin/fsc.exe
#mono --aot bin/fsi.exe

# The System.Runtime.CompilerServices.CompilerGeneratedAttribute is new in 2.0.
# F# generates this attribute, even in the *10 assemblies (bug).
# Meantime, the "--runtime=v2.0.50727" flag forces the assemblies to run on 2.0.
# bug://2207

echo 'You currently need to use the "--runtime=v2.0.50727" flag for mono when you call fscp10.exe'
Dans tous les cas, n'hésite pas à tester (mono --runtime=v2.0.50727 fscp10.exe). Les erreurs lors du --aot ne sont généralement pas graves.
LLB est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/05/2008, 19h43   #5
gorgonite
Rédacteur/Modérateur

 
Avatar de gorgonite
 
Homme Nicolas Vallée
Ingénieur d'études
Inscription : décembre 2005
Messages : 9 978
Détails du profil
Informations personnelles :
Nom : Homme Nicolas Vallée
Âge : 28
Localisation : France

Informations professionnelles :
Activité : Ingénieur d'études
Secteur : Transports

Informations forums :
Inscription : décembre 2005
Messages : 9 978
Points : 18 177
Points : 18 177
ça veut pas

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
gorgonite@GorgonMobile:/usr/local/FSharp-1.9.4.17/bin$ mono --runtime=v2.0.50727 ./fsi10.exe

MSR F# Interactive, (c) Microsoft Corporation, All Rights Reserved
F# Version 1.9.4.17, compiling for .NET Framework Version v2.0.50727

NOTE: 
NOTE: See 'fsi --help' for flags
NOTE: 
NOTE: Commands: #r <string>;;    reference (dynamically load) the given DLL. 
NOTE:           #I <string>;;    add the given search path for referenced DLLs. 
NOTE:           #use <string>;;  accept input from the given file. 
NOTE:           #load <string> ...<string>;;
NOTE:                            load the given file(s) as a compilation unit.
NOTE:           #time;;          toggle timing on/off. 
NOTE:           #types;;         toggle display of types on/off. 
NOTE:           #quit;;          exit. 
NOTE: 
NOTE: Visit the F# website at http://research.microsoft.com/fsharp.
NOTE: Bug reports to fsbugs@microsoft.com. Enjoy!

Unhandled Exception: System.EntryPointNotFoundException: GetSystemMetrics
  at (wrapper managed-to-native) Microsoft.FSharp.Compiler.Interactive.Shell:GetSystemMetrics (int)
  at Microsoft.FSharp.Compiler.Interactive.Shell.warningForTabletPC () [0x00000] 
  at <StartupCode$fsi10>.$Microsoft.FSharp.Compiler.Interactive.Shell._main () [0x00000]
__________________
Evitez les MP pour les questions techniques... il y a des forums
Contributions sur DVP : Mes Tutos | Mon Blog
gorgonite est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/05/2008, 19h47   #6
LLB
Membre Expert
 
Inscription : mars 2002
Messages : 962
Détails du profil
Informations forums :
Inscription : mars 2002
Messages : 962
Points : 1 149
Points : 1 149
Oui, c'est ce que j'ai indiqué au début : "Cependant, le mode interactif ne fonctionne pas sous mono avec cette version".

C'est juste une erreur à la con, une ligne à changer dans le code, mais faut recompiler tout le compilateur. Donc, laisse tomber le mode interactif pour le moment (ou plutôt, utilise une ancienne version).
LLB est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 23/05/2008, 19h52   #7
gorgonite
Rédacteur/Modérateur

 
Avatar de gorgonite
 
Homme Nicolas Vallée
Ingénieur d'études
Inscription : décembre 2005
Messages : 9 978
Détails du profil
Informations personnelles :
Nom : Homme Nicolas Vallée
Âge : 28
Localisation : France

Informations professionnelles :
Activité : Ingénieur d'études
Secteur : Transports

Informations forums :
Inscription : décembre 2005
Messages : 9 978
Points : 18 177
Points : 18 177
Citation:
Envoyé par LLB Voir le message
Oui, c'est ce que j'ai indiqué au début : "Cependant, le mode interactif ne fonctionne pas sous mono avec cette version".
arf oui... avec tout cela, j'ai zappé le début


ben ça foire aussi pour fsyacc

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
/usr/bin/mono /usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe -o parser.fs parser.fsy

** (/usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe:25176): WARNING **: Missing method .ctor in assembly /usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe, type System.Runtime.CompilerServices.CompilerGeneratedAttribute

** (/usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe:25176): WARNING **: Can't find custom attr constructor image: /usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe mtoken: 0x0a000001

** (/usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe:25176): WARNING **: Missing method .ctor in assembly /usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe, type System.Runtime.CompilerServices.CompilerGeneratedAttribute

** (/usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe:25176): WARNING **: Can't find custom attr constructor image: /usr/local/FSharp-1.9.4.17/bin/fsyaccp10.exe mtoken: 0x0a000001
Error: System.TypeLoadException: A type load exception has occurred.
  at <StartupCode$fsyaccp10>.$Fsyacc._main () [0x00000] 

make: *** [parser.fs] Erreur 1
__________________
Evitez les MP pour les questions techniques... il y a des forums
Contributions sur DVP : Mes Tutos | Mon Blog
gorgonite est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 24/05/2008, 01h29   #8
LLB
Membre Expert
 
Inscription : mars 2002
Messages : 962
Détails du profil
Informations forums :
Inscription : mars 2002
Messages : 962
Points : 1 149
Points : 1 149
--runtime=v2.0.50727
LLB est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 24/05/2008, 22h18   #9
LLB
Membre Expert
 
Inscription : mars 2002
Messages : 962
Détails du profil
Informations forums :
Inscription : mars 2002
Messages : 962
Points : 1 149
Points : 1 149
Si d'autres personnes veulent utiliser F# sous Mono avec la dernière version, je viens de détailler la marche à suivre sur mon site.

En cadeau, je viens de trouver une solution pour avoir le mode interactif.


http://laurent.le-brun.eu/site/index...9-4-17-on-mono
LLB est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 25/05/2008, 12h40   #10
alex_pi
Invité(e)
 
Messages : n/a
Détails du profil
Informations forums :
Messages : n/a
Points : 0
Citation:
Envoyé par gorgonite Voir le message
j'essaie de tester une version plus récente de f#
Allez, tu peux nous le dire va. Tu fais des dizaine de messages sur F# juste pour atteindre le seuil de création d'un sous forum ?

Dernière modification par gorgonite ; 26/05/2008 à 09h29.
  Envoyer un message privé Réponse avec citation 00
Vieux 26/05/2008, 09h32   #11
gorgonite
Rédacteur/Modérateur

 
Avatar de gorgonite
 
Homme Nicolas Vallée
Ingénieur d'études
Inscription : décembre 2005
Messages : 9 978
Détails du profil
Informations personnelles :
Nom : Homme Nicolas Vallée
Âge : 28
Localisation : France

Informations professionnelles :
Activité : Ingénieur d'études
Secteur : Transports

Informations forums :
Inscription : décembre 2005
Messages : 9 978
Points : 18 177
Points : 18 177
Citation:
Envoyé par alex_pi Voir le message
Tu fais des dizaine de messages sur F# juste pour atteindre le seuil de création d'un sous forum ?
maihhheeuuhhhhhh...
même pas vrai


franchement, y a quand même pas mal de soucis pour un aficionados d'OCaml... les modules sont assez bizarres en syntaxe light, l'absence de foncteurs peut déranger, etc


sinon, étant que F# sera soutenue par la rubrique .Net côté article et langages fonctionnels côté forum... il y aura de toute façon un forum
__________________
Evitez les MP pour les questions techniques... il y a des forums
Contributions sur DVP : Mes Tutos | Mon Blog
gorgonite est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 26/05/2008, 21h13   #12
gorgonite
Rédacteur/Modérateur

 
Avatar de gorgonite
 
Homme Nicolas Vallée
Ingénieur d'études
Inscription : décembre 2005
Messages : 9 978
Détails du profil
Informations personnelles :
Nom : Homme Nicolas Vallée
Âge : 28
Localisation : France

Informations professionnelles :
Activité : Ingénieur d'études
Secteur : Transports

Informations forums :
Inscription : décembre 2005
Messages : 9 978
Points : 18 177
Points : 18 177
Citation:
Envoyé par LLB Voir le message
Si d'autres personnes veulent utiliser F# sous Mono avec la dernière version, je viens de détailler la marche à suivre sur mon site.

En cadeau, je viens de trouver une solution pour avoir le mode interactif.


http://laurent.le-brun.eu/site/index...9-4-17-on-mono

ça marche... merci


nb : pas encore testé le fsi
__________________
Evitez les MP pour les questions techniques... il y a des forums
Contributions sur DVP : Mes Tutos | Mon Blog
gorgonite est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Cette discussion est résolue.
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 19h39.


 
 
 
 
Partenaires

Hébergement Web