Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cassava contravariant fclabels iproute stack test-framework-hunit yaml Added dependencies ignore pcre-heavy base-compat pcre-light string-conversions Signed-off-by: Magnus Therning <magnus@therning.org>
- Loading branch information
c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a dependency between
stack
andpcre
?See this issue : /commercialhaskell/stack#531
Cheers,
c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is, as you can see here
ignore
depends on it:c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it necessary ? @borsboom is saying it shouldn't be required because the flag
-without-pcre
is passed toignore
.c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're building
stack
using cabal-install, there's no way forstack.cabal
to force cabal-install to require thewithout-pcre
flag when building theignore
package (that's something we specify instack.yaml
). Instead, that flag will have to be explicitly set by whatever process is building stack. The haskell-stack and haskell-stack-git packages on AUR use stack itself to build stack, and so they will not require libpcre.c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PierreR Well, if he says so, but what's the damage? I'm not a
stack
user so I didn't grasp from the long discussion you linked to what the actual problem was.c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "damage" is that you might end up using stack within docker and it will complain while running in there that it cannot find the dynamic
pcre
dependencies.Nothing urgent on my side because I will wait a bit before trying to compile my executable with stack inside a docker anyway. Ultimately this is cool though because a development team can rely on building the same Haskell executable even if they all use a different linux distribution.
c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PierreR So, in short,
stack
puts together a Docker for the purpose of runningstack
, but it fails at it... hmm... and where is the bug now? ;)No problems, I'll flip the flag on
ignore
and keep my fingers crossed we never have any other package depending on it having the flag the other way.c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magthe, I totally get what you're saying. We avoid adding system library dependencies for this reason, but unfortunately cabal-install just doesn't give the kind of control necessary to ensure that anyone who does
cabal-install stack
will get a build the way we intend it. That's one of the things we wrote stack to solve, but of course there's the bootstrapping problem (if you already had stack, you wouldn't need to build stack), and that's why we strive to provide binaries for many platforms.The docker images actually have libpcre in them, but it looks like it's a different version than your build of stack links with. This bind-mounting of stack's own executable in a container is tricky business and I'm not entirely happy with it. It's especially problematic when the host's platform is significantly different than the guest's (especially with a different operating system where it doesn't work at all, but as we see here it can even be an issue with different Linux distributions). In the the past, we tried "baking" a stack executable into the images, but then there were problems when the host-stack's version was out of sync with guest-stack's. An option we've considered is having the container download a binary that matches the host's version, but that wouldn't play nicely with building unreleased versions from source. Maybe in that case it could do an in-container build of stack from the same commit ID. But none of these options are ideal, and it hasn't become clear yet which direction we should go in. See commercialhaskell/stack#194.
c7015a2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this is now fixed with the change that closed #199.