Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GCCs mm_malloc.h?
On Tue, 21 Oct 2014 15:58:04 +0200 (CEST)
Havard Eidnes <he%NetBSD.org@localhost> wrote:
> Hi,
>
> for some odd reason that I've not yet found, the file
> /usr/include/gcc-4.5/mm_malloc.h is being included by one of the
> configure tests for the net/libcmis package, and configure is
> failing with this error:
>
> /usr/include/gcc-4.5/mm_malloc.h:34:64: error: declaration of 'int
> posix_memalign(void**, size_t, size_t) throw ()' throws different
> exceptions /usr/include/stdlib.h:237:6: error: from previous
> declaration 'int posix_memalign(void**, size_t, size_t)'
>
> The mm_malloc.h header is itself including stdlib.h, the section
> of code looks like this:
>
> #include <stdlib.h>
>
> /* We can't depend on <stdlib.h> since the prototype of posix_memalign
> may not be visible. */
> #ifndef __cplusplus
> extern int posix_memalign (void **, size_t, size_t);
> #else
> extern "C" int posix_memalign (void **, size_t, size_t) throw ();
> #endif
>
> So why the throw()?!? I didn't know C code could throw C++
> exceptions, but I've not been following in detail what GCC is up
> to lately...
>
> Including this file on NetBSD/amd64 6.1.5 (my particular case)
> will therefore always file if you're compiling C++.
>
> What's the appropriate fix?
>
> This is causing net/libcmis to fail to build which is in turn
> causing net/libreoffice4 to fail to build...
See PR#49199. Is this something more easily fixed by requiring a gcc
from pkgsrc instead of the default one?
Later...
Greg Oster
Home |
Main Index |
Thread Index |
Old Index