dschrempf / mcmc-date

Estimate node ages of a phylogeny by approximating the phylogenetic likelihood with a multivariate normal distribution.
GNU General Public License v3.0
8 stars 3 forks source link

Compilation error using `cabal` #1

Closed francicco closed 3 months ago

francicco commented 9 months ago

Hi,

I'd like to try mcmc-date, but when I run step4-mcmcdate it seems like that there's something wrong with my ghc that I recently installed:

./step4-mcmcdate -f step4-strassert.conf -c -k ul s m 
Analysis name: strassert.
Rooted tree: step3-strassert-136taxa.rooted.tre.
Trees: step2-strassert-136taxa-lg+g4.treelist.
Using cabal-install.
Calibrations: step3-strassert-136taxa-calibrations.rooted.tre.
Constraints: step3-strassert-136taxa-constraints-direct-stiller.csv.
Results directory: results-calibrations-constraints-ulognormal-sparse.
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.6.2.0 supports
'ghc' version < 9.4): /user/home/tk19812/.ghcup/bin/ghc is version 9.4.7
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
 - mcmc-date-1.0.0.0 (exe:mcmc-date-run) (first run)
Preprocessing executable 'mcmc-date-run' for mcmc-date-1.0.0.0..
Building executable 'mcmc-date-run' for mcmc-date-1.0.0.0..
[5 of 9] Compiling Options          ( app/Options.hs, /user/work/tk19812/software/mcmc-date/dist-newstyle/build/x86_64-linux/ghc-9.4.7/mcmc-date-1.0.0.0/x/mcmc-date-run/build/mcmc-date-run/mcmc-date-run-tmp/Options.o, /user/work/tk19812/software/mcmc-date/dist-newstyle/build/x86_64-linux/ghc-9.4.7/mcmc-date-1.0.0.0/x/mcmc-date-run/build/mcmc-date-run/mcmc-date-run-tmp/Options.dyn_o )

app/Options.hs:270:15: error:
    Variable not in scope:
      string
        :: String
           -> prettyprinter-1.7.1:Prettyprinter.Internal.Doc AnsiStyle
    |
270 |               string
    |               ^^^^^^

How can I fix it? I'm not familiar with this type of compilation.

Thanks a lot F

ssolo commented 9 months ago

I have been banging my head against the same issue on macos with cabal and a range of ghc versions 9.4,9.6, 9.81..

dschrempf commented 9 months ago

Thanks for your interest!

I added a Cabal freeze file in 28945782be1dbad0bcdbbc4f4c8fdf61f2027e08. Let me know, if compilation with Cabal works for you now.

francicco commented 9 months ago

Hi @dschrempf

Thanks a lot for looking into this. I'm now getting:

Analysis name: strassert.
Rooted tree: step3-strassert-136taxa.rooted.tre.
Trees: step2-strassert-136taxa-lg+g4.treelist.
Using cabal-install.
Calibrations: step3-strassert-136taxa-calibrations.rooted.tre.
Constraints: step3-strassert-136taxa-constraints-direct-stiller.csv.
Results directory: results-calibrations-constraints-ulognormal-sparse.
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.6.2.0 supports
'ghc' version < 9.4): /user/home/tk19812/.ghcup/bin/ghc is version 9.4.7
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: mcmc-date-1.0.0.0 (user goal)
[__1] trying: matrices-0.5.0 (dependency of mcmc-date)
[__2] next goal: primitive (dependency of matrices)
[__2] rejecting: primitive-0.9.0.0 (constraint from project config
/user/work/tk19812/software/mcmc-date/cabal.project.freeze requires ==0.8.0.0)
[__2] trying: primitive-0.8.0.0
[__3] trying: template-haskell-2.19.0.0/installed-2.19.0.0 (dependency of
primitive)
[__4] next goal: ghc-boot-th (dependency of template-haskell)
[__4] rejecting: ghc-boot-th-9.4.7/installed-9.4.7, ghc-boot-th-9.8.1,
ghc-boot-th-9.6.3, ghc-boot-th-9.6.1, ghc-boot-th-9.4.1, ghc-boot-th-9.2.2,
ghc-boot-th-9.2.1, ghc-boot-th-9.0.1, ghc-boot-th-8.10.2, ghc-boot-th-8.10.1,
ghc-boot-th-8.8.3, ghc-boot-th-8.8.1, ghc-boot-th-8.6.5, ghc-boot-th-8.6.4,
ghc-boot-th-8.6.1, ghc-boot-th-8.4.4, ghc-boot-th-8.4.3, ghc-boot-th-8.4.2,
ghc-boot-th-8.4.1, ghc-boot-th-8.2.2, ghc-boot-th-8.2.1, ghc-boot-th-8.0.2,
ghc-boot-th-8.0.1 (constraint from project config
/user/work/tk19812/software/mcmc-date/cabal.project.freeze requires ==9.4.6)
[__4] fail (backjumping, conflict set: ghc-boot-th, template-haskell)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc-boot-th, primitive,
template-haskell, matrices, mcmc-date
Try running with --minimize-conflict-set to improve the error message.
dschrempf commented 9 months ago

Hm, it seems your cabal version is out of date. Can you try with a newer version of cabal? If you want, you can also use stack, which is a bit more user friendly.

francicco commented 9 months ago

I'm not familiar with any of them. Any tips? Thanks a lot F

francicco commented 9 months ago

cabal --version

cabal-install version 3.6.2.1
compiled using version 3.6.2.0 of the Cabal library 

cabal update

Downloading the latest package list from hackage.haskell.org
Updated package list of hackage.haskell.org to the index-state 2023-12-04T11:58:53Z
To revert to previous state run:
    cabal v2-update 'hackage.haskell.org,2023-12-02T18:51:35Z'

cabal --version

cabal-install version 3.6.2.1
compiled using version 3.6.2.0 of the Cabal library 

it seems like the latest version...

francicco commented 9 months ago
cabal --version
cabal-install version 3.10.2.0
compiled using version 3.10.2.1 of the Cabal library
stack --version
Version 2.13.1, Git revision 8102bb8afce90fc954f48efae38b87f37cabc988 x86_64 hpack-0.36.0

Everything updated... apparently... but still...

Analysis name: strassert.
Rooted tree: step3-strassert-136taxa.rooted.tre.
Trees: step2-strassert-136taxa-lg+g4.treelist.
Using cabal-install.
Calibrations: step3-strassert-136taxa-calibrations.rooted.tre.
Constraints: step3-strassert-136taxa-constraints-direct-stiller.csv.
Results directory: results-calibrations-constraints-ulognormal-sparse.
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: mcmc-date-1.0.0.0 (user goal)
[__1] trying: matrices-0.5.0 (dependency of mcmc-date)
[__2] next goal: primitive (dependency of matrices)
[__2] rejecting: primitive-0.9.0.0 (constraint from project config
/user/work/tk19812/software/mcmc-date/cabal.project.freeze requires ==0.8.0.0)
[__2] trying: primitive-0.8.0.0
[__3] trying: template-haskell-2.19.0.0/installed-2.19.0.0 (dependency of
primitive)
[__4] next goal: ghc-boot-th (dependency of template-haskell)
[__4] rejecting: ghc-boot-th-9.4.7/installed-9.4.7, ghc-boot-th-9.8.1,
ghc-boot-th-9.6.3, ghc-boot-th-9.6.1, ghc-boot-th-9.4.1, ghc-boot-th-9.2.2,
ghc-boot-th-9.2.1, ghc-boot-th-9.0.1, ghc-boot-th-8.10.2, ghc-boot-th-8.10.1,
ghc-boot-th-8.8.3, ghc-boot-th-8.8.1, ghc-boot-th-8.6.5, ghc-boot-th-8.6.4,
ghc-boot-th-8.6.1, ghc-boot-th-8.4.4, ghc-boot-th-8.4.3, ghc-boot-th-8.4.2,
ghc-boot-th-8.4.1, ghc-boot-th-8.2.2, ghc-boot-th-8.2.1, ghc-boot-th-8.0.2,
ghc-boot-th-8.0.1 (constraint from project config
/user/work/tk19812/software/mcmc-date/cabal.project.freeze requires ==9.4.6)
[__4] fail (backjumping, conflict set: ghc-boot-th, template-haskell)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc-boot-th, primitive,
template-haskell, matrices, mcmc-date
Try running with --minimize-conflict-set to improve the error message.
dschrempf commented 9 months ago

I am sorry that it does not work for you. I suggest using Haskell stack. If you use the wrapper script, I think it is as easy as adding a -s (but you need to install stack first).

francicco commented 9 months ago

I have stack, the latest, but nothing... F

francicco commented 9 months ago

with -s something else happens:

./step4-mcmcdate -f step4-strassert.conf -s -c -k ul s m

Analysis name: strassert.
Rooted tree: step3-strassert-136taxa.rooted.tre.
Trees: step2-strassert-136taxa-lg+g4.treelist.
Using Stack.
Calibrations: step3-strassert-136taxa-calibrations.rooted.tre.
Constraints: step3-strassert-136taxa-constraints-direct-stiller.csv.
Results directory: results-calibrations-constraints-ulognormal-sparse.
Error: [S-922]
No cryptographic hash found for Hackage package glasso-0.1.0, updating
Selected mirror https://hackage.haskell.org/
Downloading root
Waiting to acquire cache lock on /user/home/tk19812/.stack/pantry/hackage/hackage-security-lock
Acquired cache lock on /user/home/tk19812/.stack/pantry/hackage/hackage-security-lock
Released cache lock on /user/home/tk19812/.stack/pantry/hackage/hackage-security-lock
Selected mirror https://hackage.haskell.org/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (no local copy)
Downloading index
Waiting to acquire cache lock on /user/home/tk19812/.stack/pantry/hackage/hackage-security-lock
Acquired cache lock on /user/home/tk19812/.stack/pantry/hackage/hackage-security-lock
Released cache lock on /user/home/tk19812/.stack/pantry/hackage/hackage-security-lock
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 885233152, hash 5a477505d65f012f2faa146eefbaf4eb2b1cbe5dd6039bef68ab62b2af4c0ffa
Populating package index cache ...
Package index cache populated
[ Error ] [GHCup-00130] The version 9.4.8 of the tool ghc is not installed.
[ Info  ] downloading: https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.8.yaml as file /user/home/tk19812/.ghcup/cache/ghcup-0.0.8.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[ Info  ] downloading: https://downloads.haskell.org/~ghc/9.4.8/ghc-9.4.8-x86_64-centos7-linux.tar.xz as file /user/home/tk19812/.ghcup/tmp/ghcup-ad35bf1dc37d0688/ghc-9.4.8-x86_64-centos7-linux.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  164M  100  164M    0     0  37.3M      0  0:00:04  0:00:04 --:--:-- 37.3M
[ Info  ] verifying digest of: ghc-9.4.8-x86_64-centos7-linux.tar.xz
[ Info  ] Unpacking: ghc-9.4.8-x86_64-centos7-linux.tar.xz to /user/home/tk19812/.ghcup/tmp/ghcup-ccf438efc8a2ad34
[ Info  ] Installing GHC (this may take a while)
[ Info  ] Merging file tree from "/user/home/tk19812/.ghcup/tmp/ghcup-db647d46c14cbb35/user/home/tk19812/.ghcup/ghc/9.4.8" to "/user/home/tk19812/.ghcup/ghc/9.4.8"
[ Info  ] GHC installation successful
Executable named mcmc-date-run not found on path: ["/user/work/tk19812/software/mcmc-date/.stack-work/install/x86_64-linux/22c59d2511e23b5b26c8b6ce5aeb10ef951a6b0396d6a1273180bb132386d489/9.4.8/bin","/user/home/tk19812/.stack/snapshots/x86_64-linux/22c59d2511e23b5b26c8b6ce5aeb10ef951a6b0396d6a1273180bb132386d489/9.4.8/bin","/user/home/tk19812/.stack/compiler-tools/x86_64-linux/ghc-9.4.8/bin","/user/home/tk19812/.ghcup/ghc/9.4.8/bin","/sw/lang/anaconda.3.7-2019.03-bioconda/bin","/user/home/tk19812/perl5/bin","/user/home/tk19812/software/vim/bin","/user/work/tk19812/software/Python-2.7.17/bin","/user/work/tk19812/software/samtools-1.11/bin","/user/work/tk19812/software/Winnowmap/bin","//user/work/tk19812/software/vcftools-0.1.16/bin","/user/work/tk19812/software/plink-1.07-x86_64","/user/home/tk19812/software/admixture_linux-1.3.0","/user/work/tk19812/software/bwa-0.7.17","/user/work/tk19812/software/vcf2phylip-2.8","/user/work/tk19812/software/bpp-4.6.1-linux-x86_64/bin","/user/work/tk19812/software/install-tl-20221122/bin/x86_64-linux","/user/work/tk19812/software/RepeatModeler-2.0.4","/user/work/tk19812/software/DRayTEannotation","/user/work/tk19812/software/snakemake-7.18.2","/user/work/tk19812/software/MaSuRCA-4.0.9/bin","/user/work/tk19812/software/EMBOSS-6.6.0/bin","/sw/lang/anaconda.3.7-2019.03-bioconda/condabin","/user/home/tk19812/perl5/bin","/sw/tools/git-2.35.1/bin","/sw/lang/gcc-7.5.0/bin","/system/slurm/23.02.4/bin","/system/pmix-v3/bin","/usr/local/bin","/usr/bin","/usr/local/sbin","/usr/sbin","/user/work/tk19812/software/ncbi-blast-2.13.0+/bin","/user/home/tk19812/software/gatk-4.1.4.0","/user/home/tk19812/software/hisat2-2.1.0","/user/work/tk19812/software/minimap2","/user/home/tk19812/software/mummer-4.0.0beta2/bin","/user/home/tk19812/software/seqtk","/user/home/tk19812/software/KENT","/user/home/tk19812/software/last-984/bin","/user/work/tk19812/software/hyphy-2.5.33/bin","/user/work/tk19812/software/CAFE5/bin","/user/work/tk19812/software/iqtree-2.1.3-Linux/bin","/user/work/tk19812/software/mcl-14-137/bin","/user/work/tk19812/software/FAMSA","/user/work/tk19812/software/bedops/bin","/user/work/tk19812/software/ORFanage","/user/home/tk19812/software/amos/bin","/user/work/tk19812/software/P_RNA_scaffolder","/user/work/tk19812/software/SOAPdenovo2-bin-LINUX-generic-r240","/user/work/tk19812/software/SPAdes-3.15.5-Linux/bin","/user/home/tk19812/software/bedtools2/bin","/user/work/tk19812/software/mashmap-Linux64-v2.0","/user/work/tk19812/software/taco-v0.7.3.Linux_x86_64","/user/work/tk19812/software/DAMA","/user/work/tk19812/software/seqtk","/user/work/tk19812/software/OMA.2.4.2/bin","/user/work/tk19812/software/paml4.8/bin","/user/work/tk19812/software/Mirage","/user/home/tk19812/software/refguideddenovoassembly_pipelines","/user/home/tk19812/software/purge_haplotigs/bin","/user/work/tk19812/software/prepare","/user/home/tk19812/software/bioscript","/user/home/tk19812/software/abyss/bin","/user/home/tk19812/software/pear-0.9.11-linux-x86_64/bin","/user/work/tk19812/software/jcvi/jcvi-bin/bin","/user/work/tk19812/software/cd-hit-v4.8.1-2019-0228","/user/work/tk19812/software/domainoid/blast-2.2.18/bin","/user/work/tk19812/software/clustalw-2.1-linux-x86_64-libcppstatic","/user/work/tk19812/software/RAxML","/user/work/tk19812/software/usearch","/user/home/tk19812/software/lua-5.3.5/bin","/user/home/tk19812/software/htop-1.0.2/bin","/user/home/tk19812/software/OrthoFinder","/user/home/tk19812/software/diamond/bin","/user/work/tk19812/software/bamtools-2.5.2/bin","/user/home/tk19812/software/exonerate/bin","/user/work/tk19812/software/discovardenovo-52488/bin","/user/work/tk19812/software/idba/bin","/user/work/tk19812/software/salmon-latest_linux_x86_64/bin","/user/work/tk19812/software/trinityrnaseq-v2.15.1","/user/work/tk19812/software/jellyfish-2.3.0/bin","/user/work/tk19812/software/TransDecoder-TransDecoder-v5.5.0","/user/work/tk19812/software/GUSHR","/user/work/tk19812/software/prequal","/user/home/tk19812/.aspera/connect/bin","/user/work/tk19812/software/iqtree-2.1.2-Linux/bin","/user/work/tk19812/software/STAR-2.7.10a/bin/Linux_x86_64_static","/user/work/tk19812/software/bcftools","/user/work/tk19812/software/bcftools/misc","/user/work/tk19812/software/bowtie2-2.4.1-linux-x86_64","/user/work/tk19812/software/samtools-1.11/bin","/user/work/tk19812/software/FastTree","/user/work/tk19812/software/Kent/bin/x86_64","/user/work/tk19812/software/sambamba","/user/work/tk19812/software/WiggleTools/bin","/user/work/tk19812/software/htslib","/user/work/tk19812/software/BRAKER-3.0.3/scripts","/user/work/tk19812/software/stringtie-2.1.4.Linux_x86_64","/user/work/tk19812/software/cufflinks-2.2.1.Linux_x86_64","/user/work/tk19812/software/hmmer-3.3.2/bin","/user/work/tk19812/software/trimal/bin","/user/work/tk19812/software/prank/bin","/user/work/tk19812/software/DeepFRI-1.0.0","/user/work/tk19812/software/Augustus-v3.5.0/bin","/user/work/tk19812/software/Augustus-v3.5.0/scripts","/user/work/tk19812/software/phast/bin","/user/work/tk19812/software/Dsuite/Build","/user/work/tk19812/software/newick-tools-0.0.1","/user/work/tk19812/software/RepeatMasker","/user/work/tk19812/software/RepeatMasker/util","/user/work/tk19812/software/kentUtils/bin","/user/home/tk19812/.local/bin","/user/work/tk19812/software/signalp-5.0b/bin","/user/work/tk19812/software/src_and_wrapper_scripts","/user/work/tk19812/software/metaeuk/bin","/user/work/tk19812/software/prodigal","/user/work/tk19812/software/Python-2.7.17/bin","/user/work/tk19812/software/RSEM","/user/work/tk19812/software/subread-2.0.3-Linux-x86_64/bin","/user/work/tk19812/software/RSEM/EBSeq","/user/work/tk19812/software/julia-1.8.5","/user/work/tk19812/software/tigmint-1.2.9/bin","/user/work/tk19812/software/longstitch-1.0.4","/user/work/tk19812/software/ntLink-1.3.8","/user/work/tk19812/software/abyss-2.3.5/bin","/user/work/tk19812/software/purge_haplotigs/bin","/user/work/tk19812/software/TOGA-1.1.2/CESAR2.0","/user/work/tk19812/software/TOGA-1.1.2","/user/work/tk19812/software/make_lastz_chains","/user/work/tk19812/software/make_lastz_chains/HL_scripts","/user/work/tk19812/software/FASTK","/user/work/tk19812/software/hifiasm-0.19.5","/user/work/tk19812/software/MitoFinder-1.4.1","/user/work/tk19812/software/MitoHiFi-3.2/src","/user/work/tk19812/software/cellranger-7.1.0/bin","/user/work/tk19812/software/miniprot-0.11_x64-linux","/user/work/tk19812/software/mash-Linux64-v2.3","/user/work/tk19812/software/TE-Aid","/user/work/tk19812/software/sratoolkit.3.0.5-centos_linux64/bin","/user/work/tk19812/software/canu-2.2/build/bin","/user/work/tk19812/software/BRAKERlongReadProt/ProtHint-2.6.0/bin","/user/work/tk19812/software/smrtlink_12.0.0.177059/smrtlink/smrtcmds/bin","/user/work/tk19812/software/cactus-bin-v2.4.2/bin","/user/home/tk19812/.cabal/bin","/user/home/tk19812/.ghcup/bin"]
dschrempf commented 9 months ago

Executable named mcmc-date-run not found on path ...

I need to know how you run this code, but the error message is clear: An executable is not found.

francicco commented 9 months ago

I'm running it simply executing step4-mcmcdate in the data folder. Not sure if I have to add anything to my environmental paths.

F

dschrempf commented 9 months ago

I am not sure why this doesn't work for you. mcmc-date-run is the compiled executable. It should be compiled by stack. Can you try to execute stack build? Does it compile the executable?

dschrempf commented 3 months ago

I am closing this now. Let me know if you still have trouble compiling McmcDate!