You are not logged in.

#1 2017-06-29 09:38:49

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

[SOLVED] Conflict between ghc and ghc-static

Hi,

First post on any of the Arch forums, so please forgive me if the formatting / content is not as it should be...

Following on from the recent changes to the way ghc is packaged on Arch, I decided to do a complete reinstall of all my Haskell packages. Now, alas, almost nothing works! When installing ghc-static it exists with an file conflict error, so using pacman -S --force ghc-static I get:

error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/Cabal-1.24.2.0/libHSCabal-1.24.2.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/array-0.5.1.1/libHSarray-0.5.1.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/base-4.9.1.0/libHSbase-4.9.1.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/binary-0.8.3.0/libHSbinary-0.8.3.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/bytestring-0.10.8.1/libHSbytestring-0.10.8.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/containers-0.5.7.1/libHScontainers-0.5.7.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/deepseq-1.4.2.0/libHSdeepseq-1.4.2.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/directory-1.3.0.0/libHSdirectory-1.3.0.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/filepath-1.4.1.1/libHSfilepath-1.4.1.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/ghc-8.0.2/libHSghc-8.0.2.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/ghc-boot-8.0.2/libHSghc-boot-8.0.2.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/ghc-boot-th-8.0.2/libHSghc-boot-th-8.0.2.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/ghc-prim-0.5.0.0/libHSghc-prim-0.5.0.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/ghci-8.0.2/libHSghci-8.0.2.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/haskeline-0.7.3.0/libHShaskeline-0.7.3.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/hoopl-3.10.2.1/libHShoopl-3.10.2.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/hpc-0.6.0.3/libHShpc-0.6.0.3.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/integer-gmp-1.0.0.1/libHSinteger-gmp-1.0.0.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/pretty-1.1.3.3/libHSpretty-1.1.3.3.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/process-1.4.3.0/libHSprocess-1.4.3.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/rts/libHSrts.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/rts/libHSrts_debug.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/rts/libHSrts_l.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/rts/libHSrts_thr.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/rts/libHSrts_thr_debug.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/rts/libHSrts_thr_l.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/template-haskell-2.11.1.0/libHStemplate-haskell-2.11.1.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/terminfo-0.4.0.2/libHSterminfo-0.4.0.2.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/time-1.6.0.1/libHStime-1.6.0.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/transformers-0.5.2.0/libHStransformers-0.5.2.0.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/unix-2.7.2.1/libHSunix-2.7.2.1.a'
error: file owned by 'ghc' and 'ghc-static': 'usr/lib/ghc-8.0.2/xhtml-3000.2.1/libHSxhtml-3000.2.1.a'

I've tried both installing ghc followed by ghc-static, and also just install ghc-static, allowing it to pull in ghc as a dependency. Community/Extra packages which depend on ghc are also broken. So if I try to run shellcheck, I get the following error:

shellcheck: error while loading shared libraries: libHSregex-tdfa-1.2.2-JFeutuWiS2vGBM4qXQlqio-ghc8.0.2.so: cannot open shared object file: No such file or directory

Idris and Agda also seem to be broken.

The interesting thing is that packages from ArchHaskell repo still seem to work, and installations through stack using the --system-ghc flag also work.  Cabal-install, Happy, Alex and Haddock also work as expected. I'm really not sure how to fix this problem. Any help would be much appreciated!

David

Last edited by d_a_kelly (2017-06-29 10:55:36)

Offline

#2 2017-06-29 10:03:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: [SOLVED] Conflict between ghc and ghc-static

Welcome to the forums.  Please edit your post to add [ code ] tags aroun the command output.

For your problems, it looks like you've been doing partial upgrades.  Do a full/proper upgrade with `pacman -Syu`.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2017-06-29 10:25:59

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

Re: [SOLVED] Conflict between ghc and ghc-static

Thanks Trilby,

Code tags added.

Running `pacman -Syu` is telling me there is nothing to do.  It doesn't fix the error with shellcheck which remains the same.

Last edited by d_a_kelly (2017-06-29 10:26:13)

Offline

#4 2017-06-29 10:34:11

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: [SOLVED] Conflict between ghc and ghc-static

Then something is wrong - the ghc in the repos does not contain those files.  What's the output of `pacman -Qi ghc`?

Also, can you post your pacman.conf file?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2017-06-29 10:37:49

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

Re: [SOLVED] Conflict between ghc and ghc-static

Just tried again. I removed all ghc dependent packages and all .cabal packages, leaving no trace of ghc on my system. I then ran `pacman -Syu`, getting the same message that everything was up-to-date.

I then tried reinstalled ghc and ghc-static

sudo pacman -S ghc ghc-static
resolving dependencies...
looking for conflicting packages...

Packages (2) ghc-8.0.2-1  ghc-static-8.0.2-1

Total Installed Size:  1451.13 MiB

:: Proceed with installation? [Y/n] y
(2/2) checking keys in keyring                                                                                                                  [########################################################################################] 100%
(2/2) checking package integrity                                                                                                                [########################################################################################] 100%
(2/2) loading package files                                                                                                                     [########################################################################################] 100%
(2/2) checking for file conflicts                                                                                                               [########################################################################################] 100%
error: failed to commit transaction (conflicting files)
/usr/lib/ghc-8.0.2/Cabal-1.24.2.0/libHSCabal-1.24.2.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/array-0.5.1.1/libHSarray-0.5.1.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/base-4.9.1.0/libHSbase-4.9.1.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/binary-0.8.3.0/libHSbinary-0.8.3.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/bytestring-0.10.8.1/libHSbytestring-0.10.8.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/containers-0.5.7.1/libHScontainers-0.5.7.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/deepseq-1.4.2.0/libHSdeepseq-1.4.2.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/directory-1.3.0.0/libHSdirectory-1.3.0.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/filepath-1.4.1.1/libHSfilepath-1.4.1.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/ghc-8.0.2/libHSghc-8.0.2.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/ghc-boot-8.0.2/libHSghc-boot-8.0.2.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/ghc-boot-th-8.0.2/libHSghc-boot-th-8.0.2.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/ghc-prim-0.5.0.0/libHSghc-prim-0.5.0.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/ghci-8.0.2/libHSghci-8.0.2.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/haskeline-0.7.3.0/libHShaskeline-0.7.3.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/hoopl-3.10.2.1/libHShoopl-3.10.2.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/hpc-0.6.0.3/libHShpc-0.6.0.3.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/integer-gmp-1.0.0.1/libHSinteger-gmp-1.0.0.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/pretty-1.1.3.3/libHSpretty-1.1.3.3.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/process-1.4.3.0/libHSprocess-1.4.3.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/rts/libHSrts.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/rts/libHSrts_debug.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/rts/libHSrts_l.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/rts/libHSrts_thr.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/rts/libHSrts_thr_debug.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/rts/libHSrts_thr_l.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/template-haskell-2.11.1.0/libHStemplate-haskell-2.11.1.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/terminfo-0.4.0.2/libHSterminfo-0.4.0.2.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/time-1.6.0.1/libHStime-1.6.0.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/transformers-0.5.2.0/libHStransformers-0.5.2.0.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/unix-2.7.2.1/libHSunix-2.7.2.1.a exists in both 'ghc' and 'ghc-static'
/usr/lib/ghc-8.0.2/xhtml-3000.2.1/libHSxhtml-3000.2.1.a exists in both 'ghc' and 'ghc-static'
Errors occurred, no packages were upgraded.

Offline

#6 2017-06-29 10:39:55

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

Re: [SOLVED] Conflict between ghc and ghc-static

Sorry,  just saw your posts after trying a fresh reinstall...

my pacman.conf is this

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#TotalDownload
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[haskell-core]
Server = http://xsounds.org/~haskell/core/$arch

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

#[infinality-bundle]
#Server = http://bohoomil.com/repo/$arch

#[infinality-bundle-fonts]
#Server = http://bohoomil.com/repo/fonts

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

#[multilib]
#Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Offline

#7 2017-06-29 10:41:30

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

Re: [SOLVED] Conflict between ghc and ghc-static

Ok, just reinstalled ghc by itself (with ghc-static). The output of `pacman -Qi ghc` is

Name            : ghc
Version         : 8.0.2-1
Description     : The Glasgow Haskell Compiler
Architecture    : x86_64
URL             : http://www.haskell.org/ghc/
Licenses        : custom
Groups          : None
Provides        : haskell-array=0.5.1.1  haskell-base=4.9.1.0  haskell-binary=0.8.3.0  haskell-bytestring=0.10.8.1  haskell-cabal=1.24.2.0  haskell-containers=0.5.7.1  haskell-deepseq=1.4.2.0  haskell-directory=1.3.0.0
                  haskell-filepath=1.4.1.1  haskell-ghc-boot-th=8.0.2  haskell-ghc-boot=8.0.2  haskell-ghc-prim=0.5.0.0  haskell-ghc=8.0.2  haskell-ghci=8.0.2  haskell-haskeline=0.7.3.0  haskell-hoopl=3.10.2.1  haskell-hpc=0.6.0.3
                  haskell-integer-gmp=1.0.0.1  haskell-pretty=1.1.3.3  haskell-process=1.4.3.0  haskell-rts=1.0  haskell-template-haskell=2.11.1.0  haskell-terminfo=0.4.0.2  haskell-time=1.6.0.1  haskell-transformers=0.5.2.0
                  haskell-unix=2.7.2.1  haskell-xhtml=3000.2.1
Depends On      : perl  gmp>=5.0  gcc
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : haskell-array<0.5.1.1  haskell-base<4.9.1.0  haskell-binary<0.8.3.0  haskell-bytestring<0.10.8.1  haskell-cabal<1.24.2.0  haskell-containers<0.5.7.1  haskell-deepseq<1.4.2.0  haskell-directory<1.3.0.0
                  haskell-filepath<1.4.1.1  haskell-ghc-boot-th<8.0.2  haskell-ghc-boot<8.0.2  haskell-ghc-prim<0.5.0.0  haskell-ghc<8.0.2  haskell-ghci<8.0.2  haskell-haskeline<0.7.3.0  haskell-hoopl<3.10.2.1  haskell-hpc<0.6.0.3
                  haskell-integer-gmp<1.0.0.1  haskell-pretty<1.1.3.3  haskell-process<1.4.3.0  haskell-rts<1.0  haskell-template-haskell<2.11.1.0  haskell-terminfo<0.4.0.2  haskell-time<1.6.0.1  haskell-transformers<0.5.2.0
                  haskell-unix<2.7.2.1  haskell-xhtml<3000.2.1
Installed Size  : 1135.84 MiB
Packager        : ArchHaskell <arch-haskell@haskell.org>
Build Date      : Thu 19 Jan 2017 14:29:10 GMT
Install Date    : Thu 29 Jun 2017 11:36:45 BST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

Offline

#8 2017-06-29 10:43:10

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

Re: [SOLVED] Conflict between ghc and ghc-static

Could the problem be that I'm installing the ArchHaskell ghc rather than community ghc?

Edit:

some small progress.

Doing `pacman -S community/ghc ghc-static` resolves the file conflict error, so that's good, but...

Installing shellcheck again gives a different error

ShellCheck-0.4.6: dependency "QuickCheck-2.10.0.1-ALuGysu7txTB2VnkPyDuTq" doesn't exist (ignoring)
ShellCheck-0.4.6: dependency "json-0.9.1-G9lxq5WdrzUDT7HRdlHQ5I" doesn't exist (ignoring)
ShellCheck-0.4.6: dependency "parsec-3.1.11-1CA7c0vSU7tJHGhveOjoXR" doesn't exist (ignoring)
ShellCheck-0.4.6: dependency "regex-tdfa-1.2.2-JFeutuWiS2vGBM4qXQlqio" doesn't exist (ignoring)

And trying to run it gives

shellcheck: error while loading shared libraries: libHSregex-tdfa-1.2.2-JFeutuWiS2vGBM4qXQlqio-ghc8.0.2.so: cannot open shared object file: No such file or directory

I'm going to try removing arch-haskell from my pacman.conf and see if that helps resolve the issue.

Last edited by d_a_kelly (2017-06-29 10:48:08)

Offline

#9 2017-06-29 10:54:55

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

Re: [SOLVED] Conflict between ghc and ghc-static

That was the problem!

I removed arch-haskell from my pacman.conf and resynced the databases. I then did a fresh install of ghc and ghc-static, followed by shellcheck. The installation is still not completely clean:

(2/3) Registering Haskell modules...
json-0.9.1: dependency "mtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6" doesn't exist (ignoring)
json-0.9.1: dependency "syb-0.6-IcoSwlPi2Nx4zSqMmorFPS" doesn't exist (ignoring)
json-0.9.1: dependency "text-1.2.2.2-3ENqlljngKa6xj1Go2fVWq" doesn't exist (ignoring)
parsec-3.1.11: dependency "text-1.2.2.2-3ENqlljngKa6xj1Go2fVWq" doesn't exist (ignoring)
QuickCheck-2.10.0.1: dependency "random-1.1-9tceXaeYIMZ4JrKq20Egog" doesn't exist (ignoring)
QuickCheck-2.10.0.1: dependency "tf-random-0.5-CJZw1ZWS5MOJlR60HqKEZL" doesn't exist (ignoring)

but it works. The same is true for Agda, it works, but there are still some warnings in the build.

I'm marking this as solved. Thanks for your help!

Offline

#10 2017-06-29 10:55:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: [SOLVED] Conflict between ghc and ghc-static

Yes, that's definitely the problem.  This may be a problem with that repo, but as the wiki page for that repo even notes, putting that repo above community is not supported:

ArchHaskell wiki page wrote:

Warning: Placing haskell-core above community will cause packages from haskell-core to take precedence, and avoid dependency conflicts in case of duplicate packages. Overriding official repositories is however not supported.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2017-06-29 11:00:30

d_a_kelly
Member
Registered: 2017-06-29
Posts: 8

Re: [SOLVED] Conflict between ghc and ghc-static

I hadn't noticed that smile Thanks again

Offline

Board footer

Powered by FluxBB