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

Does not build on CentOS 6 #2

Closed
odeneriksson opened this issue Mar 28, 2019 · 4 comments
Closed

Does not build on CentOS 6 #2

odeneriksson opened this issue Mar 28, 2019 · 4 comments

Comments

@odeneriksson
Copy link

g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23)

make CXXFLAGS="-std=c++0x"

[...]

g++ -std=c++0x -c ../http/cookiefile.cpp -o ../http/cookiefile.o
In file included from ../http/../http/cookiemanager.h:12,
from ../http/cookiefile.h:8,
from ../http/cookiefile.cpp:7:
../http/../http/../framework/logger.h:42: error: 'std::chrono::steady_clock' has not been declared
../http/../http/../framework/logger.h:42: error: expected initializer before 'TimePoint'
../http/../http/../framework/logger.h:106: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:106: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:107: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:107: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:108: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:108: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:109: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:109: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:110: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:110: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:114: error: 'TimePoint' does not name a type
../http/../http/../framework/logger.h:118: error: 'TimePoint' does not name a type
../http/../http/../framework/logger.h:190: error: 'TimePoint' does not name a type
../http/../http/../framework/logger.h: In static member function 'static bool Logger::hasExpired(int)':
../http/../http/../framework/logger.h:111: error: 't' was not declared in this scope
../http/../http/../framework/logger.h: In static member function 'static long int Logger::elapsed()':
../http/../http/../framework/logger.h:179: error: 'start_time' was not declared in this scope
In file included from ../http/cookiefile.h:8,
from ../http/cookiefile.cpp:7:
../http/../http/cookiemanager.h: At global scope:
../http/../http/cookiemanager.h:82: error: 'TimePoint' does not name a type
../http/../http/cookiemanager.h:83: error: ISO C++ forbids initialization of member 'dirty'
../http/../http/cookiemanager.h:83: error: making 'dirty' static
../http/../http/cookiemanager.h:83: error: ISO C++ forbids in-class initialization of non-const static member 'dirty'
../http/../http/cookiemanager.h:84: error: ISO C++ forbids initialization of member 't_now'
../http/../http/cookiemanager.h:84: error: making 't_now' static
../http/../http/cookiemanager.h:84: error: ISO C++ forbids in-class initialization of non-const static member 't_now'
../http/../http/cookiemanager.h:85: error: ISO C++ forbids initialization of member 's_now'
../http/../http/cookiemanager.h:85: error: making 's_now' static
../http/../http/cookiemanager.h:85: error: invalid in-class initialization of static data member of non-integral type 'std::string'
In file included from ../http/cookiefile.cpp:7:
../http/cookiefile.h:34: error: 'CookieFile::CookieFile(CookieFile&&)' cannot be defaulted
../http/cookiefile.cpp: In member function 'void CookieFile::writeCookiesFile()':
../http/cookiefile.cpp:64: error: expected initializer before ':' token
../http/cookiefile.cpp:93: error: expected primary-expression at end of input
../http/cookiefile.cpp:93: error: expected ';' at end of input
../http/cookiefile.cpp:93: error: expected primary-expression at end of input
../http/cookiefile.cpp:93: error: expected ')' at end of input
../http/cookiefile.cpp:93: error: expected statement at end of input
../http/cookiefile.cpp:93: error: expected '}' at end of input
make: *** [../http/cookiefile.o] Error 1
[oer@uv112 cli]$ LC_ALL=C make CXXFLAGS="-std=c++0x"
g++ -std=c++0x -c ../http/cookiefile.cpp -o ../http/cookiefile.o
In file included from ../http/../http/cookiemanager.h:12,
from ../http/cookiefile.h:8,
from ../http/cookiefile.cpp:7:
../http/../http/../framework/logger.h:42: error: 'std::chrono::steady_clock' has not been declared
../http/../http/../framework/logger.h:42: error: expected initializer before 'TimePoint'
../http/../http/../framework/logger.h:106: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:106: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:107: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:107: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:108: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:108: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:109: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:109: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:110: error: ISO C++ forbids declaration of 'TimePoint' with no type
../http/../http/../framework/logger.h:110: error: expected ',' or '...' before '&' token
../http/../http/../framework/logger.h:114: error: 'TimePoint' does not name a type
../http/../http/../framework/logger.h:118: error: 'TimePoint' does not name a type
../http/../http/../framework/logger.h:190: error: 'TimePoint' does not name a type
../http/../http/../framework/logger.h: In static member function 'static bool Logger::hasExpired(int)':
../http/../http/../framework/logger.h:111: error: 't' was not declared in this scope
../http/../http/../framework/logger.h: In static member function 'static long int Logger::elapsed()':
../http/../http/../framework/logger.h:179: error: 'start_time' was not declared in this scope
In file included from ../http/cookiefile.h:8,
from ../http/cookiefile.cpp:7:
../http/../http/cookiemanager.h: At global scope:
../http/../http/cookiemanager.h:82: error: 'TimePoint' does not name a type
../http/../http/cookiemanager.h:83: error: ISO C++ forbids initialization of member 'dirty'
../http/../http/cookiemanager.h:83: error: making 'dirty' static
../http/../http/cookiemanager.h:83: error: ISO C++ forbids in-class initialization of non-const static member 'dirty'
../http/../http/cookiemanager.h:84: error: ISO C++ forbids initialization of member 't_now'
../http/../http/cookiemanager.h:84: error: making 't_now' static
../http/../http/cookiemanager.h:84: error: ISO C++ forbids in-class initialization of non-const static member 't_now'
../http/../http/cookiemanager.h:85: error: ISO C++ forbids initialization of member 's_now'
../http/../http/cookiemanager.h:85: error: making 's_now' static
../http/../http/cookiemanager.h:85: error: invalid in-class initialization of static data member of non-integral type 'std::string'
In file included from ../http/cookiefile.cpp:7:
../http/cookiefile.h:34: error: 'CookieFile::CookieFile(CookieFile&&)' cannot be defaulted
../http/cookiefile.cpp: In member function 'void CookieFile::writeCookiesFile()':
../http/cookiefile.cpp:64: error: expected initializer before ':' token
../http/cookiefile.cpp:93: error: expected primary-expression at end of input
../http/cookiefile.cpp:93: error: expected ';' at end of input
../http/cookiefile.cpp:93: error: expected primary-expression at end of input
../http/cookiefile.cpp:93: error: expected ')' at end of input
../http/cookiefile.cpp:93: error: expected statement at end of input
../http/cookiefile.cpp:93: error: expected '}' at end of input
make: *** [../http/cookiefile.o] Error 1

@cdybedahl
Copy link

As specified in the README file, this code requires a C++11 compiler to build. For gcc, that means version 4.7 or later. You're trying to build with gcc version 4.4.7.

@odeneriksson
Copy link
Author

Yes I'm aware of that, consider this a request.

Thanks in advance.

@initgoran
Copy link
Contributor

The code will not be ported to older C++.

To run on Centos 6, simply install a C++11 compiler, the build and run. E,g,
https://hiltmon.com/blog/2015/08/09/c-plus-plus-11-on-centos-6-dot-6/
You could also build using a virtual machine and then copy the cli binary to the target platform.

@odeneriksson
Copy link
Author

Thank you, I'm aware of SCL but hoped to avoid that.

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

3 participants