You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error message:
checking whether the C compiler works... no
configure: error: in `/home/user/workspace/reef/sof':
configure: error: C compiler cannot create executables
@keqiaozhang
Looks like script didn't set XCC, XTOBJCOPY, XTOBJDUMP variables.
Do you have XTENSA_TOOLS_ROOT variable set to directory that has directory structure as expected by script? With folders like:
@keqiaozhang
Also please let me know if it builds for you without script with something like:
./autogen.sh
./configure --with-arch=xtensa --with-platform=apollolake --with-dsp-core=$XTENSA_CORE --with-root-dir=$CONFIG_PATH/xtensa-elf --host=xtensa-bxt-elf --with-meu=$MEU_PATH --with-key=$PRIVATE_KEY_PATH CC=xt-xcc OBJCOPY=xt-objcopy OBJDUMP=xt-objdump
make
make bin
@jajanusz
I have set the XTENSA_TOOLS_ROOT, but nothing help.
$ ./configure --with-arch=xtensa --with-platform=cannonlake --with-root-dir=/home/zhangke/xtensa/XtDevTools//install/builds/RF-2016.4-linux/X6H3CNL_2016_4_linux/xtensa-elf --host=xtensa-cnl-elf CC=xt-xcc OBJCOPY=xt-objcopy OBJDUMP=xt-objdump --with-dsp-core=X6H3CNL_2016_4_linux
I think it's not a problem directly caused by flags (it should pass even with no flags), if you think otherwise you can test it with changing CFLAGS to whatever you think should be there. Do it before autoconf checks first time for compiler, what is probably there:
# Test after CFLAGS set othewise test of cross compiler fails.
So changing flags before it will not help you.
You can also pass flags to configure scripts like:
./configure CFLAGS="<your flags>" ...
Note however that flags from top of configure (-O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes) will be added at end - this is one of the reasons why we need to change configure/makefiles to let user set his CFLAGS like it's supposed to be.
Let me know if chagning CFLAGS helped you, so I'll make patch to make it work for everyone.
Also please send me logs.
Thanks
@jajanusz
I verified the latest code base this morning, now only APL can pass the compilation with xcc. but CNL, this issue is still exists. Please help to address it. config.log
@jajanusz
Reconfirm the case on CNL. From the config.log you can see that we miss some xtensa config of CNL for xt-xcc. Will retest after get the right version xt-xcc config for CNL.
It looks like problem with your installation/config. I have the same core as yours.
Your log says what error is:
You need to either specify the name of a registered Xtensa core (with
the --xtensa-core option or the XTENSA_CORE environment variable) or
specify a different registry of Xtensa cores (with the --xtensa-system
option or the XTENSA_SYSTEM environment variable).
configure:3729: $? = 2
configure:3718: xt-xcc -v >&5
Error: there is no Xtensa core registered as the default.
xcc compilation issue: now we only support APL and CNL platform. For APL, this issue is fixed by Jajanusz, commit ID:de100b7d2823e0496a0cad055625063204d0d585. For CNL, it's because we miss build "X6H3CNL_2016_4_linux". so this issue can close now and track the xcc issue on CNL with XCC compile failed on CNL #93
Activity
xiulipan commentedon Jul 10, 2018
bisect to #67
In configure file the compiler check macro is not replaced with AM_* flags and compiler check in configure will fail.
jajanusz commentedon Jul 10, 2018
It works for APL/CNL for me. Please try setting SUPPORTED_PLATFORMS=(apl cnl) in scripts/xtensa-build-all.sh and let me know what you get. Thanks
keqiaozhang commentedon Jul 10, 2018
@jajanusz
Still not working with exit 77. The config.log is attached.
config.log
jajanusz commentedon Jul 10, 2018
@keqiaozhang
Looks like script didn't set XCC, XTOBJCOPY, XTOBJDUMP variables.
Do you have XTENSA_TOOLS_ROOT variable set to directory that has directory structure as expected by script? With folders like:
jajanusz commentedon Jul 10, 2018
@keqiaozhang
Also please let me know if it builds for you without script with something like:
With properly set variables of course.
keqiaozhang commentedon Jul 10, 2018
@jajanusz
I have set the XTENSA_TOOLS_ROOT, but nothing help.
$ ./configure --with-arch=xtensa --with-platform=cannonlake --with-root-dir=/home/zhangke/xtensa/XtDevTools//install/builds/RF-2016.4-linux/X6H3CNL_2016_4_linux/xtensa-elf --host=xtensa-cnl-elf CC=xt-xcc OBJCOPY=xt-objcopy OBJDUMP=xt-objdump --with-dsp-core=X6H3CNL_2016_4_linux
jajanusz commentedon Jul 10, 2018
Can you send config.log for your last command, where you manually set CC=xt-xcc?
jajanusz commentedon Jul 10, 2018
I think it's not a problem directly caused by flags (it should pass even with no flags), if you think otherwise you can test it with changing CFLAGS to whatever you think should be there. Do it before autoconf checks first time for compiler, what is probably there:
sof/configure.ac
Line 141 in a48cedd
C compiler is not checked with AC_PROG_CC, as this comment says:
sof/configure.ac
Line 373 in a48cedd
So changing flags before it will not help you.
You can also pass flags to configure scripts like:
Note however that flags from top of configure (-O2 -g -Wall -Werror -Wl,-EL -Wmissing-prototypes) will be added at end - this is one of the reasons why we need to change configure/makefiles to let user set his CFLAGS like it's supposed to be.
Let me know if chagning CFLAGS helped you, so I'll make patch to make it work for everyone.
Also please send me logs.
Thanks
keqiaozhang commentedon Jul 11, 2018
@jajanusz
I verified the latest code base this morning, now only APL can pass the compilation with xcc. but CNL, this issue is still exists. Please help to address it.
config.log
keqiaozhang commentedon Jul 11, 2018
@jajanusz
Reconfirm the case on CNL. From the config.log you can see that we miss some xtensa config of CNL for xt-xcc. Will retest after get the right version xt-xcc config for CNL.
jajanusz commentedon Jul 11, 2018
It looks like problem with your installation/config. I have the same core as yours.
Your log says what error is:
You can for example just set env variable like:
Let me know if it helps.
Thanks
keqiaozhang commentedon Jul 11, 2018
@jajanusz
Thanks, we have root caused this bug, it's because we don't have X6H3CNL_2016_4_linux, our developer is working on it.
keqiaozhang commentedon Jul 12, 2018
summary:
The compilation issue is caused by 17c929e and both gcc and xcc cannot work.
[-]can not make firmware [/-][+]XCC compile failed on APL/CNL[/+]keqiaozhang commentedon Jul 20, 2018
This issue is fixed by #77.