Skip to content

Alpine 3.4 trouble with Foundation/src/Error.cpp #1501

@PhilipDeegan

Description

@PhilipDeegan

Copying a working setup from centos 7, the following line causes a compilation failure:
poco-1.7.6/Foundation/src/Error.cpp:71:56: error: no matching function for call to 'std::__cxx11::basic_string::basic_string(int)'
return std::string(strerror_r(errorCode, errmsg, 256));

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/5.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-5.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 5.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-esp --enable-cloog-backend --enable-languages=c,c++,objc,java,fortran,ada --disable-libssp --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib
Thread model: posix
gcc version 5.3.0 (Alpine 5.3.0)

g++ -std=c++14 -DNDEBUG -O2 -fPIC -fstack-protector -Wformat -Wformat-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Ipoco-1.7.6/Foundation/include -DPOCO_BUILD_HOST=localhost.localdomain -DPOCO_TARGET_OSNAME=Linux -DPOCO_TARGET_OSARCH=x86_64 -D_XOPEN_SOURCE=500 -D_REENTRANT -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPOCO_HAVE_FD_EPOLL -DNDEBUG -o Error.o -c poco-1.7.6/Foundation/src/Error.cpp

poco-1.7.6/Foundation/src/Error.cpp: In static member function 'static std::__cxx11::string Poco::Error::getMessage(int)':
poco-1.7.6/Foundation/src/Error.cpp:71:56: error: no matching function for call to 'std::__cxx11::basic_string::basic_string(int)'
return std::string(strerror_r(errorCode, errmsg, 256));

Replacing the line with the "#else" line of "return std::string(strerror(errorCode));" works

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions