Ponce / slackbuilds

fork of master branch from git://git.slackbuilds.org/slackbuilds.git (read more on wiki). If you want to fork/pull request do it only over master (the other branches are temporary and are always rebased on master). alternative interface https://cgit.ponce.cc/slackbuilds/
https://slackware.ponce.cc
163 stars 62 forks source link

virtualbox-addons compile errors #197

Closed HuidaeCho closed 1 year ago

HuidaeCho commented 1 year ago

Hello, Thanks for the great repo! I'm on Slackware-current and cannot build virtualbox-addons with the following errors. Do you have any ideas how to fix these? Thanks!

In file included from /usr/include/c++/13.1.0/cmath:41,
                 from /usr/include/c++/13.1.0/math.h:36,
                 from /tmp/SBo/VirtualBox-6.1.44/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h:179,
                 from /tmp/SBo/VirtualBox-6.1.44/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/xf86_ansic.h:90,
                 from /tmp/SBo/VirtualBox-6.1.44/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp:39:
/usr/include/c++/13.1.0/bits/requires_hosted.h:34:4: error: #error "This header is not available in freestanding mode."
   34 | #  error "This header is not available in freestanding mode."
      |    ^~~~~
In file included from /usr/include/features.h:491,
                 from /usr/include/sys/types.h:25,
                 from /tmp/SBo/VirtualBox-6.1.44/include/iprt/types.h:188,
                 from /tmp/SBo/VirtualBox-6.1.44/include/iprt/assert.h:33,
                 from /tmp/SBo/VirtualBox-6.1.44/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp:33:
/usr/include/stdlib.h:621:38: error: ‘int at_quick_exit(void (*)())’ conflicts with a previous declaration
  621 |      __THROW __asm ("at_quick_exit") __nonnull ((1));
      |                                      ^~~~~~~~~
In file included from /usr/include/c++/13.1.0/stdlib.h:36,
                 from /tmp/SBo/VirtualBox-6.1.44/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h:152:
/usr/include/c++/13.1.0/cstdlib:63:18: note: previous declaration ‘int std::at_quick_exit(void (*)())’
   63 |   extern "C" int at_quick_exit(void (*)(void)) _GLIBCXX_NOTHROW;
      |                  ^~~~~~~~~~~~~
In file included from /usr/include/c++/13.1.0/bits/specfun.h:47,
                 from /usr/include/c++/13.1.0/cmath:3716:
/usr/include/c++/13.1.0/tr1/gamma.tcc: In function ‘_Tp std::__detail::__log_gamma(_Tp)’:
/usr/include/c++/13.1.0/tr1/gamma.tcc:236:18: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  236 |             std::__throw_domain_error(__N("Argument is nonpositive integer "
      |                  ^~~~~~~~~~~~~~~~~~~~
      |                  __throw_runtime_error
/usr/include/c++/13.1.0/tr1/gamma.tcc: In function ‘_Tp std::__detail::__psi(unsigned int, _Tp)’:
/usr/include/c++/13.1.0/tr1/gamma.tcc:451:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  451 |         std::__throw_domain_error(__N("Argument out of range "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
In file included from /usr/include/c++/13.1.0/bits/specfun.h:48:
/usr/include/c++/13.1.0/tr1/bessel_function.tcc: In function ‘_Tp std::__detail::__cyl_bessel_j(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/bessel_function.tcc:495:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  495 |         std::__throw_domain_error(__N("Bad argument "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/bessel_function.tcc: In function ‘_Tp std::__detail::__cyl_neumann_n(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/bessel_function.tcc:537:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  537 |         std::__throw_domain_error(__N("Bad argument "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/bessel_function.tcc: In function ‘_Tp std::__detail::__sph_bessel(unsigned int, _Tp)’:
/usr/include/c++/13.1.0/tr1/bessel_function.tcc:609:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  609 |         std::__throw_domain_error(__N("Bad argument "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/bessel_function.tcc: In function ‘_Tp std::__detail::__sph_neumann(unsigned int, _Tp)’:
/usr/include/c++/13.1.0/tr1/bessel_function.tcc:647:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  647 |         std::__throw_domain_error(__N("Bad argument "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
In file included from /usr/include/c++/13.1.0/bits/specfun.h:50:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__ellint_rf(_Tp, _Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:84:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
   84 |         std::__throw_domain_error(__N("Argument less than zero "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:88:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
   88 |         std::__throw_domain_error(__N("Argument too small in __ellint_rf"));
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__ellint_1(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:227:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  227 |         std::__throw_domain_error(__N("Bad argument in __ellint_1."));
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__ellint_rd(_Tp, _Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:324:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  324 |         std::__throw_domain_error(__N("Argument less than zero "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:327:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  327 |         std::__throw_domain_error(__N("Argument too small "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__comp_ellint_2(_Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:409:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  409 |         std::__throw_domain_error(__N("Bad argument in __comp_ellint_2."));
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__ellint_2(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:441:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  441 |         std::__throw_domain_error(__N("Bad argument in __ellint_2."));
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__ellint_rc(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:500:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  500 |         std::__throw_domain_error(__N("Argument less than zero "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__ellint_rj(_Tp, _Tp, _Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:569:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:569:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  569 |         std::__throw_domain_error(__N("Argument less than zero "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:573:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  573 |         std::__throw_domain_error(__N("Argument too small "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__comp_ellint_3(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:671:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  671 |         std::__throw_domain_error(__N("Bad argument in __comp_ellint_3."));
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/ell_integral.tcc: In function ‘_Tp std::__detail::__ellint_3(_Tp, _Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/ell_integral.tcc:709:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  709 |         std::__throw_domain_error(__N("Bad argument in __ellint_3."));
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
In file included from /usr/include/c++/13.1.0/bits/specfun.h:52:
/usr/include/c++/13.1.0/tr1/hypergeometric.tcc: In function ‘_Tp std::__detail::__hyperg(_Tp, _Tp, _Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/hypergeometric.tcc:743:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  743 |         std::__throw_domain_error(__N("Argument outside unit circle "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
In file included from /usr/include/c++/13.1.0/bits/specfun.h:54:
/usr/include/c++/13.1.0/tr1/modified_bessel_func.tcc: In function ‘_Tp std::__detail::__cyl_bessel_i(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/modified_bessel_func.tcc:272:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  272 |         std::__throw_domain_error(__N("Bad argument "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
/usr/include/c++/13.1.0/tr1/modified_bessel_func.tcc: In function ‘_Tp std::__detail::__cyl_bessel_k(_Tp, _Tp)’:
/usr/include/c++/13.1.0/tr1/modified_bessel_func.tcc:308:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  308 |         std::__throw_domain_error(__N("Bad argument "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
In file included from /usr/include/c++/13.1.0/bits/specfun.h:56:
/usr/include/c++/13.1.0/tr1/poly_laguerre.tcc: In function ‘_Tp std::__detail::__poly_laguerre(unsigned int, _Tpa, _Tp)’:
/usr/include/c++/13.1.0/tr1/poly_laguerre.tcc:249:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
  249 |         std::__throw_domain_error(__N("Negative argument "
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
In file included from /usr/include/c++/13.1.0/bits/specfun.h:57:
/usr/include/c++/13.1.0/tr1/riemann_zeta.tcc: In function ‘_Tp std::__detail::__riemann_zeta_sum(_Tp)’:
/usr/include/c++/13.1.0/tr1/riemann_zeta.tcc:84:14: error: ‘__throw_domain_error’ is not a member of ‘std’; did you mean ‘__throw_runtime_error’?
   84 |         std::__throw_domain_error(__N("Bad argument in zeta sum."));
      |              ^~~~~~~~~~~~~~~~~~~~
      |              __throw_runtime_error
HuidaeCho commented 1 year ago

I had to use this patch:

--- Config.kmk.orig     2023-04-13 03:15:13.000000000 -0600
+++ Config.kmk  2023-06-16 09:59:19.820597642 -0600
@@ -7485,7 +7485,7 @@
  TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.amd64   = -m elf_x86_64
 endif
 TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS  = $(TEMPLATE_VBOXGUESTR3EXE_CFLAGS) -fno-pie -fno-merge-constants -std=c99 -ffreestanding
-TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-pie -fno-merge-constants -ffreestanding
+TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS= $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS) -fno-pie -fno-merge-constants
 TEMPLATE_VBOXGUESTR3XF86MOD_CFLAGS.linux  = $(VBOX_GCC_fno-stack-protector) # Remove symvers.h
 TEMPLATE_VBOXGUESTR3XF86MOD_CXXFLAGS.linux = $(VBOX_GCC_fno-stack-protector) # Remove symvers.h
 TEMPLATE_VBOXGUESTR3XF86MOD_SYSSUFF = .o
Ponce commented 1 year ago

Thanks for the patch!

I merged it in a dedicated virtualbox-addons branch and it will go in the main "current" branch at the next global merge.