* Error compiling barebox on fido
@ 2015-06-21 16:32 Gyorgy Kovesdi
2015-06-22 8:25 ` György Kövesdi
0 siblings, 1 reply; 7+ messages in thread
From: Gyorgy Kovesdi @ 2015-06-21 16:32 UTC (permalink / raw)
To: meta-freescale@yoctoproject.org
Hi,
I tried to compile barebox_2015.06 on the current fido, and got the following error:
arm-poky-linux-gnueabi-gcc -Wp,-MD,scripts/.bareboxenv-target.d -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -fno-strict-aliasing -fno-common -Os -pipe -fno-stack-protector -Wno-unused-but-set-variable -Wno-trampolines -Wdeclaration-after-statement -Wno-pointer-sign -o scripts/bareboxenv-target scripts/bareboxenv.c
scripts/bareboxenv.c:20:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
Exactly the same command is executed when building on odler revisions (e.g. on current daisy), without problem.
The difference I see that fido uses gcc 4.9 and daisy uses 4.8, but I think this is not the cause.
What can be the problem?
Thanks in advance
György Kövesdi
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Error compiling barebox on fido 2015-06-21 16:32 Error compiling barebox on fido Gyorgy Kovesdi @ 2015-06-22 8:25 ` György Kövesdi 2015-06-22 11:17 ` György Kövesdi 0 siblings, 1 reply; 7+ messages in thread From: György Kövesdi @ 2015-06-22 8:25 UTC (permalink / raw) To: meta-freescale Hi, I found that really the gcc causes the problem. I created this test file (x.c): #include <stdio.h> int main() {} I tried to compile it this way: arm-poky-linux-gnueabi-gcc x.c On fido it fails, while on daisy, it succeeds. I see that gcc 4.9 on fido does not have standard includes by default, while gcc 4.8 on daisy does. However, it is set in CFLAGS, so all compilation succeeded this way. I will resolve barebox build by changing its make rules, but i don't know if this is a problem with gcc 4.9 or not. Which behaviour is standard? Regards Gyorgy Kovesdi On 2015-06-21 18:32, Gyorgy Kovesdi wrote: > Hi, > > I tried to compile barebox_2015.06 on the current fido, and got the following error: > > arm-poky-linux-gnueabi-gcc -Wp,-MD,scripts/.bareboxenv-target.d -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration -fno-strict-aliasing -fno-common -Os -pipe -fno-stack-protector -Wno-unused-but-set-variable -Wno-trampolines -Wdeclaration-after-statement -Wno-pointer-sign -o scripts/bareboxenv-target scripts/bareboxenv.c > scripts/bareboxenv.c:20:19: fatal error: stdio.h: No such file or directory > #include <stdio.h> > ^ > compilation terminated. > > Exactly the same command is executed when building on odler revisions (e.g. on current daisy), without problem. > > The difference I see that fido uses gcc 4.9 and daisy uses 4.8, but I think this is not the cause. > What can be the problem? > > Thanks in advance > György Kövesdi ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error compiling barebox on fido 2015-06-22 8:25 ` György Kövesdi @ 2015-06-22 11:17 ` György Kövesdi 2015-06-22 11:33 ` Nikolay Dimitrov 0 siblings, 1 reply; 7+ messages in thread From: György Kövesdi @ 2015-06-22 11:17 UTC (permalink / raw) To: meta-freescale Hi, I tried to switch back to gcc 4.8 on fido, but the same error occurs. Is the gcc built differently on fido? Regards Gyorgy Kovesdi On 2015-06-22 10:25, György Kövesdi wrote: > Hi, > > I found that really the gcc causes the problem. > I created this test file (x.c): > > #include <stdio.h> > int main() {} > > I tried to compile it this way: > > arm-poky-linux-gnueabi-gcc x.c > > On fido it fails, while on daisy, it succeeds. > I see that gcc 4.9 on fido does not have standard includes by default, > while gcc 4.8 on daisy does. However, it is set in CFLAGS, so all > compilation succeeded this way. > I will resolve barebox build by changing its make rules, but i don't > know if this is a problem with gcc 4.9 or not. Which behaviour is > standard? > > Regards > Gyorgy Kovesdi > > On 2015-06-21 18:32, Gyorgy Kovesdi wrote: >> Hi, >> >> I tried to compile barebox_2015.06 on the current fido, and got the >> following error: >> >> arm-poky-linux-gnueabi-gcc -Wp,-MD,scripts/.bareboxenv-target.d >> -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs >> -Werror-implicit-function-declaration -fno-strict-aliasing >> -fno-common -Os -pipe -fno-stack-protector >> -Wno-unused-but-set-variable -Wno-trampolines >> -Wdeclaration-after-statement -Wno-pointer-sign -o >> scripts/bareboxenv-target scripts/bareboxenv.c >> scripts/bareboxenv.c:20:19: fatal error: stdio.h: No such file or >> directory >> #include <stdio.h> >> ^ >> compilation terminated. >> >> Exactly the same command is executed when building on odler revisions >> (e.g. on current daisy), without problem. >> >> The difference I see that fido uses gcc 4.9 and daisy uses 4.8, but I >> think this is not the cause. >> What can be the problem? >> >> Thanks in advance >> György Kövesdi > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error compiling barebox on fido 2015-06-22 11:17 ` György Kövesdi @ 2015-06-22 11:33 ` Nikolay Dimitrov 2015-06-22 14:38 ` György Kövesdi 0 siblings, 1 reply; 7+ messages in thread From: Nikolay Dimitrov @ 2015-06-22 11:33 UTC (permalink / raw) To: György Kövesdi, meta-freescale Hi György, On 06/22/2015 02:17 PM, György Kövesdi wrote: > Hi, > > I tried to switch back to gcc 4.8 on fido, but the same error occurs. > Is the gcc built differently on fido? [snip] Well, there's no "-nostdinc" directive, so these include paths should be there. Also, in the devtools recipe gcc-4.9 seems to be compiled with proper include paths. I think there could be an issue with your recipe, as I can build custom components that uses stdio.h on Fido without such errors. Also, there a quite a lot of components that include the same header and seem to build again without issues (alsa, pulseaudio, xz and others). Can you please verify this issue on a clean Fido, that wasn't modified in any way, and with a very simple recipe? Regards, Nikolay ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error compiling barebox on fido 2015-06-22 11:33 ` Nikolay Dimitrov @ 2015-06-22 14:38 ` György Kövesdi 2015-06-22 15:40 ` Nikolay Dimitrov 0 siblings, 1 reply; 7+ messages in thread From: György Kövesdi @ 2015-06-22 14:38 UTC (permalink / raw) To: Nikolay Dimitrov, meta-freescale Hi Nikolay, I found something. As you suggested, i created a small test recipe. It was succeeded on master and fido checkouts too. I found that it uses gcc this way: arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/kgy/work/Yocto/MX6-master/build/tmp/sysroots/embedsky-e9 -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed x.c -o x The first some options passed to gcc fixes my problem: -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/kgy/work/Yocto/MX6-master/build/tmp/sysroots/embedsky-e9 and the others are come from CFLAGS and LDFLAGS variables. If i could pass these to barebox compilation, then i could fix it. My problem is that i could not find the variable where these options are stored. Can you help me to find the place of these options? Thanks in advance Gyorgy Kovesdi On 2015-06-22 13:33, Nikolay Dimitrov wrote: > Hi György, > > On 06/22/2015 02:17 PM, György Kövesdi wrote: >> Hi, >> >> I tried to switch back to gcc 4.8 on fido, but the same error occurs. >> Is the gcc built differently on fido? > [snip] > > Well, there's no "-nostdinc" directive, so these include paths should be > there. Also, in the devtools recipe gcc-4.9 seems to be compiled with > proper include paths. > > I think there could be an issue with your recipe, as I can build custom > components that uses stdio.h on Fido without such errors. Also, there a > quite a lot of components that include the same header and seem to build > again without issues (alsa, pulseaudio, xz and others). > > Can you please verify this issue on a clean Fido, that wasn't modified > in any way, and with a very simple recipe? > > Regards, > Nikolay > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error compiling barebox on fido 2015-06-22 14:38 ` György Kövesdi @ 2015-06-22 15:40 ` Nikolay Dimitrov 2015-06-28 14:03 ` Gyorgy Kovesdi 0 siblings, 1 reply; 7+ messages in thread From: Nikolay Dimitrov @ 2015-06-22 15:40 UTC (permalink / raw) To: György Kövesdi, meta-freescale Hi György, On 06/22/2015 05:38 PM, György Kövesdi wrote: > Hi Nikolay, > > I found something. As you suggested, i created a small test recipe. > It was succeeded on master and fido checkouts too. I found that it > uses gcc this way: > > arm-poky-linux-gnueabi-gcc -march=armv7-a -marm -mthumb-interwork > -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 > --sysroot=/home/kgy/work/Yocto/MX6-master/build/tmp/sysroots/embedsky-e9 > > -O2 -pipe -g -feliminate-unused-debug-types -Wl,-O1 > -Wl,--hash-style=gnu -Wl,--as-needed x.c -o x > > The first some options passed to gcc fixes my problem: > > -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon > -mtune=cortex-a9 > --sysroot=/home/kgy/work/Yocto/MX6-master/build/tmp/sysroots/embedsky-e9 > > >and the others are come from CFLAGS and LDFLAGS variables. If i > could pass these to barebox compilation, then i could fix it. My > problem is that i could not find the variable where these options > are stored. I would recommend you not to try to force the Yocto build system to work-around component quirks, but to try to fix the component makefile to work properly in a cross-compile environment. Assuming that barebox and U-Boot have somewhat similar build scripts, it should be to see how things work in U-Boot and do it the same way for barebox (U-Boot builds *perfectly* in every environment I had so far, including native armhf builds). The other thing I could recommend is to re-evaluate your motivation to build barebox and to try instead using U-Boot for the same purpose (unless barebox is a hard-requirement for your project). If you feel like learning more about Makefiles makes you happy - that's cool, but if you're hard pressed against a wall (e.g. deadlines) you should look at lower risk solution. [snip] Regards, Nikolay ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Error compiling barebox on fido 2015-06-22 15:40 ` Nikolay Dimitrov @ 2015-06-28 14:03 ` Gyorgy Kovesdi 0 siblings, 0 replies; 7+ messages in thread From: Gyorgy Kovesdi @ 2015-06-28 14:03 UTC (permalink / raw) To: Nikolay Dimitrov; +Cc: meta-freescale Hi everybody, At last i could compile barebox on master and fido by enabling soft float in gcc (because it cannot be compiled in hard-flot mode). I did it by putting this into the machine config: DEFAULTTUNE_mx6 = "cortexa9-neon" Is it correct for this purpose? Regards György Kövesdi ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-28 14:03 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-21 16:32 Error compiling barebox on fido Gyorgy Kovesdi 2015-06-22 8:25 ` György Kövesdi 2015-06-22 11:17 ` György Kövesdi 2015-06-22 11:33 ` Nikolay Dimitrov 2015-06-22 14:38 ` György Kövesdi 2015-06-22 15:40 ` Nikolay Dimitrov 2015-06-28 14:03 ` Gyorgy Kovesdi
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.