Skip to contentSkip to conversation

glib 2.40 on xtensa

Buildroot Thomas Petazzoni 2 participants 6 messages Jul 18, 2014 – Jul 20, 2014

lore
Share & tools
lore
#0 lore raw

Baruch, Max,

We have recently update glib to version 2.40, and this is causing issues on Xtensa:

http://autobuild.buildroot.org/results/a1a/a1a1f97a2c54ba4f7f7e44cc094a55bd23ca0aa0/build-end.log

CC gspawn.lo
gthread-posix.c: In function 'g_cond_impl_new':
gthread-posix.c:648:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c: In function 'g_cond_wait_until':
gthread-posix.c:896:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c:859:19: warning: unused variable 'ts' [-Wunused-variable]

   struct timespec ts;
                   ^

Could you have a look and see what can be done to fix this problem?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#1 lore raw
Quoted 17 lines · Thomas Petazzoni

Baruch, Max,

We have recently update glib to version 2.40, and this is causing issues on Xtensa:

http://autobuild.buildroot.org/results/a1a/a1a1f97a2c54ba4f7f7e44cc094a55bd23ca0aa0/build-end.log

CC gspawn.lo
gthread-posix.c: In function 'g_cond_impl_new':
gthread-posix.c:648:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c: In function 'g_cond_wait_until':
gthread-posix.c:896:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c:859:19: warning: unused variable 'ts' [-Wunused-variable]

Quoted 4 lines
   struct timespec ts;
                   ^

Could you have a look and see what can be done to fix this problem?

It requires pthread_cond_timedwait_relative_np (not available on uclibc) or pthread_condattr_setclock (only available with NPTL). Looks like we need NPTL to support this glib version.

Signature · 2 lines
Thanks.
-- Max
#2 lore raw

Dear Max Filippov,

Quoted 22 lines · Max Filippov
Quoted 20 lines · Thomas Petazzoni

Baruch, Max,

We have recently update glib to version 2.40, and this is causing issues on Xtensa:

http://autobuild.buildroot.org/results/a1a/a1a1f97a2c54ba4f7f7e44cc094a55bd23ca0aa0/build-end.log

CC gspawn.lo
gthread-posix.c: In function 'g_cond_impl_new':
gthread-posix.c:648:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c: In function 'g_cond_wait_until':
gthread-posix.c:896:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c:859:19: warning: unused variable 'ts' [-Wunused-variable]

   struct timespec ts;
                   ^
Quoted 3 lines
Quoted 1 line

Could you have a look and see what can be done to fix this problem?

It requires pthread_cond_timedwait_relative_np (not available on uclibc)

Well, libglib builds fine on ARM/uClibc.

Quoted 2 lines

or pthread_condattr_setclock (only available with NPTL). Looks like we need NPTL to support this glib version.

Argh. There's no NPTL support for:

- ARC (but I believe it's coming)
- AVR32 (but we're deprecating this architecture, so we don't care)
- Blackfin (and I don't think there's much hope to have NPTL one day, but glib is anyway disabled on !MMU platforms, so we don't care)
- Xtensa (don't know)
- i386 (because NPTL requires at least i486)

Should we patch glib to make the support of the GCond stuff optional, and hope not too many programs will use it? Or simply add the NPTL dependency to glib, but that would mean a huge number of packages suddenly become unavailable for some architectures.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

Hi Thomas,

Quoted 43 lines · Thomas Petazzoni

Dear Max Filippov,

Quoted 22 lines · Max Filippov
Quoted 20 lines · Thomas Petazzoni

Baruch, Max,

We have recently update glib to version 2.40, and this is causing issues on Xtensa:

http://autobuild.buildroot.org/results/a1a/a1a1f97a2c54ba4f7f7e44cc094a55bd23ca0aa0/build-end.log

CC gspawn.lo
gthread-posix.c: In function 'g_cond_impl_new':
gthread-posix.c:648:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c: In function 'g_cond_wait_until':
gthread-posix.c:896:2: error: #error Cannot support GCond on your platform.
#error Cannot support GCond on your platform.
^
gthread-posix.c:859:19: warning: unused variable 'ts' [-Wunused-variable]

   struct timespec ts;
                   ^
Quoted 3 lines
Quoted 1 line

Could you have a look and see what can be done to fix this problem?

It requires pthread_cond_timedwait_relative_np (not available on uclibc)

Well, libglib builds fine on ARM/uClibc.

Quoted 2 lines

or pthread_condattr_setclock (only available with NPTL). Looks like we need NPTL to support this glib version.

Argh. There's no NPTL support for:

- ARC (but I believe it's coming)
- AVR32 (but we're deprecating this architecture, so we don't care)
- Blackfin (and I don't think there's much hope to have NPTL one day, but glib is anyway disabled on !MMU platforms, so we don't care)
- Xtensa (don't know)
- i386 (because NPTL requires at least i486)

Quoted 4 lines

Should we patch glib to make the support of the GCond stuff optional, and hope not too many programs will use it? Or simply add the NPTL dependency to glib, but that would mean a huge number of packages suddenly become unavailable for some architectures.

There's a patch in glib mainline that implements GMutex natively on linux. It applies cleanly to glib-2.40 and with it xtensa builds successfully. I can post a buildroot patch with it.

Signature · 2 lines
Thanks.
-- Max
#4 lore raw

Dear Max Filippov,

Quoted 9 lines · Max Filippov
Quoted 9 lines

Argh. There's no NPTL support for:

- ARC (but I believe it's coming)
- AVR32 (but we're deprecating this architecture, so we don't care)
- Blackfin (and I don't think there's much hope to have NPTL one day, but glib is anyway disabled on !MMU platforms, so we don't care)
- Xtensa (don't know)
- i386 (because NPTL requires at least i486)

Quoted 8 lines
Quoted 4 lines

Should we patch glib to make the support of the GCond stuff optional, and hope not too many programs will use it? Or simply add the NPTL dependency to glib, but that would mean a huge number of packages suddenly become unavailable for some architectures.

There's a patch in glib mainline that implements GMutex natively on linux. It applies cleanly to glib-2.40 and with it xtensa builds successfully. I can post a buildroot patch with it.

Ah, thanks, sounds good!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw
In reply to Thomas Petazzoni
Quoted 7 lines · Thomas Petazzoni

Argh. There's no NPTL support for:

- ARC (but I believe it's coming)
- AVR32 (but we're deprecating this architecture, so we don't care)
- Blackfin (and I don't think there's much hope to have NPTL one day, but glib is anyway disabled on !MMU platforms, so we don't care)
- Xtensa (don't know)

We're planning to complete NPTL implementation this year.

Signature · 2 lines
Thanks.
-- Max