Skip to contentSkip to conversation

init segfaults when compiled with glibc

Buildroot Sasha Sirotkin 6 participants 12 messages Mar 30, 2010 – Apr 5, 2010

lore
Share & tools
lore
#0 lore raw

I compiled an external toolchain with glibc support using crosstools-ng as recommended. I managed to compile buildroot without any issues. However, when I try to use the resulting image /sbin/init segfaults. With uclibc there are no such issues. I'm using the latest versions of everything on ARM with EABI.

Any suggestions ?

#1 lore raw

[Buildroot] QT embedded working with Xorg?

Hello,

I have a simple question : is Qt Embedded compatible with Xorg? I have an application made for Qt Embedded with Framebuffer, and I had to change my distribution to use the server X Xorg, but now the application isn't working.
Of what I see when searching, I'm afraid I must use QT and not QT Embedded, and as it's not included in Buildroot, I'm a bit reticent... Is there any option I don't know which allows to use X server?

Thanks,

Damien Borie

TERAWATT / AENERGIA S.A.S.
ZA DUBOSCOA
64990 Villefranque
FRANCE

tel : +33 (0)5 59 44 26 08
fax : +33 (0)5 59 31 15 11

#2 lore raw

[Buildroot] QT embedded working with Xorg?

Quoted 9 lines · Damien Borie

Hello,

I have a simple question : is Qt Embedded compatible with Xorg? I have an application made for Qt Embedded with Framebuffer, and I had to change my distribution to use the server X Xorg, but now the application isn't working.
Of what I see when searching, I'm afraid I must use QT and not QT Embedded, and as it's not included in Buildroot, I'm a bit reticent... Is there any option I don't know which allows to use X server?

You need to use Qt compile for X11 for it to work with XOrg. I have modified Qt in my tree to make it an option to build for X. Give me a couple of days and I'll calean it up and send it to the list.

Will

Signature · 5 lines
------------------------------------------------------------------------
Will Wagner                                     will_wagner at carallon.com
Development Manager                      Office Tel: +44 (0)20 7371 2032
Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA
------------------------------------------------------------------------
#3 lore raw

[Buildroot] QT embedded working with Xorg?

Hi,

Thank you for your answer.
If you can send it it's great. But maybe you can first say me what the modifications are?
Modifying some line in configure file may be sufficient for some test? I noticed an option PLATFORM_X11...
I could always make it cleaner when you send your clean patch but if there is only a few things to change I can do it dirtily for now and continue working.

Thanks.

Damien Borie

TERAWATT / AENERGIA S.A.S.
ZA DUBOSCOA
64990 Villefranque
FRANCE

tel : +33 (0)5 59 44 26 08
fax : +33 (0)5 59 31 15 11

William Wagner a ?crit :

Quoted 17 lines · Damien Borie
Quoted 9 lines

Hello,

I have a simple question : is Qt Embedded compatible with Xorg? I have an application made for Qt Embedded with Framebuffer, and I had to change my distribution to use the server X Xorg, but now the application isn't working.
Of what I see when searching, I'm afraid I must use QT and not QT Embedded, and as it's not included in Buildroot, I'm a bit reticent... Is there any option I don't know which allows to use X server?

You need to use Qt compile for X11 for it to work with XOrg. I have modified Qt in my tree to make it an option to build for X. Give me a couple of days and I'll calean it up and send it to the list.

Will

#4 lore raw

[Buildroot] QT embedded working with Xorg?

Quoted 10 lines · Damien Borie

Hi,

Thank you for your answer.
If you can send it it's great. But maybe you can first say me what the modifications are?
Modifying some line in configure file may be sufficient for some test? I noticed an option PLATFORM_X11...
I could always make it cleaner when you send your clean patch but if there is only a few things to change I can do it dirtily for now and continue working.

Damien,

Attached is my patch to get this working. he main thing to do is to trick the build into thinking it is doing a cross compile even though it is building for XOrg. Although not officially support the Trolltech guys confirmed that it should work.

There are various bits i the patch you may not like, not least that it is setup for a commercial Qt license.

Will.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qt-x11.patch
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100401/60f79536/attachment-0001.diff>

#5 lore raw

[Buildroot] QT embedded working with Xorg?

Hi,

Thanks a lot. I'll look at it now and tomorrow and see what I need to change (to use open source QT for example).

Thank you for your help.

Damien Borie

TERAWATT / AENERGIA S.A.S.
ZA DUBOSCOA
64990 Villefranque
FRANCE

tel : +33 (0)5 59 44 26 08
fax : +33 (0)5 59 31 15 11

Will Wagner a ?crit :

Quoted 22 lines · Damien Borie
Quoted 10 lines

Hi,

Thank you for your answer.
If you can send it it's great. But maybe you can first say me what the modifications are?
Modifying some line in configure file may be sufficient for some test? I noticed an option PLATFORM_X11...
I could always make it cleaner when you send your clean patch but if there is only a few things to change I can do it dirtily for now and continue working.

Damien,

Attached is my patch to get this working. he main thing to do is to trick the build into thinking it is doing a cross compile even though it is building for XOrg. Although not officially support the Trolltech guys confirmed that it should work.

There are various bits i the patch you may not like, not least that it is setup for a commercial Qt license.

Will.

#6 lore raw

[Buildroot] QT embedded working with Xorg?

Hi,

It's working fine! I only changed X11-commercial to X11-opensource and it's ok. I got problems with font or encoding but it will be cleared soon I think.
Thank you, your patch was very useful.

Regards,

Damien Borie

TERAWATT / AENERGIA S.A.S.
ZA DUBOSCOA
64990 Villefranque
FRANCE

tel : +33 (0)5 59 44 26 08
fax : +33 (0)5 59 31 15 11

Damien Borie a ?crit :

Quoted 48 lines

Hi,

Thanks a lot. I'll look at it now and tomorrow and see what I need to change (to use open source QT for example).

Thank you for your help.

Damien Borie

TERAWATT / AENERGIA S.A.S.
ZA DUBOSCOA
64990 Villefranque
FRANCE
tel : +33 (0)5 59 44 26 08
fax : +33 (0)5 59 31 15 11

Will Wagner a ?crit :

Quoted 18 lines · Damien Borie
Quoted 10 lines

Hi,

Thank you for your answer.
If you can send it it's great. But maybe you can first say me what the modifications are?
Modifying some line in configure file may be sufficient for some test? I noticed an option PLATFORM_X11...
I could always make it cleaner when you send your clean patch but if there is only a few things to change I can do it dirtily for now and continue working.

Damien,

Attached is my patch to get this working. he main thing to do is to trick the build into thinking it is doing a cross compile even though it is building for XOrg. Although not officially support the Trolltech guys confirmed that it should work.

Quoted 4 lines

There are various bits i the patch you may not like, not least that it is setup for a commercial Qt license.

Will.

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#7 lore raw

[Buildroot] QT embedded working with Xorg?

Quoted 7 lines · Damien Borie

Hi,

It's working fine! I only changed X11-commercial to X11-opensource and it's ok. I got problems with font or encoding but it will be cleared soon I think.
Thank you, your patch was very useful.

Years ago, that was one of the selectable options for QT. Why did it go away? Too complex?

Signature · 5 lines
allanc at chickenandporn.com  "??" http://linkedin.com/in/goldfish
please, no proprietary attachments (http://tinyurl.com/cbgq)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20100403/35c717a3/attachment.htm>
#8 lore raw

[Buildroot] QT embedded working with Xorg?

In reply to Damien Borie
Quoted 6 lines · Damien Borie

Hi,

It's working fine! I only changed X11-commercial to X11-opensource and it's ok. I got problems with font or encoding but it will be cleared soon I think.
Thank you, your patch was very useful.

What arch are you building for? I'm building for ARM and I'm getting build errors.

compiling io/qabstractfileengine.cpp ../../include/QtCore/../../src/corelib/arch/qatomic_i386.h: In function 'char* HB_TextCodec_ConvertFromUnicode(void*, const HB_UChar16*, hb_uint32, hb_uint32*)':
../../include/QtCore/../../src/corelib/arch/qatomic_i386.h:132: error:
impossible constraint in 'asm' ../../include/QtCore/../../src/corelib/arch/qatomic_i386.h:132: error:
impossible constraint in 'asm'
compiling io/qbuffer.cpp
make[2]: *** [.obj/release-shared/qharfbuzz.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from io/qbuffer.cpp:473:
../../include/QtCore/../../src/corelib/arch/qatomic_i386.h: In member function 'virtual bool QBuffer::seek(qint64)':
../../include/QtCore/../../src/corelib/arch/qatomic_i386.h:132: error:
impossible constraint in 'asm' ../../include/QtCore/../../src/corelib/arch/qatomic_i386.h:132: error:
impossible constraint in 'asm'
make[2]: *** [.obj/release-shared/qbuffer.o] Error 1 ../../include/QtCore/../../src/corelib/arch/qatomic_i386.h: In member function 'virtual QString QAbstractFileEngine::fileName(QAbstractFileEngine::FileName) const':
../../include/QtCore/../../src/corelib/arch/qatomic_i386.h:120: error:
impossible constraint in 'asm'
make[2]: *** [.obj/release-shared/qabstractfileengine.o] Error 1 make[2]: Leaving directory `/media/stuff/buildroot/output/build/qt-everywhere-opensource-src-4.6.2/src/corelib' make[1]: *** [sub-corelib-make_default-ordered] Error 2
make[1]: Leaving directory `/media/stuff/buildroot/output/build/qt-everywhere-opensource-src-4.6.2'
make: *** [/media/stuff/buildroot/output/build/qt-everywhere-opensource-src-4.6.2/.compiled] Error 2

#9 lore raw

[Buildroot] QT embedded working with Xorg?

Quoted 4 lines · Paul Jones
Quoted 2 lines · Damien Borie

Hi,

Quoted 9 lines
Quoted 5 lines

It's working fine! I only changed X11-commercial to X11-opensource and it's ok. I got problems with font or encoding but it will be cleared soon I think.
Thank you, your patch was very useful.

What arch are you building for? I'm building for ARM and I'm getting build errors.

If you are using the patch I submitted to the list without modification then i don't think it will work. I had hard coded into that patch that Qt was being built for x86 (also being built on x64 machine). The patch was not meant to be for the general case and would need more work for that. If there is interest I will look at doing a better patch for submission.

Will

#10 lore raw

[Buildroot] QT embedded working with Xorg?

Quoted 11 lines · Will Wagner
Quoted 10 lines · Paul Jones
Quoted 6 lines · Damien Borie

Hi,

It's working fine! I only changed X11-commercial to X11-opensource and it's ok. I got problems with font or encoding but it will be cleared soon I think.
Thank you, your patch was very useful.

What arch are you building for? I'm building for ARM and I'm getting build errors.

Quoted 9 lines

If you are using the patch I submitted to the list without modification then i don't think it will work. I had hard coded into that patch that Qt was being built for x86 (also being built on x64 machine). The patch was not meant to be for the general case and would need more work for that. If there is interest I will look at doing a better patch for submission.

Will

Ahh ok. I saw that i386 in there but I wasn't sure what it was for. I'll have a fiddle with it and see if I can get it to work.

Paul.

#11 lore raw
In reply to Sasha Sirotkin

Sasha, All,

Quoted 5 lines · On Tuesday 30 March 2010 142701 Sasha Sirotkin wrote:

I compiled an external toolchain with glibc support using crosstools-ng as recommended. I managed to compile buildroot without any issues. However, when I try to use the resulting image /sbin/init segfaults. With uclibc there are no such issues. I'm using the latest versions of everything on ARM with EABI.

By default, gcc will emit armv5t instructions. What's your target CPU? init segfaulting can be a symptom of using a bad instruction set, so if your CPU is armv4, and you did not tell gcc to default to armv4, then you will hit this segfault issue.

regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< O_o >==-- '------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
'------------------------------'-------'------------------'--------------------'