Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build i586 on Mac following instructions #6897

Closed
ShengRang opened this issue Apr 3, 2018 · 0 comments
Closed

Can't build i586 on Mac following instructions #6897

ShengRang opened this issue Apr 3, 2018 · 0 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@ShengRang
Copy link

using 1.11.99 , following the installation_mac in doc.

Everything works exactly right until this step:

 cp ${ZEPHYR_BASE}/scripts/cross_compiler/x86.config .config
export CT_PREFIX=/Volumes/CrossToolNG
ct-ng oldconfig

After ct-ng oldconfig, the file .config looks like this:
image
however in document, it said the .config should look like:

...
CT_LOCAL_TARBALLS_DIR="/Volumes/CrossToolNG/src"
# CT_SAVE_TARBALLS is not set
CT_WORK_DIR="${CT_TOP_DIR}/.build"
CT_PREFIX_DIR="/Volumes/CrossToolNG/x-tools/${CT_TARGET}"
CT_INSTALL_DIR="${CT_PREFIX_DIR}"
# Following options prevent link errors
CT_WANTS_STATIC_LINK=n
CT_CC_STATIC_LIBSTDCXX=n
...

I think it might cause by the document is behind latest source code, so I run ct-ng build.
When finished, the toolchain should be available under /Volumes/CrossToolNG/x-tools, but in my /Volumes/CrossToolNG there is just a i586-zephyr-elf folder.

tree -L 2 -a
.
├── .DS_Store
├── .Trashes [error opening dir]
├── .fseventsd
│   ├── 00000000008588fa
....
│   └── fseventsd-uuid
├── build
│   ├── .build
│   ├── .config
│   ├── .config.old
│   ├── build.log.bak
│   ├── build.log_04031008
│   ├── config -> /usr/local/lib/crosstool-ng-1.23.0/config
│   └── config.gen
└── i586-zephyr-elf
    ├── bin
    ├── build.log.bz2
    ├── i586-zephyr-elf
    ├── include
    ├── lib
    ├── libexec
    └── share

There is no such x-tools.
I think it might build successfully. but when I try to run samples/hello_world,

export ZEPHYR_TOOLCHAIN_VARIANT=xtools
export XTOOLS_TOOLCHAIN_PATH=/Volumes/CrossToolNG
export ZEPHYR_TOOLCHAIN_VARIANT=xtools
export ZEPHYR_SDK_INSTALL_DIR=/Volumes/CrossToolNG
cd $ZEPHYR_BASE/samples/hello_world
mkdir build && cd build

Then I run cmake -GNinja -DBOARD=qemu_x86 .. and get this:

CMake Deprecation Warning at /Users/***/project/zephyr/cmake/app/boilerplate.cmake:38 (cmake_policy):
  The OLD behavior for policy CMP0000 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:2 (include)


-- Found PythonInterp: /usr/local/bin/python3.4 (found suitable version "3.4.2", minimum required is "3.4")
-- Selected BOARD qemu_x86
Zephyr version: 1.11.99
CMake Error at /Users/***/project/zephyr/cmake/host-tools-zephyr.cmake:24 (message):
  The file '/Volumes/CrossToolNG/sdk_version' was not found.  Is
  ZEPHYR_SDK_INSTALL_DIR=/Volumes/CrossToolNG misconfigured?
Call Stack (most recent call first):
  /Users/***/project/zephyr/cmake/host-tools.cmake:1 (include)
  /Users/***/project/zephyr/cmake/app/boilerplate.cmake:240 (include)
  CMakeLists.txt:2 (include)


-- Configuring incomplete, errors occurred!
@nashif nashif self-assigned this Apr 3, 2018
@nashif nashif added the bug The issue is a bug, or the PR is fixing a bug label Apr 3, 2018
@nashif nashif added the priority: low Low impact/importance bug label Apr 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants