* [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99
2015-07-02 18:05 [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99 Bernd Kuhls
@ 2015-07-02 20:40 ` Yann E. MORIN
2015-07-02 21:12 ` Peter Seiderer
2015-07-04 12:14 ` Thomas Petazzoni
2 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-02 20:40 UTC (permalink / raw)
To: buildroot
Bernd, all,
On 2015-07-02 20:05 +0200, Bernd Kuhls spake thusly:
> Fixes
> checking for /home/fli4l/buildroot/output/host/usr/bin/i586-buildroot-linux-uclibc-gcc option to accept ISO C99... unsupported
> configure: error: Building libdrm requires C99 enabled compiler
>
> using this defconfig
> BR2_KERNEL_HEADERS_4_0=y
> BR2_BINUTILS_VERSION_2_25=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_PACKAGE_LIBDRM=y
>
> Patch inspired by
> http://git.buildroot.net/buildroot/commit/?id=5cf5b390385fb6325485e37dc9d38e1e3ac1f091
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> package/libdrm/libdrm.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
> index 4cca645..1768214 100644
> --- a/package/libdrm/libdrm.mk
> +++ b/package/libdrm/libdrm.mk
> @@ -19,6 +19,8 @@ LIBDRM_CONF_OPTS = \
> --disable-cairo-tests \
> --disable-manpages
>
> +LIBDRM_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
> +
> ifeq ($(BR2_PACKAGE_LIBDRM_INTEL),y)
> LIBDRM_CONF_OPTS += --enable-intel
> LIBDRM_DEPENDENCIES += libatomic_ops libpciaccess
> --
> 1.7.10.4
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99
2015-07-02 18:05 [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99 Bernd Kuhls
2015-07-02 20:40 ` Yann E. MORIN
@ 2015-07-02 21:12 ` Peter Seiderer
2015-07-02 21:46 ` Arnout Vandecappelle
2015-07-04 12:14 ` Thomas Petazzoni
2 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2015-07-02 21:12 UTC (permalink / raw)
To: buildroot
Hello Bernd,
On Thu, 2 Jul 2015 20:05:02 +0200, Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
> Fixes
> checking for /home/fli4l/buildroot/output/host/usr/bin/i586-buildroot-linux-uclibc-gcc option to accept ISO C99... unsupported
> configure: error: Building libdrm requires C99 enabled compiler
>
> using this defconfig
> BR2_KERNEL_HEADERS_4_0=y
> BR2_BINUTILS_VERSION_2_25=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_PACKAGE_LIBDRM=y
>
> Patch inspired by
> http://git.buildroot.net/buildroot/commit/?id=5cf5b390385fb6325485e37dc9d38e1e3ac1f091
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/libdrm/libdrm.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
> index 4cca645..1768214 100644
> --- a/package/libdrm/libdrm.mk
> +++ b/package/libdrm/libdrm.mk
> @@ -19,6 +19,8 @@ LIBDRM_CONF_OPTS = \
> --disable-cairo-tests \
> --disable-manpages
>
> +LIBDRM_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
> +
> ifeq ($(BR2_PACKAGE_LIBDRM_INTEL),y)
> LIBDRM_CONF_OPTS += --enable-intel
> LIBDRM_DEPENDENCIES += libatomic_ops libpciaccess
Same problem with libv4l (with raspberrypi_defconfig):
libv4l2rds.c:256:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < tuning->station_cnt; i++) {
^
libv4l2rds.c:256:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
From build/libv4l-1.6.2/config.log:
configure:4709: checking for .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc option to accept ISO C99
configure:4858: .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
conftest.c:54:9: error: unknown type name 'wchar_t'
const wchar_t *name;
The C99 detection problem seems more related to missing wchar_t type support than the compiler option?
Adding LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=c99' gives a lot of compile errors like:
libv4lconvert.c: In function 'dev_ioctl':
processing/../libv4lsyscall-priv.h:85:10: error: 'SYS_ioctl' undeclared (first use in this function)
syscall(SYS_ioctl, (int)(fd), (unsigned long)(cmd), (void *)(arg))
^
libv4lconvert.c:43:9: note: in expansion of macro 'SYS_IOCTL'
return SYS_IOCTL(fd, cmd, arg);
^
processing/../libv4lsyscall-priv.h:85:10: note: each undeclared identifier is reported only once for each function it appears in
syscall(SYS_ioctl, (int)(fd), (unsigned long)(cmd), (void *)(arg))
^
libv4lconvert.c:43:9: note: in expansion of macro 'SYS_IOCTL'
return SYS_IOCTL(fd, cmd, arg);
^
Adding LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' solves all configure/compile errors.
Maybe it is a uclibc-ng and/or autoconf related problem (and there is a better/more general) solution
other than to overwrite ac_cv_prog_cc_c99 for a lot of packages?
Regards,
Peter
^ permalink raw reply [flat|nested] 8+ messages in thread* [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99
2015-07-02 21:12 ` Peter Seiderer
@ 2015-07-02 21:46 ` Arnout Vandecappelle
2015-07-02 22:05 ` Yann E. MORIN
0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2015-07-02 21:46 UTC (permalink / raw)
To: buildroot
On 07/02/15 23:12, Peter Seiderer wrote:
[snip]
> From build/libv4l-1.6.2/config.log:
>
> configure:4709: checking for .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc option to accept ISO C99
> configure:4858: .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
> conftest.c:54:9: error: unknown type name 'wchar_t'
> const wchar_t *name;
>
>
> The C99 detection problem seems more related to missing wchar_t type support than the compiler option?
Good catch!
[Adding Waldemar for uClibc input]
The configure script does include wchar.h, but it seems that wchar_t doesn't
get defined after all... Waldemar, any idea?
Regards,
Arnout
[snip]
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99
2015-07-02 21:46 ` Arnout Vandecappelle
@ 2015-07-02 22:05 ` Yann E. MORIN
2015-07-02 22:19 ` Peter Seiderer
0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-02 22:05 UTC (permalink / raw)
To: buildroot
Arnout, All,
On 2015-07-02 23:46 +0200, Arnout Vandecappelle spake thusly:
> On 07/02/15 23:12, Peter Seiderer wrote:
> [snip]
> > From build/libv4l-1.6.2/config.log:
> >
> > configure:4709: checking for .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc option to accept ISO C99
> > configure:4858: .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
> > conftest.c:54:9: error: unknown type name 'wchar_t'
> > const wchar_t *name;
> >
> >
> > The C99 detection problem seems more related to missing wchar_t type support than the compiler option?
>
> Good catch!
>
> [Adding Waldemar for uClibc input]
>
> The configure script does include wchar.h, but it seems that wchar_t doesn't
> get defined after all... Waldemar, any idea?
No wchar support in the toolchain, maybe?
Peter, can you confirm your toolchain is missing wchar (BR2_USE_WCHAR)?
Note: I am *not* saying those packages should depend on whar, just that
this would explain the failing (and broken!) autoconf test.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99
2015-07-02 22:05 ` Yann E. MORIN
@ 2015-07-02 22:19 ` Peter Seiderer
2015-07-02 22:22 ` Yann E. MORIN
0 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2015-07-02 22:19 UTC (permalink / raw)
To: buildroot
Hello Yann,
On Fri, 3 Jul 2015 00:05:34 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> Arnout, All,
>
> On 2015-07-02 23:46 +0200, Arnout Vandecappelle spake thusly:
> > On 07/02/15 23:12, Peter Seiderer wrote:
> > [snip]
> > > From build/libv4l-1.6.2/config.log:
> > >
> > > configure:4709: checking for .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc option to accept ISO C99
> > > configure:4858: .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
> > > conftest.c:54:9: error: unknown type name 'wchar_t'
> > > const wchar_t *name;
> > >
> > >
> > > The C99 detection problem seems more related to missing wchar_t type support than the compiler option?
> >
> > Good catch!
> >
> > [Adding Waldemar for uClibc input]
> >
> > The configure script does include wchar.h, but it seems that wchar_t doesn't
> > get defined after all... Waldemar, any idea?
>
> No wchar support in the toolchain, maybe?
>
> Peter, can you confirm your toolchain is missing wchar (BR2_USE_WCHAR)?
>
Used up to date raspberrypi_defconfig, no wchar support enabled:
# BR2_TOOLCHAIN_BUILDROOT_WCHAR is not set
Regards,
Peter
> Note: I am *not* saying those packages should depend on whar, just that
> this would explain the failing (and broken!) autoconf test.
>
> Regards,
> Yann E. MORIN.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99
2015-07-02 22:19 ` Peter Seiderer
@ 2015-07-02 22:22 ` Yann E. MORIN
0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-02 22:22 UTC (permalink / raw)
To: buildroot
Peter, All,
On 2015-07-03 00:19 +0200, Peter Seiderer spake thusly:
> On Fri, 3 Jul 2015 00:05:34 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:
> > On 2015-07-02 23:46 +0200, Arnout Vandecappelle spake thusly:
> > > On 07/02/15 23:12, Peter Seiderer wrote:
> > > [snip]
> > > > From build/libv4l-1.6.2/config.log:
> > > >
> > > > configure:4709: checking for .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc option to accept ISO C99
> > > > configure:4858: .../host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -std=gnu99 -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
> > > > conftest.c:54:9: error: unknown type name 'wchar_t'
> > > > const wchar_t *name;
> > > >
> > > >
> > > > The C99 detection problem seems more related to missing wchar_t type support than the compiler option?
> > >
> > > Good catch!
> > >
> > > [Adding Waldemar for uClibc input]
> > >
> > > The configure script does include wchar.h, but it seems that wchar_t doesn't
> > > get defined after all... Waldemar, any idea?
> >
> > No wchar support in the toolchain, maybe?
> >
> > Peter, can you confirm your toolchain is missing wchar (BR2_USE_WCHAR)?
> >
>
> Used up to date raspberrypi_defconfig, no wchar support enabled:
Note that I just updated it two days ago. ;-)
> # BR2_TOOLCHAIN_BUILDROOT_WCHAR is not set
OK, thanks; that explains it.
Still ,that autoconf test is broken... :-(
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99
2015-07-02 18:05 [Buildroot] [PATCH 1/1] package/libdrm: fix building if GCC's C standard is not gnu99 Bernd Kuhls
2015-07-02 20:40 ` Yann E. MORIN
2015-07-02 21:12 ` Peter Seiderer
@ 2015-07-04 12:14 ` Thomas Petazzoni
2 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2015-07-04 12:14 UTC (permalink / raw)
To: buildroot
Dear Bernd Kuhls,
On Thu, 2 Jul 2015 20:05:02 +0200, Bernd Kuhls wrote:
> Fixes
> checking for /home/fli4l/buildroot/output/host/usr/bin/i586-buildroot-linux-uclibc-gcc option to accept ISO C99... unsupported
> configure: error: Building libdrm requires C99 enabled compiler
>
> using this defconfig
> BR2_KERNEL_HEADERS_4_0=y
> BR2_BINUTILS_VERSION_2_25=y
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_PACKAGE_LIBDRM=y
>
> Patch inspired by
> http://git.buildroot.net/buildroot/commit/?id=5cf5b390385fb6325485e37dc9d38e1e3ac1f091
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/libdrm/libdrm.mk | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 8+ messages in thread