Précédent   Forum du club des développeurs et IT Pro > Autres langages > Langages fonctionnels > Haskell
Haskell Forum d'entraide sur la programmation en langage fonctionnel Haskell
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 26/03/2012, 18h45   #1
LAYCI
Invité de passage
 
Femme
Étudiant
Inscription : février 2012
Messages : 13
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : Industrie

Informations forums :
Inscription : février 2012
Messages : 13
Points : 2
Points : 2
Par défaut problème lors de l'installation du package repa en haskell

Bonjour, je travaille sous Windows7 j'ai installé haskell puis quand j'essai de faire cabal install repa j'obtient une erreur:

Code :
1
2
3
4
5
6
7
$ cabal install repa 
Resolving dependencies... 
cabal.exe: cannot configure repa-2.2.0.1. It requires base ==4.4. 
For the dependency on base ==4.4. there are these packages: base-4.4.0.0 and 
base-4.4.1.0. However none of them are available. 
base-4.4.0.0 was excluded because of the top level dependency base -any 
base-4.4.1.0 was excluded because of the top level dependency base -any
aidez moi SVP
LAYCI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/03/2012, 07h57   #2
Ptival
Membre actif
 
Avatar de Ptival
 
Homme Valentin Robert
Étudiant
Inscription : juin 2004
Messages : 70
Détails du profil
Informations personnelles :
Nom : Homme Valentin Robert
Âge : 24
Localisation : Etats-Unis

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2004
Messages : 70
Points : 172
Points : 172
Que retourne :
?

A mon avis il va falloir cabal unpack et voir dans le fichier .cabal ce qui ne va pas.
Ptival est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 27/03/2012, 10h27   #3
LAYCI
Invité de passage
 
Femme
Étudiant
Inscription : février 2012
Messages : 13
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : Industrie

Informations forums :
Inscription : février 2012
Messages : 13
Points : 2
Points : 2
J'ai fait ce que vous m'avez demandé et voici ce qui en résulte:
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
* base             (library)
    Synopsis:      Basic libraries (backwards-compatibility version)
    Versions available: 3.0.3.1, 3.0.3.2, (4.2.0.1), (4.2.0.2), (4.3.0.0),
                        (4.3.1.0), (4.4.0.0), (4.4.1.0),
                        (4.5.0.0) (and 3 others)
    Versions installed: (4.3.1.0)
    Homepage:      [ Not specified ]
    Bug reports:   http://hackage.haskell.org/trac/ghc/newticket?component=libraries/base
    Description:   This is a backwards-compatible version of the base package.
                   It depends on a later version of base, and was probably
                   supplied with your compiler when it was installed.
    License:       BSD3
    Maintainer:    libraries@haskell.org
    Source repo:   http://darcs.haskell.org/packages/base3-compat
    Dependencies:  base >=4.0 && <4.3, syb ==0.1.*
    Documentation: C:\2011.4.0.0\lib/../doc/html/libraries/base-4.3.1.0
    Cached:        No
    Modules:
        Control.Applicative
        Control.Arrow
        Control.Category
        Control.Concurrent
        Control.Concurrent.Chan
        Control.Concurrent.MVar
        Control.Concurrent.QSem
        Control.Concurrent.QSemN
        Control.Concurrent.SampleVar
        Control.Exception
        Control.Exception.Base
        Control.Monad
        Control.Monad.Fix
        Control.Monad.Instances
        Control.Monad.ST
        Control.Monad.ST.Lazy
        Control.Monad.ST.Strict
        Control.OldException
        Data.Bits
        Data.Bool
        Data.Char
        Data.Complex
        Data.Data
        Data.Dynamic
        Data.Either
        Data.Eq
        Data.Fixed
        Data.Foldable
        Data.Function
        Data.Functor
        Data.HashTable
        Data.IORef
        Data.Int
        Data.Ix
        Data.List
        Data.Maybe
        Data.Monoid
        Data.Ord
        Data.Ratio
        Data.STRef
        Data.STRef.Lazy
        Data.STRef.Strict
        Data.String
        Data.Traversable
        Data.Tuple
        Data.Typeable
        Data.Unique
        Data.Version
        Data.Word
        Debug.Trace
        Foreign
        Foreign.C
        Foreign.C.Error
        Foreign.C.String
        Foreign.C.Types
        Foreign.Concurrent
        Foreign.ForeignPtr
        Foreign.Marshal
        Foreign.Marshal.Alloc
        Foreign.Marshal.Array
        Foreign.Marshal.Error
        Foreign.Marshal.Pool
        Foreign.Marshal.Utils
        Foreign.Ptr
        Foreign.StablePtr
        Foreign.Storable
        GHC.Arr
        GHC.Base
        GHC.Classes
        GHC.Conc
        GHC.Conc.IO
        GHC.Conc.Signal
        GHC.Conc.Sync
        GHC.Conc.Windows
        GHC.ConsoleHandler
        GHC.Constants
        GHC.Desugar
        GHC.Enum
        GHC.Environment
        GHC.Err
        GHC.Exception
        GHC.Exts
        GHC.Float
        GHC.ForeignPtr
        GHC.Handle
        GHC.IO
        GHC.IO.Buffer
        GHC.IO.BufferedIO
        GHC.IO.Device
        GHC.IO.Encoding
        GHC.IO.Encoding.CodePage
        GHC.IO.Encoding.CodePage.Table
        GHC.IO.Encoding.Iconv
        GHC.IO.Encoding.Latin1
        GHC.IO.Encoding.Types
        GHC.IO.Encoding.UTF16
        GHC.IO.Encoding.UTF32
        GHC.IO.Encoding.UTF8
        GHC.IO.Exception
        GHC.IO.FD
        GHC.IO.Handle
        GHC.IO.Handle.FD
        GHC.IO.Handle.Internals
        GHC.IO.Handle.Text
        GHC.IO.Handle.Types
        GHC.IO.IOMode
        GHC.IOArray
        GHC.IOBase
        GHC.IORef
        GHC.Int
        GHC.List
        GHC.MVar
        GHC.Num
        GHC.PArr
        GHC.Pack
        GHC.Ptr
        GHC.Read
        GHC.Real
        GHC.ST
        GHC.STRef
        GHC.Show
        GHC.Stable
        GHC.Storable
        GHC.TopHandler
        GHC.Unicode
        GHC.Weak
        GHC.Word
        Numeric
        Prelude
        System.CPUTime
        System.Console.GetOpt
        System.Environment
        System.Exit
        System.IO
        System.IO.Error
        System.IO.Unsafe
        System.Info
        System.Mem
        System.Mem.StableName
        System.Mem.Weak
        System.Posix.Internals
        System.Posix.Types
        System.Timeout
        Text.ParserCombinators.ReadP
        Text.ParserCombinators.ReadPrec
        Text.Printf
        Text.Read
        Text.Read.Lex
        Text.Show
        Text.Show.Functions
        Unsafe.Coerce
LAYCI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/03/2012, 09h22   #4
Ptival
Membre actif
 
Avatar de Ptival
 
Homme Valentin Robert
Étudiant
Inscription : juin 2004
Messages : 70
Détails du profil
Informations personnelles :
Nom : Homme Valentin Robert
Âge : 24
Localisation : Etats-Unis

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2004
Messages : 70
Points : 172
Points : 172
Ton problème est le suivant :
- Haskell Platform est assez lent à se mettre à jour, parce que ça contient tout plein de trucs. Donc là, ils en sont à base-4.3.1.0 :
Code :
    Versions installed: (4.3.1.0)
- Repa par contre est constamment mis à jour sur cabal, et la dernière version fonctionne sur 4.4.* :
Donc il faut trouver un compromis où les deux sont compatibles. On ne va pas changer base, parce que ton compilateur en dépend, et ça va tout casser. Le compromis le moins risqué, c'est de chercher une version de repa compatible avec ta version de base :

Code :
1
2
3
4
5
6
7
8
% cabal info repa
* repa             (library)
    Synopsis:      High performance, regular, shape polymorphic parallel arrays.
    Versions available: 1.0.0.0, 1.1.0.0, 2.0.1.1, 2.0.2.1, 2.1.0.1, 2.1.1.4,
                        2.1.1.5, 2.1.1.6, 2.2.0.1 (and 7 others)
[...]
    Dependencies:  base ==4.4.*, ghc-prim ==0.2.*, vector ==0.9.*,
                   QuickCheck >=2.3 && <2.5, template-haskell >=2.5 && <2.7
On va tâtonner jusqu'à ce que la dépendence sur base accepte 4.3.1.0 :

Code :
1
2
3
% cabal info repa-2.1.1.6
[...]
    Dependencies:  base ==4.4.*, ghc-prim ==0.2.*, vector ==0.7.*,
Pas bon...

Code :
1
2
3
% cabal info repa-2.0.1.1
[...]
    Dependencies:  base ==4.*, ghc-prim ==0.2.*, vector ==0.7.*,
Ah, ça a l'air mieux ! Etc...

Finalement, la version la plus récente disponible satisfaisant 4.* est : repa-2.0.1.1

Donc tu peux essayer de :
Code :
cabal install repa-2.0.1.1
mais sache que tu n'auras pas la version la plus à jour (et on va espérer que les autres dépendences peuvent être satisfaites).

-----

Solution alternative : on va dire à repa (2.2.0.1) "ne me fais pas chier, essaie de t'installer même si ma version de base est vieille".

Code :
1
2
3
4
$ cabal unpack repa
$ cd repa-2.2.0.1
$ vi repa.cabal
Tu peux remplacer vi par ton éditeur de texte favori. Ici, tu vas chercher l'endroit où est écrit "base == 4.4.*", et remplacer ça par "base == 4.*". Maintenant, tout en restant dans le même dossier, tu refais un coup de :
Si le tout compile sans erreur, a priori ça marchera, et tu auras la version à jour de repa.
Ptival est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 28/03/2012, 16h37   #5
LAYCI
Invité de passage
 
Femme
Étudiant
Inscription : février 2012
Messages : 13
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : Industrie

Informations forums :
Inscription : février 2012
Messages : 13
Points : 2
Points : 2
Bonjour, d'abord je vous remercie pour votre aide. Ensuite:
1. j'ai opté pour la première solution, j'ai fait
Code :
cabal install repa-2.0.1.1
et ça marche.
Mon code contient les import suivant:
Code :
1
2
3
4
5
6
7
import Data.Word
import Control.Monad
import System.Environment
import Data.Array.Repa as R
import Data.Array.Repa.IO.BMP
import Data.Array.Repa.IO.DevIL
import Data.Array.Repa.Stencil
Or dans winghci quand je fais (code est le nom de mon fichier), ce dernier reconnait Data.Array.Repa et Data.Array.Repa.Stencil mais ne reconnait pas Data.Array.Repa.IO.BMP et Array.Repa.IO.DevIL.
J'ai donc supposé que le problème venait du fait que repa ne s'est pas installé correctement.
2.J'ai réinstallé Haskell et j'ai voulu essayer la 2ème solution
Code :
1
2
3
$ cabal unpack repa
$ cd repa-2.2.0.1
$ vi repa.cabal
  • vous m'avez aussi dit
    Citation:
    Ici, tu vas chercher l'endroit où est écrit "base == 4.4.*", et remplacer ça par "base == 4.*"
    ; je n'ai pas très bien compris ce que vous vouliez dire.

Pour récapituler j'ai bien compris la première méthode mais elle n'a pas fonctionné et je n'ai pas très bien compris la 2eme.

Remarque: je suis débutante donc mes questions peuvent vous sembler "débiles"
LAYCI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/03/2012, 17h34   #6
Ptival
Membre actif
 
Avatar de Ptival
 
Homme Valentin Robert
Étudiant
Inscription : juin 2004
Messages : 70
Détails du profil
Informations personnelles :
Nom : Homme Valentin Robert
Âge : 24
Localisation : Etats-Unis

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2004
Messages : 70
Points : 172
Points : 172
Bonjour,

Pour la solution 1, il faut installer respectivement repa-io et repa-devil. Ces versions semblent aller :

Code :
1
2
3
cabal install repa-io-2.2.1.0
cabal install repa-devil
---

Pour la solution 2, peut-être que "notepad" ou "edit" aurait marché en remplacement de "vi". Cela dépend de l'environnement disponible. Sinon il faut ouvrir d'abord l'éditeur de texte, et essayer de trouver le dossier dans lequel cabal a travaillé.
Ptival est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 28/03/2012, 21h35   #7
LAYCI
Invité de passage
 
Femme
Étudiant
Inscription : février 2012
Messages : 13
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : Industrie

Informations forums :
Inscription : février 2012
Messages : 13
Points : 2
Points : 2
Bonsoir, je vous remercie pour votre patience!
Pour la solution1:
j'ai fait
Code :
cabal install repa-io-2.2.1.0
et ça n'a pas fonctionné j'ai donc fait
Code :
cabal install repa-io-2.0.0.1
et ça marche.
Mais quand je fais
Code :
cabal install repa-devil
il m'affiche cette erreur:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Resolving dependencies...
Configuring Codec-Image-DevIL-0.2.3...
cabal.exe : cabal.exe: Missing dependencies on foreign libraries:
At line:1 char:6
+ cabal <<<<  install repa-devil
    + CategoryInfo          : NotSpecified: (cabal.exe: Miss...eign libraries::S 
   tring) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
*
 
Missing C libraries: IL, pthread
This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to 
specify where they are.cabal.exe: Error: some packages failed 
to install:
Codec-Image-DevIL-0.2.3 failed during the configure step. The exception was:
ExitFailure 1
repa-devil-0.1.2 depends on Codec-Image-DevIL-0.2.3 which failed to
 install.
J'ai donc tenté de faire
Code :
cabal install repa-devil-0.1
;
Code :
cabal install repa-devil-0.1.1
et
Code :
cabal install repa-devil-0.1.2
et j'obtiens cette erreur:
Code :
1
2
3
4
5
6
7
8
9
10
11
12
cabal.exe : cabal.exe: Missing dependencies on foreign libraries:
At line:1 char:6
+ cabal <<<<  install repa-devil-0.1
    + CategoryInfo          : NotSpecified: (cabal.exe: Miss...eign libraries::S 
   tring) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
*
 
Missing C libraries: IL, pthread This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). If the libraries are already installed but in a non-standard location then you can use the flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are cabal.exe: Error: some packages failed to install Codec-Image-DevIL-0.2.3 failed during the configure step. The exception was:
ExitFailure 1
repa-devil-0.1 depends on Codec-Image-DevIL-0.2.3 which failed to install.
J'ai donc essayé de faire
Code :
Codec-Image-DevIL-0.2.3
mais il y a toujours une erreur!

-----------
Pour la solution2:
j'ai fait exactement ce que vous m'avez demandé de faire et voici ce que j'obtiens :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Resolving dependencies...
Configuring repa-2.2.0.1...
Preprocessing library repa-2.2.0.1...
Building repa-2.2.0.1...
[ 1 of 26] Compiling Data.Array.Repa.Internals.Gang ( Data\Array\Repa\Internals\G
ang.hs, dist\build\Data\Array\Repa\Internals\Gang.o )
cabal.exe : 
At line:1 char:6
+ cabal <<<<  install
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Data\Array\Repa\Internals\Gang.hs:16:35:
    Module `GHC.Conc' does not export `forkOn' cabal.exe: Error: some packages failed to install:repa-2.2.0.1 failed during the building phase. The exception was:
ExitFailure 1
Que faire maintenant?
LAYCI est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 28/03/2012, 23h37   #8
Ptival
Membre actif
 
Avatar de Ptival
 
Homme Valentin Robert
Étudiant
Inscription : juin 2004
Messages : 70
Détails du profil
Informations personnelles :
Nom : Homme Valentin Robert
Âge : 24
Localisation : Etats-Unis

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : juin 2004
Messages : 70
Points : 172
Points : 172
Bon, pour la solution 2 ça semble mort (c'était risqué de toute façon).

Pour la solution 1, il va falloir pouvoir travailler dans un environnement "plus Unix". Il faudrait essayer d'installer Cygwin, et de refaire cabal-install repa-devil depuis le terminal Cygwin.

Si cela ne marche pas, alors j'ai l'impression qu'on ne peut pas utiliser repa-devil sur Windows... :\
Ptival est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 29/03/2012, 00h13   #9
LAYCI
Invité de passage
 
Femme
Étudiant
Inscription : février 2012
Messages : 13
Détails du profil
Informations personnelles :
Sexe : Femme
Localisation : Tunisie

Informations professionnelles :
Activité : Étudiant
Secteur : Industrie

Informations forums :
Inscription : février 2012
Messages : 13
Points : 2
Points : 2
J'ai essayé de travailler avec Cygwin mais ça ne marche toujours pas.
Merci tout de même pour votre aide, vous m'avez beaucoup aidé
LAYCI 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 18h56.


 
 
 
 
Partenaires

Hébergement Web