ned14 / status-code

Proposed SG14 status_code for the C++ standard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vcpkg failed to build status-code on arch linux

cliffspradlin opened this issue · comments

As far as I know, this is a pretty stock build of arch linux (x86-64).

I was able to fix the below issues by manually adding includes for < stdexcept > and < system_error >.

c++ --version
c++ (GCC) 13.2.1 20230801

[1/19] /usr/bin/c++  -I/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/include -fPIC -O3 -DNDEBUG -fexceptions -frtti -MD -MT CMakeFiles/example-thrown_exception.dir/example/thrown_exception.cpp.o -MF CMakeFiles/example-thrown_exception.dir/example/thrown_exception.cpp.o.d -o CMakeFiles/example-thrown_exception.dir/example/thrown_exception.cpp.o -c /opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp
FAILED: CMakeFiles/example-thrown_exception.dir/example/thrown_exception.cpp.o 
/usr/bin/c++  -I/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/include -fPIC -O3 -DNDEBUG -fexceptions -frtti -MD -MT CMakeFiles/example-thrown_exception.dir/example/thrown_exception.cpp.o -MF CMakeFiles/example-thrown_exception.dir/example/thrown_exception.cpp.o.d -o CMakeFiles/example-thrown_exception.dir/example/thrown_exception.cpp.o -c /opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp: In static member function ‘static system_error2::errc _thrown_exception_domain::_to_generic_code(value_type)’:
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:112:39: error: expected unqualified-id before ‘&’ token
  112 |     catch(const std::invalid_argument & /*unused*/)
      |                                       ^
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:112:39: error: expected ‘)’ before ‘&’ token
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:112:10: note: to match this ‘(’
  112 |     catch(const std::invalid_argument & /*unused*/)
      |          ^
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:112:39: error: expected ‘{’ before ‘&’ token
  112 |     catch(const std::invalid_argument & /*unused*/)
      |                                       ^
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:112:51: error: expected primary-expression before ‘)’ token
  112 |     catch(const std::invalid_argument & /*unused*/)
      |                                                   ^
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:116:5: error: expected primary-expression before ‘catch’
  116 |     catch(const std::domain_error & /*unused*/)
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:120:5: error: expected primary-expression before ‘catch’
  120 |     catch(const std::length_error & /*unused*/)
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:124:5: error: expected primary-expression before ‘catch’
  124 |     catch(const std::out_of_range & /*unused*/)
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:128:5: error: expected primary-expression before ‘catch’
  128 |     catch(const std::logic_error & /*unused*/) /* base class for this group */
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:132:5: error: expected primary-expression before ‘catch’
  132 |     catch(const std::system_error &e) /* also catches ios::failure */
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:136:5: error: expected primary-expression before ‘catch’
  136 |     catch(const std::overflow_error & /*unused*/)
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:140:5: error: expected primary-expression before ‘catch’
  140 |     catch(const std::range_error & /*unused*/)
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:144:5: error: expected primary-expression before ‘catch’
  144 |     catch(const std::runtime_error & /*unused*/) /* base class for this group */
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:148:5: error: expected primary-expression before ‘catch’
  148 |     catch(const std::bad_alloc & /*unused*/)
      |     ^~~~~
/opt/vcpkg/buildtrees/status-code/src/71f6c1959c-eca914f18c.clean/example/thrown_exception.cpp:152:5: error: expected primary-expression before ‘catch’
  152 |     catch(...)
      |     ^~~~~

I will hopefully find some time to update the vcpkg port later this week. Thanks for the BR!