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

OS X: setup instructions are wrong #6912

Closed
andrewboie opened this issue Apr 3, 2018 · 14 comments
Closed

OS X: setup instructions are wrong #6912

andrewboie opened this issue Apr 3, 2018 · 14 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@andrewboie
Copy link
Contributor

brew install cmake ninja dfu-util doxygen qemu dtc python3 gperf curl -O 'https://bootstrap.pypa.io/get-pip.py' ./get-pip.py rm get-pip.py cd ~/zephyr # or to the folder where you cloned the zephyr repo pip3 install --user -r scripts/requirements.txt

The ./get-pip.py line does not work, the script is not executable and requires sudo anyway.

@nashif nashif added the bug The issue is a bug, or the PR is fixing a bug label Apr 4, 2018
@carlescufi carlescufi self-assigned this Apr 4, 2018
@carlescufi
Copy link
Member

I'll take a look today

@andrewboie
Copy link
Contributor Author

andrewboie commented Apr 4, 2018

Crosstool setup has this command, which errors out
`$ brew tap homebrew/dupes

Error: homebrew/dupes was deprecated. This tap is now empty as all its formulae were migrated.`

@andrewboie
Copy link
Contributor Author

Although it used to be broken, ct-ng in brew works well now in High Sierra. I think we should delete the section about building from source.

@andrewboie
Copy link
Contributor Author

We should definitely delete the section on "Verifying the Configuration of the Toolchain".
The config files checked into the tree should be in a state where they Just Work if the recommended paths are used.

@andrewboie
Copy link
Contributor Author

The config files checked into the tree do NOT have the changes in "Verifying the Configuration of the Toolchain" made.
Why is this left as an exercise for the user??

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

@andrewboie
Copy link
Contributor Author

OK I'm dead in the water trying to build the toolchain.

[EXTRA]  Preparing working directories
gstat: cannot read file system information for '%Lp': No such file or directory

@andrewboie
Copy link
Contributor Author

It seems the logic in ct-ng to detect whether gstat works like BSD or GNU is broken.
I hacked it by changing

andrew@magrathea:/usr/local/lib/crosstool-ng-1.23.0
$ ag gstat
scripts/functions
579:                mode="$(gstat -c '%a' "$(dirname "${dir}")")"
582:                mode="$(gstat -f '%Lp' "$(dirname "${dir}")")"

Line 582 to just 'stat' which is the OS X BSD stat tool. Seems to work?

@andrewboie
Copy link
Contributor Author

Anas
3:02 oh
3:02 i know what the issue is
3:02 you need to run 'make oldconfig'
3:03 the configs you have are probably for Linux and have GNU in them
3:03 'make oldconfig; would reset to BSD
3:03 I remember now, hit this some time ago
3:04 CT_CONFIGURE_has_stat_flavor_GNU=y
3:05 should be CT_CONFIGURE_has_stat_flavor_BSD=y on the mac

@andrewboie
Copy link
Contributor Author

apboie
3:47 > CT_CONFIGURE_has_stat_flavor_BSD=y
3:47 not as simple as this.
3:48 It is trying to use gstat from brew coreutils as BSD when it is actually GNU
3:48 so it is the opposite.

@andrewboie
Copy link
Contributor Author

I'm now stuck on #6911

@carlescufi
Copy link
Member

There's a lot of stuff in here, let's start with get-pip.py?

@carlescufi
Copy link
Member

carlescufi commented Apr 5, 2018

@andrewboie a first pass at fixing some of the issues you mention: #6949. Should I remove the section you mention, "Verifying the Configuration of the Toolchain"? I haven't tried to build the toolchain yet.

@carlescufi
Copy link
Member

Looked at this again. Seems like the issue is with ct-ng, I have no idea how to solve that since I have never used it. @nashif can you take a look?

@carlescufi
Copy link
Member

@andrewboie actually you say that you are stuck on #6911 but that is closed now. Is this present issue also solved then?

nashif added a commit that referenced this issue May 15, 2018
Use sdn-ng scripts to build toolchain instead of repeating them here.

Fixes #6912

Signed-off-by: Anas Nashif <[email protected]>
nashif added a commit that referenced this issue May 16, 2018
Use sdn-ng scripts to build toolchain instead of repeating them here.

Fixes #6912

Signed-off-by: Anas Nashif <[email protected]>
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: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants