NickvisionApps / Parabolic

Download web video and audio
https://flathub.org/apps/details/org.nickvision.tubeconverter
GNU General Public License v3.0
1.05k stars 56 forks source link

Build fails with clang on macOS < 13: `Undefined symbols for architecture x86_64: "std::__1::to_chars(char*, char*, double)"` #973

Open barracuda156 opened 6 hours ago

barracuda156 commented 6 hours ago

Parabolic is in MacPorts now, and turns out linking stage fails for macOS < 13.

[100%] Linking CXX executable org.nickvision.tubeconverter.gnome
cd /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_parabolic/parabolic/work/build/org.nickvision.tubeconverter.gnome && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/org.nickvision.tubeconverter.gnome.dir/link.txt --verbose=ON
/opt/local/bin/clang++-mp-17 -pipe -I/opt/local/libexec/openssl3/include -I/opt/local/libexec/boost/1.81/include -Os -DNDEBUG -I/opt/local/libexec/openssl3/include -I/opt/local/libexec/boost/1.81/include -isystem/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -mmacosx-version-min=12.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/libexec/openssl3/lib -L/opt/local/libexec/boost/1.81/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/controls/downloadrow.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/helpers/builder.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/helpers/dialogbase.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/helpers/gtkhelpers.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/views/adddownloaddialog.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/views/credentialdialog.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/views/keyringpage.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/views/mainwindow.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/views/preferencesdialog.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/application.cpp.o CMakeFiles/org.nickvision.tubeconverter.gnome.dir/src/main.cpp.o -o org.nickvision.tubeconverter.gnome  -Wl,-rpath,/opt/local/lib ../libparabolic/liblibparabolic.a /opt/local/lib/liblibnick.a /opt/local/libexec/boost/1.81/lib/libboost_json-mt.dylib /opt/local/libexec/boost/1.81/lib/libboost_container-mt.dylib /opt/local/lib/libcurl.dylib -framework CoreFoundation -framework CoreServices -framework IOKit -framework Security /opt/local/libexec/openssl3/lib/libssl.dylib /opt/local/libexec/openssl3/lib/libcrypto.dylib /opt/local/lib/libgmodule-2.0.dylib /opt/local/lib/libgthread-2.0.dylib /opt/local/libexec/boost/1.81/lib/libboost_date_time-mt.dylib /opt/local/lib/libadwaita-1.dylib /opt/local/lib/libgtk-4.dylib /opt/local/lib/libpangocairo-1.0.dylib /opt/local/lib/libpango-1.0.dylib /opt/local/lib/libharfbuzz.dylib /opt/local/lib/libgdk_pixbuf-2.0.dylib /opt/local/lib/libcairo-gobject.dylib /opt/local/lib/libcairo.dylib /opt/local/lib/libgraphene-1.0.dylib /opt/local/lib/libgio-2.0.dylib /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/lib/libxml++-5.0.dylib /opt/local/lib/libxml2.dylib
Undefined symbols for architecture x86_64:
  "std::__1::to_chars(char*, char*, double)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, char*) in credentialdialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, char*) in liblibparabolic.a(mainwindowcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, char*) in liblibparabolic.a(adddownloaddialogcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, char*) in liblibparabolic.a(downloadprogresschangedeventargs.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, char*) in liblibparabolic.a(subtitlelanguage.cpp.o)
      ...
  "std::__1::to_chars(char*, char*, double, std::__1::chars_format)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in credentialdialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in liblibparabolic.a(mainwindowcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in liblibparabolic.a(adddownloaddialogcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in liblibparabolic.a(downloadprogresschangedeventargs.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in liblibparabolic.a(subtitlelanguage.cpp.o)
      ...
  "std::__1::to_chars(char*, char*, double, std::__1::chars_format, int)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double>&, double, bool, bool, std::__1::__format_spec::__sign, std::__1::__format_spec::__type) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_general_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double>&, double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_scientific_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double>&, double, bool, bool, std::__1::__format_spec::__sign, std::__1::__format_spec::__type) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_general_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double>&, double, int, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, double>(std::__1::__formatter::__float_buffer<double> const&, double, int, char*) in adddownloaddialog.cpp.o
      ...
  "std::__1::to_chars(char*, char*, long double)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, char*) in credentialdialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, char*) in liblibparabolic.a(mainwindowcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, char*) in liblibparabolic.a(adddownloaddialogcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, char*) in liblibparabolic.a(downloadprogresschangedeventargs.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, char*) in liblibparabolic.a(subtitlelanguage.cpp.o)
      ...
  "std::__1::to_chars(char*, char*, long double, std::__1::chars_format)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in credentialdialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in liblibparabolic.a(mainwindowcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in liblibparabolic.a(adddownloaddialogcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in liblibparabolic.a(downloadprogresschangedeventargs.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in liblibparabolic.a(subtitlelanguage.cpp.o)
      ...
  "std::__1::to_chars(char*, char*, long double, std::__1::chars_format, int)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double>&, long double, bool, bool, std::__1::__format_spec::__sign, std::__1::__format_spec::__type) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_general_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double>&, long double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_scientific_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double>&, long double, bool, bool, std::__1::__format_spec::__sign, std::__1::__format_spec::__type) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_general_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double>&, long double, int, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<double, long double>(std::__1::__formatter::__float_buffer<double> const&, long double, int, char*) in adddownloaddialog.cpp.o
      ...
  "std::__1::to_chars(char*, char*, float)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, char*) in credentialdialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, char*) in liblibparabolic.a(mainwindowcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, char*) in liblibparabolic.a(adddownloaddialogcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, char*) in liblibparabolic.a(downloadprogresschangedeventargs.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_default[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, char*) in liblibparabolic.a(subtitlelanguage.cpp.o)
      ...
  "std::__1::to_chars(char*, char*, float, std::__1::chars_format)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in credentialdialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in liblibparabolic.a(mainwindowcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in liblibparabolic.a(adddownloaddialogcontroller.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in liblibparabolic.a(downloadprogresschangedeventargs.cpp.o)
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in liblibparabolic.a(subtitlelanguage.cpp.o)
      ...
  "std::__1::to_chars(char*, char*, float, std::__1::chars_format, int)", referenced from:
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float>&, float, bool, bool, std::__1::__format_spec::__sign, std::__1::__format_spec::__type) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_general_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float>&, float, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_scientific_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in downloadrow.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float>&, float, bool, bool, std::__1::__format_spec::__sign, std::__1::__format_spec::__type) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_general_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float>&, float, int, char*) in adddownloaddialog.cpp.o
      std::__1::__formatter::__float_result std::__1::__formatter::__format_buffer_hexadecimal_lower_case[abi:ue170006]<float, float>(std::__1::__formatter::__float_buffer<float> const&, float, int, char*) in adddownloaddialog.cpp.o
      ...
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [org.nickvision.tubeconverter.gnome/org.nickvision.tubeconverter.gnome] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_parabolic/parabolic/work/build'
make[1]: *** [org.nickvision.tubeconverter.gnome/CMakeFiles/org.nickvision.tubeconverter.gnome.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_parabolic/parabolic/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_parabolic/parabolic/work/build'
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_parabolic/parabolic/work/build" && /usr/bin/make -j4 -w all VERBOSE=ON 
Exit code: 2

Complete log: https://build.macports.org/builders/ports-12_x86_64-builder/builds/123779/steps/install-port/logs/stdio

Any idea what goes wrong?

P. S. On 10.6 I use gcc with libstdc++, there no errors. Also on macOS 13+ with Apple clang it works fine.

nlogozzo commented 4 hours ago

It seems like it's not supporting std::format and std::vformat from C++20. That's required for Parabolic.

barracuda156 commented 4 hours ago

I see. I did set the requirement for C++20 https://github.com/macports/macports-ports/blob/bacd5a9fb13699ba325c954f929e898a2a4098e2/net/parabolic/Portfile#L42 which in theory is supposed to ensure the correct compiler gets picked, but possibly it did not work quite right here (does clang-17 support the standard in full or partly?). Or otherwise libc++ on those systems does not have these, and then I am not sure if anything can be done easily.

P. S. On a side note, are you interested to be a maintainer for libnick and parabolic? If yes, I will add you.

nlogozzo commented 33 minutes ago

According to this: https://stackoverflow.com/a/71778011 it should work with libc++17

As far as being a maintainer, sure I guess, but I don't own/use any macOS system.

I plan on trying to create a macOS VM on my Linux machine tho.