Skip to content
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

Compile error #38

Closed
Han-Cao opened this issue Sep 10, 2023 · 2 comments
Closed

Compile error #38

Han-Cao opened this issue Sep 10, 2023 · 2 comments

Comments

@Han-Cao
Copy link

Han-Cao commented Sep 10, 2023

Hi,

I have the same error in #37. I tried to fix this by compiling from source. However, I have the below error when compiling.

The gcc version is 8.3.0, git version is 2.34.1.

Fetching submodule 'utility'
 - Submodule 'src/utility' (https://github.com/marbl/meryl-utility) registered for path 'utility'
 - Cloning into '/home/hcaoad/Software/meryl/src/utility'...
 - Submodule path 'utility': checked out '159a2d48eca5f208ed4473cc0139a5242f6ebbe3'

Building snapshot v1.4-development +61 changes (r1001 a2e291954d452f3e1b2772cf35a902181b32b4b4) (sync'd with github)
  with utility v1.0-244-g159a2d4  159a2d48eca5f208ed4473cc0139a5242f6ebbe3
For 'Linux' '3.10.0-1062.el7.x86_64)' as 'amd64' into '/home/hcaoad/Software/meryl/build/{bin,obj}'.
Using GNU '/opt/ohpc/pub/compiler/gcc/8.3.0/bin/g++' version '8.3.0'.

g++ -o /home/hcaoad/Software/meryl/build/obj/lib/libmeryl.a/utility/src/align/align-ksw2-driver.o -c -MD -g3 -O4 -funroll-loops -fexpensive-optimizations -finline-functions -fomit-frame-pointer -DLIBBACKTRACE -mxsave -Wall -Wextra -Wformat -Wno-char-subscripts -Wno-sign-compare -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated-declarations -Wno-format-truncation -std=c++2a -pthread -fopenmp -fPIC -iquote/home/hcaoad/Software/meryl/src -iquotemeryl -iquoteutility/src utility/src/align/align-ksw2-driver.C
In file included from utility/src/system.H:26,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/system/time-v1.H:29:22: error: namespace name required before ‘inline’
 namespace merylutil::inline system::inline v1 {
                      ^~~~~~
utility/src/system/time-v1.H:29:22: error: expected ‘{’ before ‘inline’
utility/src/system/time-v1.H:29:29: error: ‘system’ does not name a type
 namespace merylutil::inline system::inline v1 {
                             ^~~~~~
In file included from utility/src/strings.H:23,
                 from utility/src/system/cpuIdent-v1.H:24,
                 from utility/src/system.H:28,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/datastructures/strings-v1.H:28:22: error: namespace name required before ‘inline’
 namespace merylutil::inline strings::inline v1 {
                      ^~~~~~
utility/src/datastructures/strings-v1.H:28:22: error: expected ‘{’ before ‘inline’
utility/src/datastructures/strings-v1.H:28:29: error: ‘strings’ does not name a type; did you mean ‘sprintf’?
 namespace merylutil::inline strings::inline v1 {
                             ^~~~~~~
                             sprintf
In file included from utility/src/strings.H:25,
                 from utility/src/system/cpuIdent-v1.H:24,
                 from utility/src/system.H:28,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/datastructures/keyAndValue-v1.H:25:22: error: namespace name required before ‘inline’
 namespace merylutil::inline strings::inline v1 {
                      ^~~~~~
utility/src/datastructures/keyAndValue-v1.H:25:22: error: expected ‘{’ before ‘inline’
utility/src/datastructures/keyAndValue-v1.H:25:29: error: ‘strings’ does not name a type; did you mean ‘sprintf’?
 namespace merylutil::inline strings::inline v1 {
                             ^~~~~~~
                             sprintf
In file included from utility/src/strings.H:26,
                 from utility/src/system/cpuIdent-v1.H:24,
                 from utility/src/system.H:28,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/datastructures/splitToWords-v1.H:28:22: error: namespace name required before ‘inline’
 namespace merylutil::inline strings::inline v1 {
                      ^~~~~~
utility/src/datastructures/splitToWords-v1.H:28:22: error: expected ‘{’ before ‘inline’
utility/src/datastructures/splitToWords-v1.H:28:29: error: ‘strings’ does not name a type; did you mean ‘sprintf’?
 namespace merylutil::inline strings::inline v1 {
                             ^~~~~~~
                             sprintf
In file included from utility/src/strings.H:27,
                 from utility/src/system/cpuIdent-v1.H:24,
                 from utility/src/system.H:28,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/datastructures/stringList-v1.H:35:22: error: namespace name required before ‘inline’
 namespace merylutil::inline strings::inline v1 {
                      ^~~~~~
utility/src/datastructures/stringList-v1.H:35:22: error: expected ‘{’ before ‘inline’
utility/src/datastructures/stringList-v1.H:35:29: error: ‘strings’ does not name a type; did you mean ‘sprintf’?
 namespace merylutil::inline strings::inline v1 {
                             ^~~~~~~
                             sprintf
In file included from utility/src/system.H:28,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/system/cpuIdent-v1.H:26:22: error: namespace name required before ‘inline’
 namespace merylutil::inline system::inline v1 {
                      ^~~~~~
utility/src/system/cpuIdent-v1.H:26:22: error: expected ‘{’ before ‘inline’
utility/src/system/cpuIdent-v1.H:26:29: error: ‘system’ does not name a type
 namespace merylutil::inline system::inline v1 {
                             ^~~~~~
In file included from utility/src/files.H:28,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/accessing-v1.H:34:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/accessing-v1.H:34:22: error: expected ‘{’ before ‘inline’
utility/src/files/accessing-v1.H:34:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:29,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/reading-v1.H:45:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::v0 {
                      ^~~~~~
utility/src/files/reading-v1.H:45:22: error: expected ‘{’ before ‘inline’
utility/src/files/reading-v1.H:45:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::v0 {
                             ^~~~~
                             fileno
utility/src/files/reading-v1.H:50:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/reading-v1.H:50:22: error: expected ‘{’ before ‘inline’
utility/src/files/reading-v1.H:50:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
utility/src/files/reading-v1.H:78:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/reading-v1.H:78:22: error: expected ‘{’ before ‘inline’
utility/src/files/reading-v1.H:78:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
utility/src/files/reading-v1.H:116:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/reading-v1.H:116:22: error: expected ‘{’ before ‘inline’
utility/src/files/reading-v1.H:116:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:30,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/writing-v1.H:48:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/writing-v1.H:48:22: error: expected ‘{’ before ‘inline’
utility/src/files/writing-v1.H:48:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
utility/src/files/writing-v1.H:85:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/writing-v1.H:85:22: error: expected ‘{’ before ‘inline’
utility/src/files/writing-v1.H:85:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:32,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/buffered-v1-reading.H:29:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/buffered-v1-reading.H:29:22: error: expected ‘{’ before ‘inline’
utility/src/files/buffered-v1-reading.H:29:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:33,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/buffered-v1-writing.H:25:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/buffered-v1-writing.H:25:22: error: expected ‘{’ before ‘inline’
utility/src/files/buffered-v1-writing.H:25:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:35,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/compressed-v1.H:25:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/compressed-v1.H:25:22: error: expected ‘{’ before ‘inline’
utility/src/files/compressed-v1.H:25:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:36,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/compressed-v1-reading.H:26:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/compressed-v1-reading.H:26:22: error: expected ‘{’ before ‘inline’
utility/src/files/compressed-v1-reading.H:26:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:37,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/compressed-v1-writing.H:26:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/compressed-v1-writing.H:26:22: error: expected ‘{’ before ‘inline’
utility/src/files/compressed-v1-writing.H:26:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:39,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/memoryMapped-v1.H:48:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/memoryMapped-v1.H:48:22: error: expected ‘{’ before ‘inline’
utility/src/files/memoryMapped-v1.H:48:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/files.H:41,
                 from utility/src/system/logging-v1.H:24,
                 from utility/src/system.H:30,
                 from utility/src/align/align-ksw2-driver.H:20,
                 from utility/src/align/align-ksw2-driver.C:20:
utility/src/files/fasta-fastq-v1.H:23:22: error: namespace name required before ‘inline’
 namespace merylutil::inline files::inline v1 {
                      ^~~~~~
utility/src/files/fasta-fastq-v1.H:23:22: error: expected ‘{’ before ‘inline’
utility/src/files/fasta-fastq-v1.H:23:29: error: ‘files’ does not name a type; did you mean ‘fileno’?
 namespace merylutil::inline files::inline v1 {
                             ^~~~~
                             fileno
In file included from utility/src/align/align-ksw2-driver.C:20:
utility/src/align/align-ksw2-driver.H:25:22: error: namespace name required before ‘inline’
 namespace merylutil::inline align::inline ksw2::inline v1 {
                      ^~~~~~
utility/src/align/align-ksw2-driver.H:25:22: error: expected ‘{’ before ‘inline’
utility/src/align/align-ksw2-driver.H:25:29: error: ‘align’ does not name a type; did you mean ‘asin’?
 namespace merylutil::inline align::inline ksw2::inline v1 {
                             ^~~~~
                             asin
In file included from utility/src/align/align-ksw2-driver.C:21:
utility/src/align/align-ksw2.H:16:22: error: namespace name required before ‘inline’
 namespace merylutil::inline align::inline ksw2::inline v1 {
                      ^~~~~~
utility/src/align/align-ksw2.H:16:22: error: expected ‘{’ before ‘inline’
utility/src/align/align-ksw2.H:16:29: error: ‘align’ does not name a type; did you mean ‘asin’?
 namespace merylutil::inline align::inline ksw2::inline v1 {
                             ^~~~~
                             asin
In file included from utility/src/arrays.H:23,
                 from utility/src/align/align-ksw2-driver.C:23:
utility/src/datastructures/arrays-v1.H:25:22: error: namespace name required before ‘inline’
 namespace merylutil::inline arrays::inline v1 {
                      ^~~~~~
utility/src/datastructures/arrays-v1.H:25:22: error: expected ‘{’ before ‘inline’
utility/src/datastructures/arrays-v1.H:25:29: error: ‘arrays’ does not name a type
 namespace merylutil::inline arrays::inline v1 {
                             ^~~~~~
In file included from utility/src/sequence.H:23,
                 from utility/src/align/align-ksw2-driver.C:25:
utility/src/sequence/sequence-v1.H:26:22: error: namespace name required before ‘inline’
 namespace merylutil::inline sequence::inline v1 {
                      ^~~~~~
utility/src/sequence/sequence-v1.H:26:22: error: expected ‘{’ before ‘inline’
utility/src/sequence/sequence-v1.H:26:29: error: ‘sequence’ does not name a type; did you mean ‘sigqueue’?
 namespace merylutil::inline sequence::inline v1 {
                             ^~~~~~~~
                             sigqueue
In file included from utility/src/sequence.H:25,
                 from utility/src/align/align-ksw2-driver.C:25:
utility/src/sequence/dnaSeq-v1.H:47:22: error: namespace name required before ‘inline’
 namespace merylutil::inline sequence::inline v1 {
                      ^~~~~~
utility/src/sequence/dnaSeq-v1.H:47:22: error: expected ‘{’ before ‘inline’
utility/src/sequence/dnaSeq-v1.H:47:29: error: ‘sequence’ does not name a type; did you mean ‘sigqueue’?
 namespace merylutil::inline sequence::inline v1 {
                             ^~~~~~~~
                             sigqueue
In file included from utility/src/sequence.H:26,
                 from utility/src/align/align-ksw2-driver.C:25:
utility/src/sequence/dnaSeqFile-v1.H:70:22: error: namespace name required before ‘inline’
 namespace merylutil::inline sequence::inline v1 {
                      ^~~~~~
utility/src/sequence/dnaSeqFile-v1.H:70:22: error: expected ‘{’ before ‘inline’
utility/src/sequence/dnaSeqFile-v1.H:70:29: error: ‘sequence’ does not name a type; did you mean ‘sigqueue’?
 namespace merylutil::inline sequence::inline v1 {
                             ^~~~~~~~
                             sigqueue
utility/src/align/align-ksw2-driver.C:27:22: error: namespace name required before ‘inline’
 namespace merylutil::inline align::inline ksw2::inline v1 {
                      ^~~~~~
utility/src/align/align-ksw2-driver.C:27:22: error: expected ‘{’ before ‘inline’
utility/src/align/align-ksw2-driver.C:27:29: error: ‘align’ does not name a type; did you mean ‘asin’?
 namespace merylutil::inline align::inline ksw2::inline v1 {
                             ^~~~~
                             asin
make: *** [/home/hcaoad/Software/meryl/build/obj/lib/libmeryl.a/utility/src/align/align-ksw2-driver.o] Error 1

@brianwalenz
Copy link
Member

Unfortunately, this is caused by a "recent" fix in the C++ standard that gcc-8 does not support - "recent", as in late 2018; https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1094r2.html.

gcc-8.3 is extremely out of date (February 2019); the most mature supported version of gcc is 11.4.

@Han-Cao
Copy link
Author

Han-Cao commented Sep 14, 2023

Hi @brianwalenz

As README said dependency is gcc 7.4.0 or higher, I thought gcc-8.3 was fine to use. After using the latest gcc, there is no error now.

Thanks a lot.

@Han-Cao Han-Cao closed this as completed Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants