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

7.0.1 tarball FTB on Debian buster #1767

Closed
JiffB opened this issue Mar 4, 2021 · 8 comments
Closed

7.0.1 tarball FTB on Debian buster #1767

JiffB opened this issue Mar 4, 2021 · 8 comments
Labels

Comments

@JiffB
Copy link

JiffB commented Mar 4, 2021

Hi Haskell gurus,

Environment

  • PostgreSQL version: V.13.2-1 (packages from: apt.postgresql.org buster-pgdg main)
  • PostgREST version:  V.7.0.1 release tarball
  • Operating system: Linux Debian buster

Description of issue

I followed: https://postgrest.org/en/v7.0.0/development.html
so, once the haskell-stack package was installed, I issued:

stack upgrade   (it did)
stack build --install-ghc --copy-bins --local-bin-path /usr/local/bin   (it failed)

waited for a long moment, time for ghc to install and launch compilation, but after some logs, I'm stuck on this:

[…]
base-compat-batteries        > [115 of 116] Compiling Type.Reflection.Compat
base-compat-batteries        > [116 of 116] Compiling Type.Reflection.Compat.Repl.Batteries
base-compat-batteries        > copy/register
base-compat-batteries        > Installing library in /root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/lib/x86_64-linux-ghc-8.8.3/base-compat-batteries-0.11.1-LOY5lyev4zYDDSw7XooUgP
base-compat-batteries        > Registering library for base-compat-batteries-0.11.1..
Progress 12/182                       

--  While building package basement-0.0.11 (scroll up to its section to see the error) using:
      /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

This triggered 2 thoughts:
1)- OMFG, Haskell is even a better tease than Erlang when it comes to error messages,
2)- I'm doomed as I have tests to conduct under x86_64, arm64 and armhf :/)
 
Re-launching the compilation with: stack build --copy-bins --local-bin-path /usr/local/bin
also failed, which looks normal:

[…]
byteorder                    > Installing library in /root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/lib/x86_64-linux-ghc-8.8.3/byteorder-1.0.4-KgJ9EHrGIhpJCFFHbRpXHY
byteorder                    > Registering library for byteorder-1.0.4..
cabal-doctest                > copy/register
cabal-doctest                > Installing library in /root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/lib/x86_64-linux-ghc-8.8.3/cabal-doctest-1.0.8-2wQRz9ec1yB5lMDRmEgBWB
cabal-doctest                > Registering library for cabal-doctest-1.0.8..
Progress 4/171               

--  While building package basement-0.0.11 (scroll up to its section to see the error) using:
      /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

 
How can I succeed compiling postgrest as I really need it's features (especially pictures direct transfer to nginx as advertised in the docs) for a composite application ?

@steve-chavez
Copy link
Member

Hey @JiffB,

Try adding the -v(verbose) flag to stack build, maybe it gives a better error message.

Also, you could try building with cabal, we do this for our FreeBSD build. Steps here:

https://github.com/PostgREST/postgrest/blob/main/.cirrus.yml#L31-L40

@steve-chavez
Copy link
Member

arm64 and armhf

arm64 should work, I've managed to build it on ubuntu(with cabal). Check #1117 (comment) for more details.

@JiffB
Copy link
Author

JiffB commented Mar 4, 2021

I add the -v switch, found one odd warning by around the middle of the compilation log:

2021-03-04 23:35:34.596173: [info] basement                     > build
2021-03-04 23:35:34.596384: [debug] Run process within /tmp/stack-8885f68751cd1314/basement-0.0.11/: /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 build --ghc-options " -fdiagnostics-color=always"
2021-03-04 23:35:34.653175: [info] basement                     > Preprocessing library for basement-0.0.11..
2021-03-04 23:35:34.762719: [warn] basement                     > hsc2hs: .stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/build/Basement/Terminal/Size_hsc_make: runProcess: runInteractiveProcess: exec: permission denied (Permission denied)
2021-03-04 23:35:34.987224: [debug] Pulled from Casa: colour-2.3.5@sha256:b27db0a3ad40d70bdbd8510a104269f8707592e80757a1abc66a22ba25e5a42f,1801 (from Hackage) (0.842990631s), 20 files (1.243725699s)
2021-03-04 23:35:35.342793: [debug] Pulled from Casa: contravariant-1.5.2@sha256:853259271870000c007a281f0bf0bf6e1aaa97c5fd5cd5734d7b0d79b9de2af5,2761 (from Hackage) (0.984799641s), 11 files (1.457571308s)
2021-03-04 23:35:35.654301: [debug] Loaded package from Casa: HUnit-1.6.0.0@sha256:8014b27c884becd8041214a1ab263fa92244ca62700a911aff604a1047869298,1570 (from Hackage)

which is strange, as I compile as root.
 
May be it's important, may be not, but /tmp and /var/tmp (both XFS) are mounted: rw,nosuid,nodev,noexec,noatime,attr2,inode64,noquota
 
At the end, it is still cryptic:

2021-03-04 23:35:45.469876: [debug] (SQL) SELECT "id" FROM "config_cache" WHERE _ROWID_=last_insert_rowid(); []
2021-03-04 23:35:45.469974: [debug] (SQL) DELETE FROM "config_cache_dir_option" WHERE ("config_cache_id"=?) AND (1=2); [PersistInt64 20]
2021-03-04 23:35:45.470086: [debug] (SQL) INSERT INTO "config_cache_dir_option"("config_cache_id","index","option") VALUES (?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?),(?,?,?); [PersistInt64 20,PersistInt64 0,PersistText "--user",PersistInt64 20,PersistInt64 1,PersistText "--package-db=clear",PersistInt64 20,PersistInt64 2,PersistText "--package-db=global",PersistInt64 20,PersistInt64 3,PersistText "--package-db=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/pkgdb",PersistInt64 20,PersistInt64 4,PersistText "--libdir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/lib",PersistInt64 20,PersistInt64 5,PersistText "--bindir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/bin",PersistInt64 20,PersistInt64 6,PersistText "--datadir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/share",PersistInt64 20,PersistInt64 7,PersistText "--libexecdir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/libexec",PersistInt64 20,PersistInt64 8,PersistText "--sysconfdir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/etc",PersistInt64 20,PersistInt64 9,PersistText "--docdir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/doc/colour-2.3.5",PersistInt64 20,PersistInt64 10,PersistText "--htmldir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/doc/colour-2.3.5",PersistInt64 20,PersistInt64 11,PersistText "--haddockdir=/root/.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/doc/colour-2.3.5"]
2021-03-04 23:35:45.470515: [debug] (SQL) DELETE FROM "config_cache_no_dir_option" WHERE ("config_cache_id"=?) AND (1=2); [PersistInt64 20]
2021-03-04 23:35:45.470638: [debug] (SQL) INSERT INTO "config_cache_no_dir_option"("config_cache_id","index","option") VALUES (?,?,?),(?,?,?),(?,?,?); [PersistInt64 20,PersistInt64 0,PersistText "--dependency=base=base-4.13.0.0",PersistInt64 20,PersistInt64 1,PersistText "--exact-configuration",PersistInt64 20,PersistInt64 2,PersistText "--ghc-option=-fhide-source-paths"]
2021-03-04 23:35:45.470910: [debug] (SQL) DELETE FROM "config_cache_dep" WHERE ("config_cache_id"=?) AND (1=2); [PersistInt64 20]
2021-03-04 23:35:45.471010: [debug] (SQL) INSERT INTO "config_cache_dep"("config_cache_id","ghc_pkg_id") VALUES (?,?); [PersistInt64 20,PersistText "base-4.13.0.0"]
Progress 4/165        
2021-03-04 23:35:45.636956: [error] 
--  While building package basement-0.0.11 (scroll up to its section to see the error) using:
      /root/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

cabal is unknown, either in the FS or into /root/.stack:

~# find  .stack/ -name cabal
~# find  .stack/ -name cabal*
.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/pkgdb/cabal-doctest-1.0.8-2wQRz9ec1yB5lMDRmEgBWB.conf
.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/doc/cabal-doctest-1.0.8
.stack/snapshots/x86_64-linux-tinfo6/4115351fe60ed8cb75e3b86fee96c5c486d3d060a9fc6366066b6484137b0d4a/8.8.3/lib/x86_64-linux-ghc-8.8.3/cabal-doctest-1.0.8-2wQRz9ec1yB5lMDRmEgBWB

From where I look from, this doesn't look nice :/

@steve-chavez
Copy link
Member

runProcess: runInteractiveProcess: exec: permission denied (Permission denied)
May be it's important, may be not, but /tmp and /var/tmp (both XFS) are mounted:

Check these, they might help:

The TMPDIR part seems relevant.

@JiffB
Copy link
Author

JiffB commented Mar 4, 2021

Did not help - AFAII, the 2nd one implies that cabal is installed, but it isn't at this time.
 
I also created /usr/local/cabal/build, exported TMPDIR as required and attempted to build, but it is stuck at the same place.
 
Oh, I forgot to say I began with a fresh git, but encountered the exact same error, reason why I flipped to the latest stable tarball.

@JiffB JiffB changed the title 7.0.1 tarball FTP on Debian buster 7.0.1 tarball FTB on Debian buster Mar 5, 2021
@steve-chavez
Copy link
Member

Besides compiling from source, have you tried the latest ubuntu-aarch64.tar.xz nightly?

https://github.com/PostgREST/postgrest/releases/tag/nightly

It's likely that it works on debian.

@JiffB
Copy link
Author

JiffB commented Mar 6, 2021

Besides compiling from source, have you tried the latest ubuntu-aarch64.tar.xz nightly?

I'm about to test the stable binary, but those only cover the amd64 architecture, when pREST has binaries for almost all…

@steve-chavez
Copy link
Member

Closing as outdated. Related: #2273

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

No branches or pull requests

3 participants