0

I am using Buildroot to create Rootfs for embedded system

When trying to build QT, I get this build error:

`compiling egl/qegl_qws.cpp
egl/qegl_qws.cpp:1:0: warning: switch -mcpu=cortex-a15 conflicts with -march=armv7-a switch [enabled by default]
 /****************************************************************************
 ^
moc embedded/qsoundqss_qws.h
moc embedded/qcopchannel_qws.h
moc embedded/qdecorationplugin_qws.h
moc embedded/qdirectpainter_qws.h
moc embedded/qwsmanager_qws.h
In file included from /home/hamzah/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/X11/Xlib.h:44:0,
                 from /home/hamzah/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/EGL/eglplatform.h:118,
                 from /home/hamzah/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot/usr/include/EGL/egl.h:36,
                 from egl/qegl_p.h:66,
                 from egl/qegl_qws.cpp:46:
../../include/QtCore/../../src/corelib/kernel/qcoreevent.h:70:9: error: expected identifier before numeric constant
         None = 0,                               // invalid event
         ^
../../include/QtCore/../../src/corelib/kernel/qcoreevent.h:70:9: error: expected '}' before numeric constant
../../include/QtCore/../../src/corelib/kernel/qcoreevent.h:70:9: error: expected unqualified-id before numeric constant`  

This is because None is #defined to be 0 in X11 headers which is creating confllict when used as enum member. From internet, I have been advised to put X11 headers AFTER QT headers. I have tried it where I could find but it does not solve the problem. I think I missed some files

I tried to #undef the symbol and #define laters but that produced more errors as expected. Has anyone dealt with this before and could tell me the exact place to make a change, or do I have to go through a crazy amount of files myself to make changes?

Also, if you have any tip to make this task easy, kindly share. I would even love to know name of all X11 header files

Hamzahfrq
  • 696
  • 1
  • 6
  • 25
  • It is not clear why either include order or #undef would not suffice. Perhaps there's sime other, unrelated error surfacing. – n. m. could be an AI Aug 14 '14 at 15:53
  • @n.m. For include order, I believe I missed some files. I don't know how can I be sure I changed order of ALL files and of all X11 headers. For #undef, it had lvalue (building) problems when I defined it again – Hamzahfrq Aug 14 '14 at 15:58
  • You need to show actual code and actual error messages if you want this to go anywhere. Anyway, try adding `#include ` at the very top, followed by `#undef None`. – n. m. could be an AI Aug 14 '14 at 16:24
  • Um, `X11/Xlib.h` at line 44 has `#include `, but your error message implies that it includes `qcoreevent.h`, which is rather improbable. Can you add `-H` to the compilation flags and see what is really included? Also look at `X11/X.h` in your build root and see if it doesn't look like it should look (a bunch of `#define`s). – n. m. could be an AI Aug 15 '14 at 20:47

1 Answers1

2

Please report your bug to the Buildroot community, either by posting an e-mail to the mailing list, or filing a bug in the project bug tracker. In either case, make sure you include the Buildroot version, as well as your complete Buildroot .config file to reproduce the issue.

Thomas Petazzoni
  • 5,636
  • 17
  • 25