Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

build errors with `_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`

Closed Beginner friendly
#80 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
cpp, linux
Domain
build-system

Research direction

The build output identifies src/helpers/buffer.cpp and shows missing std::string declarations at lines 87 and 137 when compiling with clang and libc++. Start by reading that file’s includes and the project’s build configuration for the _LIBCPP_REMOVE_TRANSITIVE_INCLUDES option. Done means the reported build succeeds with that option; the issue also suggests considering a CI job.

Written by the indexing model from the issue text.

Description

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.
Dominant language
C++
Stars
14
Forks
23
Avg merge
2h 43m
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/libpisp

All issues in raspberrypi/libpisp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.