-
Notifications
You must be signed in to change notification settings - Fork 721
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
[BUG] - Build System: flag -systemd is not being respected by cabal-install #1200
Comments
Also see #911 for reference. |
Issue is also reproducible when running as follows:
or
|
Try in your cabal.project.local
|
Sadly no joy with either for 1.14.2 version of
or
Error is still the same:
|
I confirm this issue is still present in 97b3e95.
|
Can reproduce with 1.16.0...
To be honest, I am puzzled by how the solver actually works anyway... I was experimenting with compiling using |
This is due to haskell/cabal#5444 Anything in source-repository-package is not optional. |
This will disable systemd integration for all cabal users, but fixes IntersectMBO#1200. There are two other ways to fix this: * provide a hackage overlay, which contains lobemo-scribe-systemd only or all 3rdparty packages and then add that overlay to cabal.project (downside: stack doesn't seem to be able to use hackage overlays) * provide 2 cabal.project files and let user choose via e.g.: --project-file=cabal.project.nosystemd (downside: maintaining yet another file)
hi @mark-stopka , @hasufell can you still reproduce this? |
@mimi1vx, is this something you would be comfortable to fix? Drop me a mail if so, we can agree details. |
@mark-stopka this is already fixed in my PR. |
Oh, sorry, my bad, I am now verifying with |
@hasufell, still same issue
my build process below
|
@mark-stopka as described in the PR, there is a script that generates new project files due to a cabal bug. You have to:
|
Yes, I noticed, I am testing that now, thanks for the info! And sorry for not noticing sooner. |
I confirm #1775 fixes this issue. |
1775: Fix build for cabal users that don't have systemd r=intricate a=hasufell This is mainly due to a cabal bug and should be removed in the future: haskell/cabal#5444 There are various distros, where installing development files of libsystemd won't be an option: - Alpine (doesn't have systemd at all) - Gentoo (not installable when eudev is installed) - Exherbo (not installable when eudev is installed) Users are expected to run the script and then execute cabal like so: cabal build --project-file=cabal.nosystemd.project all ---- related: - #1666 - #1200 This has also been discussed on slack. Instructions for this edge case should probably be added to the wiki? Co-authored-by: Julian Ospald <[email protected]>
I would still note that this bug is NOT fixed with the latest 1.21.1, the file needed to be manually patched otherwise:
The proper answer is:
At least take your 2 seconds and provide a proper answer not some untested rant. Could we have a script checking NOT if systemd is installed because sadly removing the main systemd package can leave systemd residues in your system but checking IF systemd is the current init system and if it's not then it will by default disable systemd at compilation? I don't want to have this dance at the next version. |
This is how it is documented in the relevant PR, that you need to use the
script that generates custom Cabal project file...
…--
Sent from mobile
Best regards / S pozdravem,
BSc. Mark Stopka, BBA
Managing Partner @ PERLUR Group
mobile: +420 704 373 561
website: www.perlur.cloud
On Sun, Oct 11, 2020, 09:24 feraldruid22 ***@***.***> wrote:
I would still note that this bug is NOT fixed with the latest 1.21.1, the
file needed to be manually patched otherwise:
HEAD is now at a6ce8fed Merge pull request #1884 from input-output-hk/ts-slow-mode
HEAD is now at d4bb653 Merge #588
HEAD is now at 9e498e096 Merge #2645
Warning: Requested index-state2020-07-15T00:00:00Z is newer than
'hackage.haskell.org'! Falling back to older state (2020-07-14T22:50:55Z).
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: lobemo-scribe-systemd-0.1.0.0 (user goal)
[__1] next goal: libsystemd-journal (dependency of lobemo-scribe-systemd)
[__1] rejecting: libsystemd-journal-1.4.4 (conflict: pkg-config package
libsystemd==209 || >209, not found in the pkg-config database)
[__1] rejecting: libsystemd-journal-1.4.3, libsystemd-journal-1.4.2,
libsystemd-journal-1.4.1, libsystemd-journal-1.4.0, libsystemd-journal-1.3.4,
libsystemd-journal-1.3.3, libsystemd-journal-1.3.1, libsystemd-journal-1.3.0,
libsystemd-journal-1.2.0, libsystemd-journal-1.1.0, libsystemd-journal-1.0.0
(constraint from project config TODO requires >=1.4.4)
[__1] fail (backjumping, conflict set: libsystemd-journal,
lobemo-scribe-systemd)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: libsystemd-journal,
lobemo-scribe-systemd
The proper answer is:
scripts/gen-cabal-nosystemd.sh
cabal build --project-file=cabal.nosystemd.project cardano-cli cardano-node
At least take your 2 seconds and provide a proper answer not some untested
rant. Could we have a script checking NOT if systemd is installed because
sadly removing the main systemd package can leave systemd residues in your
system but checking IF systemd is the current init system and if it's not
then it will by default disable systemd at compilation?
I don't want to have this dance at the next version.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1200 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEKMP3GIXSZG6OLQPXHVYETSKFMUPANCNFSM4NXDYNDQ>
.
|
I'm not entirely sure what you're asking. The script works, does it not? Are you planning to build the node in an automated fashion across different systems that may or may not have systemd? You could do something like: if pkg-config --exists libsystemd ; then
cabal build cardano-cli cardano-node
else
scripts/gen-cabal-nosystemd.sh
cabal build --project-file=cabal.nosystemd.project cardano-cli cardano-node
fi |
@hasufell, exactly, he can easily create own wrapper script... I am, as a requester closing this issue, it works perfectly for |
Thanks a lot @hasufell! I can confirm it fixes it for an alpine-based linux image |
Exernal
Summary
While there is clearly an attempt to remove
systemd
dependency incardano-node
, when trying to use it,cabal
fails to resolve dependencies, see error below...I am building on CentOS, using
cabal-install-3.2.0.0
using following commands:I have also tried
--flags="-systemd"
notation with same results as per relevantcabal
documentation. You can use following Dockerfile to reproduce the issue:Expected behavior
cabal-install
will not requiresystemd-devel
package to resolve dependencies and build.System info (please complete the following information):
Screenshots and attachments
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: