It seems that makepkg cannot handle git submodules very well. The wiki suggests (https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git_Submodules) adding each submodule to `sources` and modify the url in `prepare`, which is a somewhat tiresome to do given the large number of submodules the ghc repository uses. It probably only needs to be done once though, as the list of submodules likely won't change very often.
My quick workaround is setting origin's remote url back to github in `package()`: git remote set-url origin git://github.com/ghc/ghc.git, which appears to work without problems.
Search Criteria
Package Details: ghc-git 7.9.5532.g1c35f9f-1
Package Actions
- View PKGBUILD
- Download tarball
- Search wiki
- Flagged out-of-date (2015-04-14)
| Package Base: | ghc-git |
|---|---|
| Description: | The Glasgow haskell compiler (git version) |
| Upstream URL: | https://github.com/ghc/ghc |
| Category: | devel |
| Licenses: | |
| Conflicts: | |
| Provides: | |
| Submitter: | gagnonlg |
| Maintainer: | None |
| Last Packager: | TrialnError |
| Votes: | 3 |
| First Submitted: | 2013-08-08 20:26 |
| Last Updated: | 2014-10-17 20:37 |
Latest Comments
Comment by pkmx
Comment by PythonNut
Fails for me on
== running git submodule update
fatal: repository '/tmp/yaourt-tmp-pythonnut/aur-ghc-git/libffi-tarballs.git' does not exist
Clone of '/tmp/yaourt-tmp-pythonnut/aur-ghc-git/libffi-tarballs.git' into submodule path 'libffi-tarballs' failed
git failed: 256 at ./sync-all line 112.
== Checking for old haddock repo
== Checking for old binary repo
== Checking for old mtl repo
== Checking for old Cabal repo
== Checking for old time from tarball
== Checking for obsolete Git repository URL
==> ERROR: A failure occurred in prepare().
Aborting...
==> ERROR: Makepkg was unable to build ghc-git.
Stock Arch (if there's such a thing) nothing abnormal, other than yaourt.
Comment by abbradar
And one more thing (sorry for this repeated "fixes", I'm playing with ghc for some time): fixed both path to build.mk in PKGBUILD and stage0/1 build in build.mk. Without this your build.mk is basically not used at all.
PKGBUILD: http://bpaste.net/show/500858/
build.mk: http://bpaste.net/show/500888/
Comment by abbradar
One more small fix: use
git describe --always | sed 's|-|.|g; s|ghc.||'
in pkgver to avoid "ghc." prefix in version.
Comment by abbradar
Hello,
I've fixed PKGBUILD so it gets all submodules automatically now:
http://bpaste.net/show/496012/
The main change is the addition of 'sed' command. I've also removed all old custom git-fetching code since it's not needed anymore.
Comment by urimon
Alright, thank you for the feedback.
Comment by abbradar
Please, remove "base-devel" dependency -- by https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites it should be assumed that it is installed, and it breaks build with i.e. ghc-multilib.