Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build on Ubuntu 20.04 (focal) #8

Open
jelmd opened this issue Jul 15, 2022 · 1 comment
Open

Unable to build on Ubuntu 20.04 (focal) #8

jelmd opened this issue Jul 15, 2022 · 1 comment

Comments

@jelmd
Copy link

jelmd commented Jul 15, 2022

Trying to build it on Ubuntu 20.04 (focal), but unfortunately it fails with the following errors:

SetupWrapper.hs:84:49: error:
    * Couldn't match type `Distribution.System.Platform -> String'
                     with `[Char]'
      Expected type: String
        Actual type: Distribution.System.Platform -> String
    * Probable cause: `exeExtension' is applied to too few arguments
      In the second argument of `(<.>)', namely `exeExtension'
      In the second argument of `(</>)', namely
        `"setup" <.> exeExtension'
      In the expression: setupDir </> "setup" <.> exeExtension
   |
84 |     setupProgFile    = setupDir </> "setup" <.> exeExtension
   |                                                 ^^^^^^^^^^^^

SetupWrapper.hs:87:24: error:
    * Data constructor not in scope: Version :: [Integer] -> [a0] -> t
    * Perhaps you meant one of these:
        variable `mkVersion' (imported from Distribution.Version),
        variable `version0' (imported from Distribution.Version),
        variable `noVersion' (imported from Distribution.Version)
   |
87 |     useCabalVersion  = Version [1,8] []
   |                        ^^^^^^^

SetupWrapper.hs:113:34: error:
    * Data constructor not in scope:
        PackageName :: [Char] -> PackageName
    * Perhaps you meant one of these:
        variable `packageName' (imported from Distribution.Package),
        variable `mkPackageName' (imported from Distribution.Package),
        variable `unPackageName' (imported from Distribution.Package)
    |
113 |       let cabalDep = Dependency (PackageName "Cabal")
    |                                  ^^^^^^^^^^^

SetupWrapper.hs:117:23: error:
    * Ambiguous type variable `a1' arising from a use of `display'
      prevents the constraint `(Text a1)' from being solved.
      Probable fix: use a type annotation to specify what `a1' should be.
      These potential instances exist:
        instance Text AbiTag -- Defined in `Distribution.Compiler'
        instance Text CompilerFlavor -- Defined in `Distribution.Compiler'
        instance Text CompilerId -- Defined in `Distribution.Compiler'
        ...plus 7 others
        ...plus five instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    * In the first argument of `(++)', namely `display useCabalVersion'
      In the second argument of `(++)', namely
        `display useCabalVersion
           ++ " but no suitable version is installed."'
      In the second argument of `($)', namely
        `"The package requires Cabal library version "
           ++
             display useCabalVersion
               ++ " but no suitable version is installed."'
    |
117 |                    ++ display useCabalVersion
    |                       ^^^^^^^^^^^^^^^^^^^^^^^

SetupWrapper.hs:126:32: error:
    * Ambiguous type variable `a2' arising from a use of `=='
      prevents the constraint `(Eq a2)' from being solved.
      Probable fix: use a type annotation to specify what `a2' should be.
      These potential instances exist:
        instance Eq AbiTag -- Defined in `Distribution.Compiler'
        instance Eq CompilerFlavor -- Defined in `Distribution.Compiler'
        instance Eq CompilerId -- Defined in `Distribution.Compiler'
        ...plus 51 others
        ...plus 73 instances involving out-of-scope types
        (use -fprint-potential-instances to see them all)
    * In the expression:
        majorVersion version == majorVersion cabalVersion
      In an equation for `sameMajorVersion':
          sameMajorVersion
            = majorVersion version == majorVersion cabalVersion
      In an equation for `preference':
          preference version
            = (sameVersion, sameMajorVersion, stableVersion, latestVersion)
            where
                sameVersion = version == cabalVersion
                sameMajorVersion
                  = majorVersion version == majorVersion cabalVersion
                majorVersion = take 2 . versionBranch
                stableVersion
                  = case versionBranch version of
                      (_ : x : _) -> even x
                      _ -> False
                ....
    |
126 |             sameMajorVersion = majorVersion version == majorVersion cabalVersion
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SetupWrapper.hs:127:41: error:
    Variable not in scope: versionBranch :: a -> [a3]
    |
127 |             majorVersion     = take 2 . versionBranch
    |                                         ^^^^^^^^^^^^^

SetupWrapper.hs:128:37: error:
    Variable not in scope: versionBranch :: Version -> [Integer]
    |
128 |             stableVersion    = case versionBranch version of
    |                                     ^^^^^^^^^^^^^

SetupWrapper.hs:146:45: error:
    * Data constructor not in scope:
        PackageName :: [Char] -> PackageName
    * Perhaps you meant one of these:
        variable `packageName' (imported from Distribution.Package),
        variable `mkPackageName' (imported from Distribution.Package),
        variable `unPackageName' (imported from Distribution.Package)
    |
146 |         let cabalPkgid = PackageIdentifier (PackageName "Cabal") cabalLibVersion
    |                                             ^^^^^^^^^^^

SetupWrapper.hs:180:49: error:
    Variable not in scope: versionBranch :: Version -> [Integer]
    |
180 |             (major1:major2:minor:_) = map show (versionBranch version ++ repeat 0)
    | 

Any hints, how to fix? ^^^^^^^^^^^^^

@jelmd
Copy link
Author

jelmd commented Jul 15, 2022

Applied patches to build it out of the box:
00_gtk2hs.patch.txt
01_gtk2hs.patch.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant