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

Build Error in gcc 8 with POCO 1.13.0 Release. #4532

Closed
navinagaraj opened this issue Apr 17, 2024 · 3 comments
Closed

Build Error in gcc 8 with POCO 1.13.0 Release. #4532

navinagaraj opened this issue Apr 17, 2024 · 3 comments
Labels

Comments

@navinagaraj
Copy link

When attempting to build POCO 1.13.0 with gcc 8, we encountered errors during the compilation process. Interestingly, the same version of POCO built successfully with gcc 9.

Error:

In file included from poco-poco-1.13.0-release/Foundation/src/Thread.cpp:28:
poco-poco-1.13.0-release/Foundation/src/Thread_POSIX.cpp: In member function 'void Poco::ThreadImpl::setNameImpl(const string&)':
poco-poco-1.13.0-release/Foundation/src/Thread_POSIX.cpp:156:56: error: no matching function for call to 'std::__cxx11::basic_string<char>::append(const string&, std::__cxx11::basic_string<char>::size_type)'
   truncName.append(threadName, threadName.size() - half);

platform Info:

Kernel Architecture   -> arm  (Linux)           
Kernel Version        -> 4.19 
gcc                   -> 8.1.0           
glibc                 -> 2.19

@matejk matejk added the bug label Apr 17, 2024
@matejk
Copy link
Contributor

matejk commented Apr 17, 2024

std::string::append function was introduced in C++20.

@andrewauclair
Copy link
Contributor

andrewauclair commented Apr 18, 2024

std::string::append has existed long before C++20. This appears to be a regression in GCC 8.1 and the below program compiles just fine in 7.5 and 8.2+. I would recommend upgrading your compiler. GCC 8 is rather old at this point.

#include <string>

int main()
{
    std::string a,b = "test";

    a.append(b, 1);
}

@matejk
Copy link
Contributor

matejk commented Apr 19, 2024

I misread the documentation.

Closing the issue.

@matejk matejk closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants