yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
879 stars 112 forks source link

Build error on 10.7–10.12: Undefined symbols for architecture x86_64: "typeinfo for std::bad_any_cast" #262

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago
[ 50%] Linking CXX executable calc2
cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_cpp-peglib/cpp-peglib/work/build/example && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/calc2.dir/link.txt --verbose=ON
/opt/local/bin/clang++-mp-15 -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -Wall -Wextra -arch x86_64 -mmacosx-version-min=10.12 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names CMakeFiles/calc2.dir/calc2.cc.o -o calc2  -Wl,-rpath,/opt/local/lib 
Undefined symbols for architecture x86_64:
  "typeinfo for std::bad_any_cast", referenced from:
      __ZNSt3__120__throw_bad_any_castB6v15007Ev in calc2.cc.o
  "vtable for std::bad_any_cast", referenced from:
      std::bad_any_cast::bad_any_cast() in calc2.cc.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64

10.12: https://build.macports.org/builders/ports-10.12_x86_64-builder/builds/215532/steps/install-port/logs/stdio 10.7: https://build.macports.org/builders/ports-10.7_x86_64-builder/builds/130320/steps/install-port/logs/stdio Port health: https://ports.macports.org/port/cpp-peglib/details (and other build logs)

yhirose commented 1 year ago

@barracuda156, thanks for the report. Could you give more datails?

barracuda156 commented 1 year ago

@yhirose Could you check logs? This is from 10.12: https://build.macports.org/builders/ports-10.12_x86_64-builder/builds/215532/steps/install-port/logs/stdio This is on build bots, I have no local access, but logs are detailed enough, perhaps.

yhirose commented 1 year ago

@yhirose, I took a look at the log, but I don't know why that happens... Since I don't care for old operating systems and Mac ports, I am ok to leave it as it is...