Skip to content

build errors with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES #80

Closed

Description

@pobrn

FYI, there are some missing includes that are revealed with clang + libc++. It's not too big of a problem, but it might be useful to fix / add ci job.

FAILED: [code=1] src/libpisp.so.1.7.0.p/helpers_buffer.cpp.o 
/usr/bin/ccache clang++ -Isrc/libpisp.so.1.7.0.p -Isrc -I../src -Isrc/libpisp -I../src/libpisp -I/usr/include -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -D_GLIBCXX_DEBUG=1 -U_LIBCPP_HARDENING_MODE -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG -std=c++20 -O0 -g -DPISP_LOGGING_ENABLE=1 -DBOOST_BIND_GLOBAL_PLACEHOLDERS -Wno-address-of-packed-member -stdlib=libc++ -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -fPIC -pthread -DBOOST_LOG_DYN_LINK=1 -DBOOST_LOG_SETUP_DYN_LINK=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_USE_DLL=1 -DBOOST_ALL_NO_LIB -MD -MQ src/libpisp.so.1.7.0.p/helpers_buffer.cpp.o -MF src/libpisp.so.1.7.0.p/helpers_buffer.cpp.o.d -o src/libpisp.so.1.7.0.p/helpers_buffer.cpp.o -c ../src/helpers/buffer.cpp
../src/helpers/buffer.cpp:87:52: error: implicit instantiation of undefined template 'std::basic_string<char>'
   87 |                         throw std::runtime_error("Unable to dup fd: " + std::string(strerror(errno)));
      |                                                                         ^
/usr/bin/../include/c++/v1/__fwd/string.h:43:7: note: template is declared here
   43 | class basic_string;
      |       ^
../src/helpers/buffer.cpp:87:50: error: invalid operands to binary expression ('const char[19]' and 'std::string' (aka 'basic_string<char>'))
   87 |                         throw std::runtime_error("Unable to dup fd: " + std::string(strerror(errno)));
      |                                                  ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../include/c++/v1/__iterator/reverse_iterator.h:293:1: note: candidate template ignored: could not match 'reverse_iterator' against 'basic_string'
  293 | operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x) {
      | ^
../src/helpers/buffer.cpp:137:52: error: implicit instantiation of undefined template 'std::basic_string<char>'
  137 |                         throw std::runtime_error("Unable to dup fd: " + std::string(strerror(errno)));
      |                                                                         ^
/usr/bin/../include/c++/v1/__fwd/string.h:43:7: note: template is declared here
   43 | class basic_string;
      |       ^
../src/helpers/buffer.cpp:137:50: error: invalid operands to binary expression ('const char[19]' and 'std::string' (aka 'basic_string<char>'))
  137 |                         throw std::runtime_error("Unable to dup fd: " + std::string(strerror(errno)));
      |                                                  ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/../include/c++/v1/__iterator/reverse_iterator.h:293:1: note: candidate template ignored: could not match 'reverse_iterator' against 'basic_string'
  293 | operator+(typename reverse_iterator<_Iter>::difference_type __n, const reverse_iterator<_Iter>& __x) {
      | ^
4 errors generated.

Activity

  1. naushir commented on Oct 20, 2026

    @naushir
    Collaborator

    Should be fixed with #81. I'll add a CI job to catch future errors at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions