diff --git a/.travis.yml b/.travis.yml index 2d7ba5481..9efa86e53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,17 +10,35 @@ matrix: include: - env: CABALVER="2.4" GHCVER="8.6.5" STACKVER="15.3" STYLISH=YES addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,hscolour], sources: [hvr-ghc]}} - - env: CABALVER="3.0" GHCVER="8.8.2" TESTS="lib_doc doc" - compiler: ": #GHC 8.8.2" - addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.2,cppcheck,hscolour,libffi-dev], sources: [hvr-ghc]}} - - env: CABALVER="3.0" GHCVER="8.8.2" TESTS="test_js" - compiler: ": #GHC 8.8.2" - addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.2,cppcheck,hscolour,libffi-dev], sources: [hvr-ghc]}} - - env: CABALVER="3.0" GHCVER="8.8.2" TESTS="test_c" - compiler: ": #GHC 8.8.2" - addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.2,cppcheck,hscolour,libffi-dev], sources: [hvr-ghc]}} - - env: CABALVER="3.0" GHCVER="8.8.2" IDRIS2=YES - addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.2], sources: [hvr-ghc]}} + - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="lib_doc doc" + compiler: ": #GHC 8.2.2" + addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_js" + compiler: ": #GHC 8.2.2" + addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_c" + compiler: ": #GHC 8.2.2" + addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="2.4" GHCVER="8.6.5" TESTS="lib_doc doc" + compiler: ": #GHC 8.6.5" + addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="2.4" GHCVER="8.6.5" TESTS="test_js" + compiler: ": #GHC 8.6.5" + addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="2.4" GHCVER="8.6.5" TESTS="test_c" + compiler: ": #GHC 8.6.5" + addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="lib_doc doc" + compiler: ": #GHC 8.8.3" + addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_js" + compiler: ": #GHC 8.8.3" + addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_c" + compiler: ": #GHC 8.8.3" + addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}} + - env: CABALVER="3.0" GHCVER="8.8.3" IDRIS2=YES + addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3], sources: [hvr-ghc]}} fast-finish: true cache: diff --git a/INSTALL.md b/INSTALL.md index c7c17882f..358491ed4 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -130,7 +130,8 @@ PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig stack build ## Issue with GHC on Ubuntu/Fedora There is an upstream issue with GHC on some Ubuntu and Fedora machines. -The issue is that for GHC versions greater than 8.4.X linking to libFFI is broken. +The issue is that for GHC versions greater than 8.4.X linking to libFFI uses the version of libFFI shipped with GHC, instead of the system version. + See the following GHC issue page for more information: @@ -141,4 +142,8 @@ Specifically, one will see an error message along the lines of: > error while loading shared libraries: libffi.so.7: cannot open shared object file: No such file or directory -We have supplied an alternative stack configuration file (`stack-alt.yaml`) that will use a version of GHC prior to the upstream issue being introduced. +A workround for this bug is to override the used libffi version (this is what we use on CI): + +```bash +export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7 +``` diff --git a/idris.cabal b/idris.cabal index ed6c073ef..2f85b6c63 100644 --- a/idris.cabal +++ b/idris.cabal @@ -46,12 +46,19 @@ Build-type: Custom Tested-With: GHC == 7.10.3, GHC == 8.0.1 +-- NOTE: due to https://github.com/haskell/cabal/issues/6125 the use of ** is +-- heavily discouraged. Data-files: idrisdoc/styles.css - jsrts/**/*.js + jsrts/jsbn/*.js + jsrts/*.js jsrts/jsbn/LICENSE rts/Makefile - rts/**/*.c - rts/**/*.h + rts/*.c + rts/seL4/*.c + rts/arduino/*.c + rts/windows/*.c + rts/windows/*.h + rts/*.h rts/seL4/CMakeLists.txt rts/seL4/README.md @@ -64,8 +71,13 @@ Extra-doc-files: RELEASE-CHECKS.md idris-tutorial.pdf man/idris.1 - samples/**/*.idr - samples/**/*.lidr + samples/effects/*.idr + samples/misc/*.idr + samples/tutorial/*.idr + samples/ST/*.idr + samples/ST/Graphics/*.idr + samples/ST/NET/*.idr + samples/misc/*.lidr -- extra-source-files is generated by Setup.hs using `git --ls-files`. Extra-source-files: @@ -79,8 +91,14 @@ Extra-source-files: win-release.sh benchmarks/*.pl - benchmarks/**/*.idr - benchmarks/**/*.ipkg + benchmarks/fasta/*.idr + benchmarks/fasta/*.ipkg + benchmarks/pidigits/*.idr + benchmarks/pidigits/*.ipkg + benchmarks/quasigroups/*.idr + benchmarks/quasigroups/*.ipkg + benchmarks/trivial/*.idr + benchmarks/trivial/*.ipkg benchmarks/quasigroups/board icons/*.png diff --git a/stack-11.22.yaml b/stack-11.22.yaml new file mode 100644 index 000000000..c15fc3c6b --- /dev/null +++ b/stack-11.22.yaml @@ -0,0 +1,21 @@ +#recheck extra-deps next on resolver or cabal file change +resolver: lts-11.22 + +extra-deps: +- cheapskate-0.1.1.2 +- megaparsec-7.0.5 +- Cabal-2.4.1.0 +- network-3.1.1.1 +- parser-combinators-1.0.0 + +flags: + idris: + FFI: true + GMP: true + +ghc-options: + idris: -fwarn-unused-imports -fwarn-unused-binds + +nix: + enable: false + shell-file: stack-shell.nix diff --git a/stack-12.26.yaml b/stack-12.26.yaml new file mode 100644 index 000000000..d1bfdbdbe --- /dev/null +++ b/stack-12.26.yaml @@ -0,0 +1,20 @@ +#recheck extra-deps next on resolver or cabal file change +resolver: lts-12.26 + +extra-deps: +- cheapskate-0.1.1.2 +- megaparsec-7.0.5 +- Cabal-2.4.1.0 +- network-3.1.1.1 + +flags: + idris: + FFI: true + GMP: true + +ghc-options: + idris: -fwarn-unused-imports -fwarn-unused-binds + +nix: + enable: false + shell-file: stack-shell.nix diff --git a/stack-13.11.yaml b/stack-13.11.yaml new file mode 100644 index 000000000..6c442889f --- /dev/null +++ b/stack-13.11.yaml @@ -0,0 +1,17 @@ +#recheck extra-deps next on resolver or cabal file change +resolver: lts-13.11 + +extra-deps: +- cheapskate-0.1.1.2 + +flags: + idris: + FFI: true + GMP: true + +ghc-options: + idris: -fwarn-unused-imports -fwarn-unused-binds + +nix: + enable: false + shell-file: stack-shell.nix diff --git a/stack-13.19.yaml b/stack-13.19.yaml new file mode 100644 index 000000000..f9e3713b1 --- /dev/null +++ b/stack-13.19.yaml @@ -0,0 +1,17 @@ +#recheck extra-deps next on resolver or cabal file change +resolver: lts-13.19 + +extra-deps: +- cheapskate-0.1.1.2 + +flags: + idris: + FFI: true + GMP: true + +ghc-options: + idris: -fwarn-unused-imports -fwarn-unused-binds + +nix: + enable: false + shell-file: stack-shell.nix diff --git a/stack-14.27.yaml b/stack-14.27.yaml new file mode 100644 index 000000000..27208e100 --- /dev/null +++ b/stack-14.27.yaml @@ -0,0 +1,17 @@ +#recheck extra-deps next on resolver or cabal file change +resolver: lts-14.27 + +extra-deps: +- cheapskate-0.1.1.2 + +flags: + idris: + FFI: true + GMP: true + +ghc-options: + idris: -fwarn-unused-imports -fwarn-unused-binds + +nix: + enable: false + shell-file: stack-shell.nix diff --git a/stack-15.3.yaml b/stack-15.3.yaml new file mode 100644 index 000000000..90ed8a053 --- /dev/null +++ b/stack-15.3.yaml @@ -0,0 +1,17 @@ +#recheck extra-deps next on resolver or cabal file change +resolver: lts-15.3 + +extra-deps: +- cheapskate-0.1.1.2 + +flags: + idris: + FFI: true + GMP: true + +ghc-options: + idris: -fwarn-unused-imports -fwarn-unused-binds + +nix: + enable: false + shell-file: stack-shell.nix diff --git a/stack-15.4.yaml b/stack-15.4.yaml new file mode 100644 index 000000000..062645c43 --- /dev/null +++ b/stack-15.4.yaml @@ -0,0 +1,17 @@ +#recheck extra-deps next on resolver or cabal file change +resolver: lts-15.4 + +extra-deps: +- cheapskate-0.1.1.2 + +flags: + idris: + FFI: true + GMP: true + +ghc-options: + idris: -fwarn-unused-imports -fwarn-unused-binds + +nix: + enable: false + shell-file: stack-shell.nix diff --git a/stack.yaml b/stack.yaml deleted file mode 100644 index 90ed8a053..000000000 --- a/stack.yaml +++ /dev/null @@ -1,17 +0,0 @@ -#recheck extra-deps next on resolver or cabal file change -resolver: lts-15.3 - -extra-deps: -- cheapskate-0.1.1.2 - -flags: - idris: - FFI: true - GMP: true - -ghc-options: - idris: -fwarn-unused-imports -fwarn-unused-binds - -nix: - enable: false - shell-file: stack-shell.nix diff --git a/stack.yaml b/stack.yaml new file mode 120000 index 000000000..3ec0293c9 --- /dev/null +++ b/stack.yaml @@ -0,0 +1 @@ +stack-15.4.yaml \ No newline at end of file