Re: Error Compiling on macOS
James Pedersen <[email protected]> Wed, 1 May 2024 09:46:09 -0700
| Newsgroups | gmane.comp.sysutils.backup.dar.support |
|---|---|
| Message-ID | <CADHtKCdor-Y3AmqCUkWqJKsWRZHsQ8JV5J-tmWzaVeDuCWxdRw@mail.gmail.com> |
Denis, This error was not present when I compiled dar 2.7.15.RC1 on my other MacOS Mojave laptop today. James Pedersen On Tue, Apr 30, 2024 at 6:20 AM Rolf Gebhardt <[email protected]> wrote: > Hi Denis, hi James, > > first of all, I totally agree that adding the noexcept specification to > the smart_xxx class templates can not be a solution for the future. It's > no more than a patch to get dar/libdar compiled on an outdated compiler > with outdated standard libraries on an outdateted operating system. > > And because - as I told you - I'm not very familiar with exception > specification and the ways they are used in C++ - as far as I > understood, the meaning "it's impossible that this function throws" is > not the only one - I can not contribute much to this discussion. > > The only thing I want to say was already mentioned in the first sentenc > above: It's a problem with an outdated compiler with outdated standard > libraries on an outdateted operating system. MacOS Mojave is not > supported by apple any more and Apples development tools and libraries > either won't get any updates any more. The only reason to use it, is if > you have an old Mac that cannot be updated to newer MacOs-Versions. > > On the current version MacOS with the corresponding tools and libraries > dar compiles fine. > > @Denis: Just to prevent you from spending hours or days of your valuable > time to solve problems of the past. > > Kind regards to all, > > Rolf > > > Am 27.04.24 um 21:15 schrieb Denis Corbin: > > On 25/04/2024 01:39, James Pedersen wrote: > >> Hi Denis and Rolf, > > > > Hi James, > > > >> > >> Thank you for getting back to me about this as well as for suggesting > >> some solutions to this issue. > >> > >> Denis, following your advice, I removed the "noexcept" statement from > >> the move assignment operator definition in a bunch of the .hpp files > >> in src/libdar/, and then the errors went away. > >> > >> Rolf, I think that you have made a good observation here. In the > >> definition of the smart_pointer move assignment operator in > >> smart_pointer.hpp, it seems that it can throw exceptions because > >> /del_ref() /can throw exceptions. cat_nomme.hpp and cat_detruit.hpp > >> are subclasses of cat_entree.hpp, and hence it seems that they would > >> both inherit the smart_pointer variable pdesc of cat_entree.hpp. > >> Since the move assignment operator of smart_pointer can throw > >> exception/s/, I would like to suggest that maybe the right solution > >> to this is to just remove the "noexcept" keyword for any move > >> assignment operator of a subclass of cat_entree.hpp? > > > > Yes, I agree with your analysis, smart_pointer/smart_node may throw > > exception thus the absence of noexcept keyword here is normal. > > > > I will go that way. first I have to reproduce the problem (which I > > failed under Devuan using clang, will try other distro/clang version) > > to be sure the fix to be exhaustive. > > > >> > >> Anyways, thank you both for helping me with this, > >> James Pedersen > >> > > > > Regards, > > Denis > >> > > > >> > >> > >> > >> > >> > > > >