Giter Site home page Giter Site logo

Comments (14)

xiulipan avatar xiulipan commented on August 15, 2024

bisect to #67
In configure file the compiler check macro is not replaced with AM_* flags and compiler check in configure will fail.

ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

from sof.

jajanusz avatar jajanusz commented on August 15, 2024

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

from sof.

keqiaozhang avatar keqiaozhang commented on August 15, 2024

@jajanusz
Still not working with exit 77. The config.log is attached.
config.log

from sof.

jajanusz avatar jajanusz commented on August 15, 2024

@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:

.
└── install
    ├── builds
    │   ├── RF-2016.4-linux
    │   └── RG-2017.8-linux
    └── tools
        ├── RF-2016.4-linux
        └── RG-2017.8-linux

from sof.

jajanusz avatar jajanusz commented on August 15, 2024

@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

With properly set variables of course.

from sof.

keqiaozhang avatar keqiaozhang commented on August 15, 2024

@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

from sof.

jajanusz avatar jajanusz commented on August 15, 2024

Can you send config.log for your last command, where you manually set CC=xt-xcc?

from sof.

jajanusz avatar jajanusz commented on August 15, 2024

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:

AC_CHECK_LIB(cmocka, _cmocka_run_group_tests, [HAVE_CMOCKA_PKG=yes])

C compiler is not checked with AC_PROG_CC, as this comment says:

# 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

from sof.

keqiaozhang avatar keqiaozhang commented on August 15, 2024

@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

from sof.

keqiaozhang avatar keqiaozhang commented on August 15, 2024

@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.

from sof.

jajanusz avatar jajanusz commented on August 15, 2024

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.

You can for example just set env variable like:

export XTENSA_CORE=X6H3CNL_2016_4_linux

Let me know if it helps.
Thanks

from sof.

keqiaozhang avatar keqiaozhang commented on August 15, 2024

@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.

from sof.

keqiaozhang avatar keqiaozhang commented on August 15, 2024

summary:
The compilation issue is caused by 17c929e and both gcc and xcc cannot work.

  1. gcc compilation issue: let's track it with #78
  2. 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 #93

from sof.

keqiaozhang avatar keqiaozhang commented on August 15, 2024

This issue is fixed by #77.

from sof.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.