Repository navigation
readme: update for cmake - #876
Conversation
|
Hi @jajanusz, It looks like you are changing the build system, right? Trying to compile using the new build system I got an error. $ mkdir build_byt && cd build_byt `[ 59%] Building ASM object CMakeFiles/sof.dir/src/arch/xtensa/up/xtos/crt1-boards.S.obj include_next <stdint.h>compilation terminated. include_next <stdint.h>compilation terminated. include_next <stdint.h>` |
|
@dbaluta
|
There was a problem hiding this comment.
doesn't work for me:
/data/pbossart/SOF-public/sof-sdk/sof.git/build$ cmake -DTOOLCHAIN=xtensa-apl-elf -DROOT_DIR=`pwd`/../xtensa-root/xtensa-apl-elf ..
-- Preparing Xtensa toolchain
-- The C compiler identification is unknown
-- The ASM compiler identification is GNU
-- Found assembler: xtensa-apl-elf-gcc
CMake Error at CMakeLists.txt:30 (project):
The CMAKE_C_COMPILER:
xtensa-apl-elf-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
CMake Error at CMakeLists.txt:30 (project):
The CMAKE_ASM_COMPILER:
xtensa-apl-elf-gcc
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "/data/pbossart/SOF-public/sof-sdk/sof.git/CMakeFiles/CMakeOutput.log".
See also "/data/pbossart/SOF-public/sof-sdk/sof.git/CMakeFiles/CMakeError.log".
There was a problem hiding this comment.
Looks like you don't have xtensa-apl-elf-* programs in PATH
There was a problem hiding this comment.
Need to add the following commands to make this work:
pbossart@pbossart-mobl3:/data/pbossart/SOF-public/sof-sdk/sof.git/build$ export PATH=/data/pbossart/SOF-public/sof-sdk/xtensa-root/xtensa-bxt-elf/bin/:$PATH
pbossart@pbossart-mobl3:/data/pbossart/SOF-public/sof-sdk/sof.git/build$ cmake -DTOOLCHAIN=xtensa-bxt-elf -DROOT_DIR=`pwd`/../xtensa-root/xtensa-bxt-elf ..
-- Preparing Xtensa toolchain
-- The C compiler identification is GNU 5.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /data/pbossart/SOF-public/sof-sdk/xtensa-root/xtensa-bxt-elf/bin/xtensa-apl-elf-gcc
-- Generating /data/pbossart/SOF-public/sof-sdk/sof.git/generated/include/version.h
-- Configuring done
-- Generating done
-- Build files have been written to: /data/pbossart/SOF-public/sof-sdk/sof.git
There was a problem hiding this comment.
These steps (in your case adding to PATH) didn't change with buildsystem, they are in full docs there: https://thesofproject.github.io/latest/getting_started/build-guide/build-from-scratch.html#build-toolchain-from-source
This PR is direct replacements for steps that were previously in README.md, for full build for all GCC toolchains I'd have to just copy-paste what we already have on sof-docs.
There was a problem hiding this comment.
@plbossart
BTW The C compiler identification is GNU 5.2.0 - AFAIK we support GCC 7+ for both host gcc and gcc xtensa toolchains. FW may work with gcc 5 but rimage build will fail for sure because of -Wimplicit-fallthrough flag
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
There was a problem hiding this comment.
you are missing a cd .. here, the make xyz-defconfig doesn't work from the build directory
There was a problem hiding this comment.
You have mkdir build && cd build in first step. From there you build/configure etc. It's working dir for your configuration. It's CMake convention.
There was a problem hiding this comment.
never mind, I missed a step here.
There was a problem hiding this comment.
you are missing a cd .. here, the make xyz-defconfig doesn't work from the build directory
Yup. With this, it works for me. Can you update the docs?
Also, just curious. What was the reason to switch to cmake instead of the good old autotools? :)
There was a problem hiding this comment.
@dbaluta def_configs and menus, makes it easy to select what to build in, module or not build etc.
63a7f11 to
96a33b4
Compare
Yes, after fixing the ROOT_DIR as you said (adding extra ..) it work for me now. Also, ./scripts/xtensa-build-all.sh works! |
|
so make bin fails but using the scripts kind works, until it doesn't Seriously? |
Maybe try to use proper toolchain instead of old bugged one without threadptr support when you are doing SMP build? |
|
@plbossart you need latest toolchain. make sure you have gcc 8.1 for xtensa. |
Both community wiki and README are for tools available to community (gcc toolchain), so instructions were updated for these toolchains. For proprietary compilers you have snippets ready to be copy-pasted (they were also in PR #845). If you cannot translate simple instructions to xt toolchain, when only thing you need to do is change 1 variable + you have it described in internal wiki + you had it described also in PR #845 then I don't know what kind of instructions you need. I think video tutorial on youtube for 4 commands may be overkill. |
@jajanusz I appreciate the polish way of being so direct :). Come on, we are all friends here. |
|
On 1/23/19 1:50 PM, Liam Girdwood wrote:
@plbossart <https://github.com/plbossart> you need latest toolchain.
make sure you have gcc 8.1 for xtensa.
dependency missed then...
|
|
On 1/23/19 2:08 PM, Daniel Baluta wrote:
@jajanusz <https://github.com/jajanusz> I have exactly the
same issues as @dbaluta <https://github.com/dbaluta>, even
with a clean repo. Plus I really want to use XCC. this is
blocking folks when the instructions and setup are not clear.
Both community wiki and README are for tools available to
community (gcc toolchain), so instructions where updated for these
toolchains. For proprietary compilers you have snippets ready to
be copy-pasted (they were also in PR #845
<#845>).
If you cannot translate simple instructions to xt toolchain, when
only thing you need to do is change 1 variable + you have it
described in internal wiki + you had it described also in PR #845
<#845> then I don't know
what kind of instructions you need. I think video tutorial on
youtube for 4 commands may be overkill.
@jajanusz <https://github.com/jajanusz> I appreciate the polish way of
being so direct :)
I don't. I just updated my email filters.
|
We've had this gcc 8.1 dependency for a long time now otherwise your FW would not build, it's possible you have two gcc versions and the cmake is using the older version (maybe $PATH precedence ?) |
Signed-off-by: Janusz Jankowski janusz.jankowski@linux.intel.com