btnz@vmubuntuserver:~$ stack update Selected mirror http://mirrors.tuna.tsinghua.edu.cn/hackage/ Downloading root Selected mirror http://mirrors.tuna.tsinghua.edu.cn/hackage/ Downloading timestamp Downloading snapshot Downloading mirrors Cannot update index (no local copy) Downloading index Updated package index downloaded Calculating hashes to check for hackage-security rebases or filesystem changes No old cache found, populating cache from scratch Populating cache from file size 632057344, hash 12df935d511eb0000b2755731539acf68d09cd10539b17f83f7e5ac9c37edc99 Populating package index cache ... Package index cache populated btnz@vmubuntuserver:~$ btnz@vmubuntuserver:~$ btnz@vmubuntuserver:~$ stack setup Warning: http://mirrors.tuna.tsinghua.edu.cn/stackage/stack-setup.yaml: Unrecognized field in GHCDownloadInfo: version Preparing to install GHC to an isolated location. This will not interfere with any system-level installation. Downloaded ghc-8.6.5. rts-1.0: Warning: .:466:1: The field "hugs-options" is deprecated. hugs isn't supported anymore Installed GHC. stack will use a sandboxed GHC it installed For more information on paths, see 'stack path' and 'stack exec env' To use this GHC and packages outside of a project, consider using: stack ghc, stack ghci, stack runghc, or stack exec btnz@vmubuntuserver:~$
Hi! I'm new to Haskell, and I just used Stack to install Yesod. There were a bunch of warnings, and I'm trying to figure out if they're warning about Stack itself or Yesod (or both?). I'd be happy to try to help clean some of them up, if I can. Two examples:
x509-validation > /tmp/stack13015/x509-validation-1.6.11/Data/X509/Validation.hs:34:1: warning: [-Wunused-imports] x509-validation > The import of ‘Control.Applicative’ is redundant x509-validation > except perhaps to import instances from ‘Control.Applicative’ x509-validation > To import instances alone, use: import Control.Applicative() x509-validation > | x509-validation > 34 | import Control.Applicative x509-validation > | ^^^^^^^^^^^^^^^^^^^^^^^^^^ x509-validation >
I figure that one (the one above) is validating Yesod, and found that in Yesod. But what about:
unix-time > /tmp/stack13015/unix-time-0.4.7//usr/include/features.h:184:3: error: unix-time > warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] unix-time > # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" unix-time > ^~~~~~~ unix-time > | unix-time > 184 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" unix-time > | ^
Why does stack (and also cabal?) have such a limitation?
Cannot use 'stack ghci' with both file targets and package targets
I got annoyed when I tried to load my package and its example code (not included in the package) at the same session of
I learned it can be easily avoided by typing
:add path/to/example.hs after launching
So why doesn't stack do it automatically?
Anyone with experience building static binaries with stack?
I'm getting a pesky
<command line>: User-specified static library could not be loaded (/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib/libpgport.a) Loading static libraries is not supported in this configuration. Try using a dynamic library instead.
stack build --ghc-options='-fPIC -lpgport -lpgcommon' :aws-sync with
ghc-options: - -threaded - -rtsopts - -with-rtsopts=-N ld-options: -static extra-lib-dirs: - ./lib/gmp-6.1.2/.libs - ./lib/postgres/src/interfaces/libpq - ./lib/postgres/src/common - ./lib/postgres/src/port
static-haskell-nixI ended up getting blocked on nh2/static-haskell-nix#22, because I need
libpq. There is a workaround, but my case is not that pressing, so I'll wait for upstream. nh2/static-haskell-nix#62 if you want to follow the issue which is blocked upstream by https://gitlab.haskell.org/ghc/ghc/issues/17468.
static-haskell-nixwas quite plug-and-play except for upstream issues, @nh2 has been doing tremendous work.
packagesdefined anywhere so I wonder why the warning. There is no package.yaml either.
$ stack --stack-yaml=./stack.yaml build --verbose 220.127.116.11 x86_64 hpack-0.33.0 2020-02-15 19:21:33.643425: [debug] Loading project config file stack.yaml 2020-02-15 19:21:33.644059: [error] You cannot have packages and a shell-file filled at the same time in your nix-shell configuration.
I want to staticly link a '.a' (from rust) into the binary but cant seem to get it to work. Are there any resources on this?
i have tried
extra-libraries: - nameoflib extra-lib-dirs: - /locoflib/
but this only works with absolute paths, and i need a relative path as the other project is in the same repo and distributed along with it