zephyrproject-rtos / meta-zephyr-sdk

Zephyr SDK (obsolete)
MIT License
44 stars 29 forks source link

SDK cannot be built behind proxy #56

Closed zephyrbot closed 7 years ago

zephyrbot commented 8 years ago

Reported by Andrew Boie:

I get the following:

 ./meta-zephyr-sdk/scripts/meta-zephyr-sdk-build.sh

########################################################################
    Building Zephyr host tools...
########################################################################
MACHINE=qemux86
WARNING: Host distribution "Fedora-24" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |#####################################################################| ETA:  00:00:00
Loaded 1366 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.28.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-24"
TARGET_SYS        = "i586-poky-linux"
MACHINE           = "qemux86"
DISTRO            = "zephyr-sdk"
DISTRO_VERSION    = "0.8"
TUNE_FEATURES     = "m32 i586"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "HEAD:ae57ea03c6a41f2e3b61e0c157e32ca7df7b3c4b"
meta-zephyr-sdk   = "master:a068e85b54088d59385b031cdefb379a42a18626"

NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:
FATAL: Failed to determine SOCKS server.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

ERROR: Logfile of failure stored in: /projects/poky/build-zephyr-tools/tmp/work/i686-nativesdk-pokysdk-linux/nativesdk-openocd/0.9.0-r0/temp/log.do_fetch.211563
Log data follows:
| DEBUG: Executing python function do_fetch
| DEBUG: Executing python function base_do_fetch
| DEBUG: Fetcher accessed the network with the command git -c core.fsyncobjectfiles=0 ls-remote git://repo.or.cz/openocd.git
| DEBUG: Running export SSH_AGENT_PID="2206"; export SSH_AUTH_SOCK="/home/apboie/.cache/keyring-3X73JY/ssh"; export GIT_PROXY_COMMAND="/home/apboie/bin/git_proxy_command"; export no_proxy="localhost,.intel.com,127.0.0.0/8,172.16.0.0/20,192.168.0.0/16,10.0.0.0/8"; export https_proxy="https://proxy-jf.intel.com:911"; export HTTPS_PROXY="http://proxy-chain.intel.com:911/"; export http_proxy="http://proxy-jf.intel.com:911"; export HTTP_PROXY="http://proxy-jf.intel.com:911"; export PATH="/projects/poky/build-zephyr-tools/tmp/sysroots/x86_64-linux/usr/bin/chrpath-native:/projects/poky/scripts:/projects/poky/build-zephyr-tools/tmp/sysroots/x86_64-linux/usr/bin/i686-pokysdk-linux:/projects/poky/build-zephyr-tools/tmp/sysroots/i686-nativesdk-pokysdk-linux/opt/zephyr-sdk/2.0.1/sysroots/i686-pokysdk-linux/usr/bin/crossscripts:/projects/poky/build-zephyr-tools/tmp/sysroots/x86_64-linux/usr/sbin:/projects/poky/build-zephyr-tools/tmp/sysroots/x86_64-linux/usr/bin:/projects/poky/build-zephyr-tools/tmp/sysroots/x86_64-linux/sbin:/projects/poky/build-zephyr-tools/tmp/sysroots/x86_64-linux/bin:/projects/poky/scripts:/projects/poky/bitbake/bin:/home/apboie/bin:/home/apboie/mgc/embedded/codebench/bin:/home/apboie/mgc/embedded/codebench/bin:/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/apboie/.local/bin:/home/apboie/bin:/home/apboie/altera_lite/16.0/quartus/bin:/home/apboie/altera_lite/16.0/nios2eds/bin"; export HOME="/home/apboie"; git -c core.fsyncobjectfiles=0 ls-remote git://repo.or.cz/openocd.git
| DEBUG: Python function base_do_fetch finished
| DEBUG: Python function do_fetch finished
| ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output:
| FATAL: Failed to determine SOCKS server.
| fatal: Could not read from remote repository.
| 
| Please make sure you have the correct access rights
| and the repository exists.
| 
ERROR: Task 252 (virtual:nativesdk:/projects/meta-zephyr-sdk/recipes-hosttools/openocd/openocd_0.9.0.bb, do_fetch) failed with exit code '1'
WARNING: Failed to fetch URL git://repo.or.cz/openocd.git, attempting MIRRORS if available
ERROR: Fetcher failure: Fetch command failed with exit code 128, output:
Cloning into bare repository '/projects/poky/downloads/git2/repo.or.cz.openocd.git'...
FATAL: Failed to determine SOCKS server.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

ERROR: Function failed: Fetcher failure for URL: 'git://repo.or.cz/openocd.git'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /projects/poky/build-zephyr-tools/tmp/work/i686-nativesdk-pokysdk-linux/nativesdk-openocd-legacy/git-r0/temp/log.do_fetch.211561
ERROR: Task 265 (virtual:nativesdk:/projects/meta-zephyr-sdk/recipes-hosttools/openocd-legacy/openocd-legacy_git.bb, do_fetch) failed with exit code '1'
WARNING: Failed to fetch URL ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz;name=libtar, attempting MIRRORS if available
NOTE: Tasks Summary: Attempted 328 tasks of which 284 didn't need to be rerun and 2 failed.
Waiting for 0 running tasks to finish:

Summary: 2 tasks failed:
  virtual:nativesdk:/projects/meta-zephyr-sdk/recipes-hosttools/openocd/openocd_0.9.0.bb, do_fetch
  virtual:nativesdk:/projects/meta-zephyr-sdk/recipes-hosttools/openocd-legacy/openocd-legacy_git.bb, do_fetch
Summary: There were 3 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
Error(s) encountered during bitbake.

(Imported from Jira SDK-37)

zephyrbot commented 8 years ago

by Juro Bystricky:

It is possible to build SDK behind proxy, as a matter of fact I am behind a proxy myself. The steps for configuring proxy are listed here:

[https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy]

I personally prefer the "chameleonsocks", but have used both approaches successfully.

zephyrbot commented 7 years ago

by Mark Linkmeyer:

Per review with Anas and Juro: "Juro to create documentation on the wiki on how to build behind proxy."

zephyrbot commented 7 years ago

by Mark Linkmeyer:

Juro Bystricky to provide David Kinder with a link to the Yocto documentation that describes building behind proxy. David to help figure out where to make that available to Zephyr users.

zephyrbot commented 7 years ago

by David Kinder:

Inaky Perez-Gonzalez Is this a devops document or do Zephyr users need to know how to build an SDK?

There is a README.md here: https://gerrit.zephyrproject.org/r/gitweb?p=meta-zephyr-sdk.git;a=blob;f=README.md;h=aa4db9fc28d02fe626134aaa79f1d99024eafd91;hb=refs/heads/master that looks like it's instructions for building the SDK that can include proxy information (but not specific to any company's proxy settings since this is a publically visible repo). You could simply add the reference to the Yocto Project proxy document you mentioned into this README.md, right?

Maybe the script itself could check if a proxy is needed and give a nice message rather than doing what it does now.