pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: x11/fltk2 compilation failure
On Fri, 16 Nov 2018, at 16:51:21 +0530, Mayuresh wrote:
>On netBSD 8.0_RC1 pkgsrc-current:
>
>In file included from /usr/include/stdio.h:597:0,
> from ../fltk/string.h:45,
> from string.c:22:
>../fltk/string.h:72:19: error: expected declaration specifiers or '...'
>before numeric constant
> FL_API extern int snprintf(char *, size_t, const char *, ...);
> ^
>In file included from /usr/include/ssp/strings.h:34:0,
> from /usr/include/strings.h:72,
> from /usr/include/string.h:98,
> from ../fltk/string.h:43,
> from string.c:22:
>../fltk/string.h:72:19: error: expected declaration specifiers or '...'
>before '__builtin_object_size'
> FL_API extern int snprintf(char *, size_t, const char *, ...);
> ^
>In file included from /usr/include/stdio.h:597:0,
> from ../fltk/string.h:45,
> from string.c:22:
>../fltk/string.h:73:19: error: expected declaration specifiers or '...'
>before numeric constant
> FL_API extern int vsnprintf(char *, size_t, const char *, va_list ap);
> ^
>In file included from /usr/include/ssp/strings.h:34:0,
> from /usr/include/strings.h:72,
> from /usr/include/string.h:98,
> from ../fltk/string.h:43,
> from string.c:22:
>../fltk/string.h:73:19: error: expected declaration specifiers or '...'
>before '__builtin_object_size'
> FL_API extern int vsnprintf(char *, size_t, const char *, va_list ap);
> ^
>../makeinclude:129: recipe for target 'string.o' failed
>
>
>I am using the base C compiler:
>
># cc -v
>Using built-in specs.
>COLLECT_GCC=cc
>COLLECT_LTO_WRAPPER=/usr/libexec/lto-wrapper
>Target: x86_64--netbsd
>Configured with:
>/usr/src/tools/gcc/../../external/gpl3/gcc.old/dist/configure
>--target=x86_64--netbsd --enable-long-long --enable-threads
>--with-bugurl=http://www.NetBSD.org/Misc/send-pr.html
>--with-pkgversion='Ne
>tBSD nb1 20171112' --with-system-zlib --disable-libstdcxx-dual-abi
>--enable-__cxa_atexit --enable-libstdcxx-time=rt
>--enable-libstdcxx-threads --with-tune=nocona
>--with-diagnostics-color=auto-if-env --with-mpc-lib=
>/var/obj/mknative/amd64-x86_64/usr/src/external/lgpl3/mpc/lib/libmpc
>--with-mpfr-lib=/var/obj/mknative/amd64-x86_64/usr/src/external/lgpl3/mpfr/lib/libmpfr
>--with-gmp-lib=/var/obj/mknative/amd64-x86_64/usr/src/exte
>rnal/lgpl3/gmp/lib/libgmp
>--with-mpc-include=/usr/src/external/lgpl3/mpc/dist/src
>--with-mpfr-include=/usr/src/external/lgpl3/mpfr/dist/src
>--with-gmp-include=/usr/src/external/lgpl3/gmp/lib/libgmp/arch/x86_64 --en
>able-tls --disable-multilib --disable-symvers --disable-libstdcxx-pch
>--disable-libstdcxx-dual-abi --build=x86_64-unknown-netbsd7.1
>--host=x86_64--netbsd
>--with-sysroot=/var/obj/mknative/amd64-x86_64/usr/src/destdi
>r.amd64
>Thread model: posix
>gcc version 5.5.0 (nb2 20180327)
>
>
>Does that look like a compiler version issue?
Well, if you look at where this is coming from, rather than using a
configure script to detect whether a given OS has particular string
functions or not, instead they're using hard-coded assumptions. One
way around this would be the following (which I tested, the package
built for me, but I haven't actually used the package):
--- fltk/string.h.orig 2007-10-17 16:54:58.000000000 -0400
+++ fltk/string.h 2018-11-21 00:26:11.531403345 -0500
@@ -68,12 +68,12 @@
FL_API extern int strncasecmp(const char *, const char *, size_t);
#endif
-#if defined(DOXYGEN) || !defined(__linux) && !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__APPLE__)
+#if defined(DOXYGEN) || !defined(__linux) && !defined(_WIN32) && !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__NetBSD__)
FL_API extern int snprintf(char *, size_t, const char *, ...);
FL_API extern int vsnprintf(char *, size_t, const char *, va_list ap);
#endif
-#if defined(DOXYGEN) || !defined(__FreeBSD__) && !defined(__APPLE__)
+#if defined(DOXYGEN) || !defined(__FreeBSD__) && !defined(__APPLE__) && !defined(__NetBSD__)
FL_API extern size_t strlcat(char *, const char *, size_t);
FL_API extern size_t strlcpy(char *, const char *, size_t);
#endif
Regards,
Dave
Home |
Main Index |
Thread Index |
Old Index