From 1db815e5cc6cafb2fa8b6d7e22e3666b1a942ed8 Mon Sep 17 00:00:00 2001 From: Ricardo Silva Date: Tue, 7 May 2019 12:57:00 +0200 Subject: [PATCH 1/2] Fix tophat compilation with gcc@6: - From https://github.com/DaehwanKimLab/tophat/pull/38 --- .../repos/builtin/packages/tophat/gcc-6.patch | 39 +++++++++++++++++++ .../repos/builtin/packages/tophat/package.py | 2 + 2 files changed, 41 insertions(+) create mode 100644 var/spack/repos/builtin/packages/tophat/gcc-6.patch diff --git a/var/spack/repos/builtin/packages/tophat/gcc-6.patch b/var/spack/repos/builtin/packages/tophat/gcc-6.patch new file mode 100644 index 00000000000000..24a29ad68a1691 --- /dev/null +++ b/var/spack/repos/builtin/packages/tophat/gcc-6.patch @@ -0,0 +1,39 @@ +From 907fd1801d636f8df6d164f1a2a787a1dc1a5fce Mon Sep 17 00:00:00 2001 +From: Christian Krause +Date: Thu, 2 Jun 2016 11:40:34 +0200 +Subject: [PATCH] remove explicit make_pair template arguments + +- this causes compilation failures using gcc 6.1.1 +- these failures are possibly related to a newer default c++ + standard that is used with the new gcc +--- + src/juncs_db.cpp | 2 +- + src/tophat_reports.cpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/juncs_db.cpp b/src/juncs_db.cpp +index ecdeba11..2efcf91c 100644 +--- a/src/juncs_db.cpp ++++ b/src/juncs_db.cpp +@@ -338,7 +338,7 @@ void driver(const vector& splice_coords_files, + uint32_t left_coord = atoi(scan_left_coord); + uint32_t right_coord = atoi(scan_right_coord); + bool antisense = *orientation == '-'; +- junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), JunctionStats())); ++ junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), JunctionStats())); + } + } + +diff --git a/src/tophat_reports.cpp b/src/tophat_reports.cpp +index 50d2165d..ce68aceb 100644 +--- a/src/tophat_reports.cpp ++++ b/src/tophat_reports.cpp +@@ -2705,7 +2705,7 @@ void driver(const string& bam_output_fname, + junction_stat.gtf_match = true; + junction_stat.accepted = true; + +- gtf_junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), junction_stat)); ++ gtf_junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), junction_stat)); + } + } + fprintf(stderr, "Loaded %d GFF junctions from %s.\n", (int)(gtf_junctions.size()), gtf_juncs.c_str()); diff --git a/var/spack/repos/builtin/packages/tophat/package.py b/var/spack/repos/builtin/packages/tophat/package.py index ec2e478a3f4116..84c0fd17ac2b0f 100644 --- a/var/spack/repos/builtin/packages/tophat/package.py +++ b/var/spack/repos/builtin/packages/tophat/package.py @@ -50,6 +50,8 @@ class Tophat(AutotoolsPackage): depends_on('boost@1.47:') depends_on('bowtie2', type='run') + patch('gcc-6.patch', when="%gcc@6:") + parallel = False def configure_args(self): From bfc7093b4d697b7ee68ba644e588b9f9fd6d9746 Mon Sep 17 00:00:00 2001 From: Ricardo Silva Date: Thu, 9 May 2019 11:15:44 +0200 Subject: [PATCH 2/2] Remove the patch and add conflict with gcc@6: --- .../repos/builtin/packages/tophat/gcc-6.patch | 39 ------------------- .../repos/builtin/packages/tophat/package.py | 5 ++- 2 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/tophat/gcc-6.patch diff --git a/var/spack/repos/builtin/packages/tophat/gcc-6.patch b/var/spack/repos/builtin/packages/tophat/gcc-6.patch deleted file mode 100644 index 24a29ad68a1691..00000000000000 --- a/var/spack/repos/builtin/packages/tophat/gcc-6.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 907fd1801d636f8df6d164f1a2a787a1dc1a5fce Mon Sep 17 00:00:00 2001 -From: Christian Krause -Date: Thu, 2 Jun 2016 11:40:34 +0200 -Subject: [PATCH] remove explicit make_pair template arguments - -- this causes compilation failures using gcc 6.1.1 -- these failures are possibly related to a newer default c++ - standard that is used with the new gcc ---- - src/juncs_db.cpp | 2 +- - src/tophat_reports.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/juncs_db.cpp b/src/juncs_db.cpp -index ecdeba11..2efcf91c 100644 ---- a/src/juncs_db.cpp -+++ b/src/juncs_db.cpp -@@ -338,7 +338,7 @@ void driver(const vector& splice_coords_files, - uint32_t left_coord = atoi(scan_left_coord); - uint32_t right_coord = atoi(scan_right_coord); - bool antisense = *orientation == '-'; -- junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), JunctionStats())); -+ junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), JunctionStats())); - } - } - -diff --git a/src/tophat_reports.cpp b/src/tophat_reports.cpp -index 50d2165d..ce68aceb 100644 ---- a/src/tophat_reports.cpp -+++ b/src/tophat_reports.cpp -@@ -2705,7 +2705,7 @@ void driver(const string& bam_output_fname, - junction_stat.gtf_match = true; - junction_stat.accepted = true; - -- gtf_junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), junction_stat)); -+ gtf_junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), junction_stat)); - } - } - fprintf(stderr, "Loaded %d GFF junctions from %s.\n", (int)(gtf_junctions.size()), gtf_juncs.c_str()); diff --git a/var/spack/repos/builtin/packages/tophat/package.py b/var/spack/repos/builtin/packages/tophat/package.py index 84c0fd17ac2b0f..e4c0880c3a0249 100644 --- a/var/spack/repos/builtin/packages/tophat/package.py +++ b/var/spack/repos/builtin/packages/tophat/package.py @@ -50,7 +50,10 @@ class Tophat(AutotoolsPackage): depends_on('boost@1.47:') depends_on('bowtie2', type='run') - patch('gcc-6.patch', when="%gcc@6:") + # uses make_pair which changed signature with C++14 + # a patch exists: https://github.com/DaehwanKimLab/tophat/pull/38 + # but there might be unexpected side effects + conflicts('%gcc@6:') parallel = False