* [Buildroot] Implicit declaration of mblen
@ 2017-10-21 11:10 Kees van Unen
2017-10-21 16:26 ` Peter Korsgaard
0 siblings, 1 reply; 11+ messages in thread
From: Kees van Unen @ 2017-10-21 11:10 UTC (permalink / raw)
To: buildroot
Hi,
I am using buildroot-2017.08 and I want to use X.org. When compiling
xlib_libX11-1.6.5 there is an error in imCallbk.c: implicit declaration of
function mblen. By adding a -I reference to CFLAGS in the relevant Makefile
to stdlib.h this source compiles. This happens for a number of X11 sources.
Does anybody knows how this can be solved with Buildroot?
The mblen bug also appears later on in the process when it tries to use
xlib_libx.so.
Thank you.
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-21 11:10 [Buildroot] Implicit declaration of mblen Kees van Unen
@ 2017-10-21 16:26 ` Peter Korsgaard
2017-10-21 20:44 ` Kees van Unen
0 siblings, 1 reply; 11+ messages in thread
From: Peter Korsgaard @ 2017-10-21 16:26 UTC (permalink / raw)
To: buildroot
>>>>> "Kees" == Kees van Unen <Keesvanunen@hotmail.com> writes:
> Hi,
> I am using buildroot-2017.08 and I want to use X.org. When compiling
> xlib_libX11-1.6.5 there is an error in imCallbk.c: implicit declaration of
> function mblen. By adding a -I reference to CFLAGS in the relevant Makefile
> to stdlib.h this source compiles. This happens for a number of X11 sources.
> Does anybody knows how this can be solved with Buildroot?
> The mblen bug also appears later on in the process when it tries to use
> xlib_libx.so.
The cross compiler should find stdlib.h without any special -I
flags. Can you post your defconfig file (run make savedefconfig to
generate it) and the exact error message you are seeing?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-21 16:26 ` Peter Korsgaard
@ 2017-10-21 20:44 ` Kees van Unen
2017-10-21 20:56 ` Arnout Vandecappelle
0 siblings, 1 reply; 11+ messages in thread
From: Kees van Unen @ 2017-10-21 20:44 UTC (permalink / raw)
To: buildroot
raspberrypi0_defconfig.raspberrypi0_defconfig
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/raspberrypi0_defconfig.raspberrypi0_defconfig>
mblen_error.mblen_error
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/mblen_error.mblen_error>
Hi Peter,
Thanks for your response. Uploaded defconfig en file with the error message.
Thanks.
Bye,
Kees
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-21 20:44 ` Kees van Unen
@ 2017-10-21 20:56 ` Arnout Vandecappelle
2017-10-21 21:07 ` Kees van Unen
0 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2017-10-21 20:56 UTC (permalink / raw)
To: buildroot
On 21-10-17 22:44, Kees van Unen wrote:
> raspberrypi0_defconfig.raspberrypi0_defconfig
> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/raspberrypi0_defconfig.raspberrypi0_defconfig>
This line looks pretty suspicious:
BR2_EXTRA_GCC_CONFIG_OPTIONS="-I/home/pi/Downloads/buildroot-2017.08/output/host/bassie"
Maybe that causes a wrong stlib.h somewhere?
Regards,
Arnout
>
> mblen_error.mblen_error
> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/mblen_error.mblen_error>
>
> Hi Peter,
>
> Thanks for your response. Uploaded defconfig en file with the error message.
> Thanks.
>
> Bye,
> Kees
>
>
>
> --
> Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
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] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-21 20:56 ` Arnout Vandecappelle
@ 2017-10-21 21:07 ` Kees van Unen
2017-10-22 10:02 ` Arnout Vandecappelle
0 siblings, 1 reply; 11+ messages in thread
From: Kees van Unen @ 2017-10-21 21:07 UTC (permalink / raw)
To: buildroot
> This line looks pretty suspicious:
>BR2_EXTRA_GCC_CONFIG_OPTIONS="-I/home/pi/Downloads/buildroot-2017.08/output/host/bassie"
> Maybe that causes a wrong stlib.h somewhere?
Quoted line was leftover from test. Uploaded new defconfig with same issue.
Kees
mblen_error.mblen_error
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/mblen_error.mblen_error>
raspberrypi0_defconfig.raspberrypi0_defconfig
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/raspberrypi0_defconfig.raspberrypi0_defconfig>
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-21 21:07 ` Kees van Unen
@ 2017-10-22 10:02 ` Arnout Vandecappelle
2017-10-22 13:34 ` Kees van Unen
2017-10-23 16:11 ` Kees van Unen
0 siblings, 2 replies; 11+ messages in thread
From: Arnout Vandecappelle @ 2017-10-22 10:02 UTC (permalink / raw)
To: buildroot
On 21-10-17 23:07, Kees van Unen wrote:
>> This line looks pretty suspicious:
>
>> BR2_EXTRA_GCC_CONFIG_OPTIONS="-I/home/pi/Downloads/buildroot-2017.08/output/host/bassie"
>
>> Maybe that causes a wrong stlib.h somewhere?
>
> Quoted line was leftover from test. Uploaded new defconfig with same issue.
>
> Kees
>
> mblen_error.mblen_error
> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/mblen_error.mblen_error>
> raspberrypi0_defconfig.raspberrypi0_defconfig
> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/raspberrypi0_defconfig.raspberrypi0_defconfig>
Hm, I tried that defconfig and it works for me...
Copy the the make command line from the xlib_libX11, append V=1 to it, and
you'll see the compilation commands. Copy the compilation command for the
failing file, replace the -c with -E and the -o with some filename, so you get
the preprocessed file. Then in that preprocessed file check which stdlib.h it
includes. stdlib.h should be included from include/X11/Xlibint.h.
Regards,
Arnout
--
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] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-22 10:02 ` Arnout Vandecappelle
@ 2017-10-22 13:34 ` Kees van Unen
2017-10-23 16:11 ` Kees van Unen
1 sibling, 0 replies; 11+ messages in thread
From: Kees van Unen @ 2017-10-22 13:34 UTC (permalink / raw)
To: buildroot
> Copy the the make command line from the xlib_libX11, append V=1 to it, and
> you'll see the compilation commands. Copy the compilation command for the
> failing file, replace the -c with -E and the -o with some filename, so you
> get
> the preprocessed file. Then in that preprocessed file check which stdlib.h
> it
> includes. stdlib.h should be included from include/X11/Xlibint.h.
Need some more help... When following steps above the following error
appears:
fatal error: cannot specify -o with -c, -S or -E with multiple files.
I noticed that when executing abc_new the options -fPIC -DPIC -o
.libs/imCallbk.o were automatically placed behind the compilation command
abc_old is initial compilation command
abc_new is adjusted compilation command to obtain preprocessed file
abc_old.abc_old
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/abc_old.abc_old>
abc_new.abc_new
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/abc_new.abc_new>
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-22 10:02 ` Arnout Vandecappelle
2017-10-22 13:34 ` Kees van Unen
@ 2017-10-23 16:11 ` Kees van Unen
2017-10-23 18:33 ` Peter Seiderer
1 sibling, 1 reply; 11+ messages in thread
From: Kees van Unen @ 2017-10-23 16:11 UTC (permalink / raw)
To: buildroot
> Copy the the make command line from the xlib_libX11, append V=1 to it, and
> you'll see the compilation commands. Copy the compilation command for the
> failing file, replace the -c with -E and the -o with some filename, so you
> get
> the preprocessed file. Then in that preprocessed file check which stdlib.h
> it
> includes. stdlib.h should be included from include/X11/Xlibint.h.
Hi, I managed to get the preprocessor file (see uploaded file). It includes
the next stdlib.h:
output/host/arm-buildroot-linux-uclibc/gnueabihf/sysroot/usr/include/stdlib.h
In this version of stdlib.h there is no reference to mblen (see uploaded
file).
Regards,
Kees
imCallbk.o
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/imCallbk.o>
stdlib.h
<http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/stdlib.h>
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-23 16:11 ` Kees van Unen
@ 2017-10-23 18:33 ` Peter Seiderer
2017-10-23 19:08 ` Arnout Vandecappelle
0 siblings, 1 reply; 11+ messages in thread
From: Peter Seiderer @ 2017-10-23 18:33 UTC (permalink / raw)
To: buildroot
Hello Kees,
On Mon, 23 Oct 2017 09:11:35 -0700 (MST), Kees van Unen <Keesvanunen@hotmail.com> wrote:
> > Copy the the make command line from the xlib_libX11, append V=1 to it, and
> > you'll see the compilation commands. Copy the compilation command for the
> > failing file, replace the -c with -E and the -o with some filename, so you
> > get
> > the preprocessed file. Then in that preprocessed file check which stdlib.h
> > it
> > includes. stdlib.h should be included from include/X11/Xlibint.h.
>
> Hi, I managed to get the preprocessor file (see uploaded file). It includes
> the next stdlib.h:
>
> output/host/arm-buildroot-linux-uclibc/gnueabihf/sysroot/usr/include/stdlib.h
>
> In this version of stdlib.h there is no reference to mblen (see uploaded
> file).
>
> Regards,
> Kees
>
> imCallbk.o
> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/imCallbk.o>
> stdlib.h
> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/stdlib.h>
>
Compared against local build (git master):
seiderer at localhost:~/Work/Buildroot/build-rpi0-xlib_libX11-1.6.5-mblen-error-001> wget http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/stdlib.h
seiderer at localhost:~/Work/Buildroot/build-rpi0-xlib_libX11-1.6.5-mblen-error-001> diff -u stdlib.h ./host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/stdlib.h
--- stdlib.h 2017-10-23 20:17:01.351394515 +0200
+++ ./host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/stdlib.h 2017-10-21 23:29:09.028752219 +0200
@@ -26,6 +26,7 @@
/* Get size_t, wchar_t and NULL from <stddef.h>. */
#define __need_size_t
#ifndef __need_malloc_and_calloc
+# define __need_wchar_t
# define __need_NULL
#endif
#include <stddef.h>
@@ -138,7 +139,8 @@
#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
#else
-# define MB_CUR_MAX 1
+# define MB_CUR_MAX (_stdlib_mb_cur_max ())
+extern size_t _stdlib_mb_cur_max (void) __THROW __wur;
#endif
@@ -825,6 +827,29 @@
#endif /* use MISC || use X/Open Unix */
+__BEGIN_NAMESPACE_STD
+/* Return the length of the multibyte character
+ in S, which is no longer than N. */
+extern int mblen (const char *__s, size_t __n) __THROW __wur;
+/* Return the length of the given multibyte character,
+ putting its `wchar_t' representation in *PWC. */
+extern int mbtowc (wchar_t *__restrict __pwc,
+ const char *__restrict __s, size_t __n) __THROW __wur;
+/* Put the multibyte character represented
+ by WCHAR in S, returning its length. */
+extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
+
+
+/* Convert a multibyte string to a wide char string. */
+extern size_t mbstowcs (wchar_t *__restrict __pwcs,
+ const char *__restrict __s, size_t __n) __THROW;
+/* Convert a wide char string to multibyte string. */
+extern size_t wcstombs (char *__restrict __s,
+ const wchar_t *__restrict __pwcs, size_t __n)
+ __THROW;
+__END_NAMESPACE_STD
+
+
#ifdef __USE_SVID
/* Determine whether the string value of RESPONSE matches the affirmation
or negative response expression as specified by the LC_MESSAGES category
Regards,
Peter
>
>
>
>
>
> --
> Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-23 18:33 ` Peter Seiderer
@ 2017-10-23 19:08 ` Arnout Vandecappelle
2017-10-24 5:34 ` Kees van Unen
0 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2017-10-23 19:08 UTC (permalink / raw)
To: buildroot
On 23-10-17 20:33, Peter Seiderer wrote:
> Hello Kees,
>
> On Mon, 23 Oct 2017 09:11:35 -0700 (MST), Kees van Unen <Keesvanunen@hotmail.com> wrote:
>
>>> Copy the the make command line from the xlib_libX11, append V=1 to it, and
>>> you'll see the compilation commands. Copy the compilation command for the
>>> failing file, replace the -c with -E and the -o with some filename, so you
>>> get
>>> the preprocessed file. Then in that preprocessed file check which stdlib.h
>>> it
>>> includes. stdlib.h should be included from include/X11/Xlibint.h.
>>
>> Hi, I managed to get the preprocessor file (see uploaded file). It includes
>> the next stdlib.h:
>>
>> output/host/arm-buildroot-linux-uclibc/gnueabihf/sysroot/usr/include/stdlib.h
>>
>> In this version of stdlib.h there is no reference to mblen (see uploaded
>> file).
>>
>> Regards,
>> Kees
>>
>> imCallbk.o
>> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/imCallbk.o>
>> stdlib.h
>> <http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/stdlib.h>
>>
>
> Compared against local build (git master):
>
> seiderer at localhost:~/Work/Buildroot/build-rpi0-xlib_libX11-1.6.5-mblen-error-001> wget http://buildroot-busybox.2317881.n4.nabble.com/file/t2263/stdlib.h
> seiderer at localhost:~/Work/Buildroot/build-rpi0-xlib_libX11-1.6.5-mblen-error-001> diff -u stdlib.h ./host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/stdlib.h
> --- stdlib.h 2017-10-23 20:17:01.351394515 +0200
> +++ ./host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/stdlib.h 2017-10-21 23:29:09.028752219 +0200
> @@ -26,6 +26,7 @@
> /* Get size_t, wchar_t and NULL from <stddef.h>. */
> #define __need_size_t
> #ifndef __need_malloc_and_calloc
> +# define __need_wchar_t
> # define __need_NULL
> #endif
> #include <stddef.h>
> @@ -138,7 +139,8 @@
> #define MB_CUR_MAX (__ctype_get_mb_cur_max ())
> extern size_t __ctype_get_mb_cur_max (void) __THROW __wur;
> #else
> -# define MB_CUR_MAX 1
> +# define MB_CUR_MAX (_stdlib_mb_cur_max ())
> +extern size_t _stdlib_mb_cur_max (void) __THROW __wur;
> #endif
>
>
> @@ -825,6 +827,29 @@
> #endif /* use MISC || use X/Open Unix */
>
>
> +__BEGIN_NAMESPACE_STD
> +/* Return the length of the multibyte character
> + in S, which is no longer than N. */
> +extern int mblen (const char *__s, size_t __n) __THROW __wur;
> +/* Return the length of the given multibyte character,
> + putting its `wchar_t' representation in *PWC. */
> +extern int mbtowc (wchar_t *__restrict __pwc,
> + const char *__restrict __s, size_t __n) __THROW __wur;
> +/* Put the multibyte character represented
> + by WCHAR in S, returning its length. */
> +extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
> +
> +
> +/* Convert a multibyte string to a wide char string. */
> +extern size_t mbstowcs (wchar_t *__restrict __pwcs,
> + const char *__restrict __s, size_t __n) __THROW;
> +/* Convert a wide char string to multibyte string. */
> +extern size_t wcstombs (char *__restrict __s,
> + const wchar_t *__restrict __pwcs, size_t __n)
> + __THROW;
> +__END_NAMESPACE_STD
Right, so this is the bit that gets removed when BR2_TOOLCHAIN_BUILDROOT_WCHAR
is not set.
Kees, is it possible that you changed the toolchain configuration and did not
do a 'make clean'? [1]
[Rule 1 when somebody comes with a problem: did you do a make clean?]
Regards,
Arnout
[1] https://buildroot.org/downloads/manual/manual.html#full-rebuild
> +
> +
> #ifdef __USE_SVID
> /* Determine whether the string value of RESPONSE matches the affirmation
> or negative response expression as specified by the LC_MESSAGES category
>
> Regards,
> Peter
>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
--
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] 11+ messages in thread
* [Buildroot] Implicit declaration of mblen
2017-10-23 19:08 ` Arnout Vandecappelle
@ 2017-10-24 5:34 ` Kees van Unen
0 siblings, 0 replies; 11+ messages in thread
From: Kees van Unen @ 2017-10-24 5:34 UTC (permalink / raw)
To: buildroot
> Kees, is it possible that you changed the toolchain configuration and did
not
> do a 'make clean'? [1]
Thanks guys. It is very well possible that I didn't do a make clean. I will
do it now and try again.
Regards,
Kees
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2017-10-24 5:34 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-21 11:10 [Buildroot] Implicit declaration of mblen Kees van Unen
2017-10-21 16:26 ` Peter Korsgaard
2017-10-21 20:44 ` Kees van Unen
2017-10-21 20:56 ` Arnout Vandecappelle
2017-10-21 21:07 ` Kees van Unen
2017-10-22 10:02 ` Arnout Vandecappelle
2017-10-22 13:34 ` Kees van Unen
2017-10-23 16:11 ` Kees van Unen
2017-10-23 18:33 ` Peter Seiderer
2017-10-23 19:08 ` Arnout Vandecappelle
2017-10-24 5:34 ` Kees van Unen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.