All of lore.kernel.org
 help / color / mirror / Atom feed
* Creating a new recipe
@ 2017-05-05 14:40 Giuseppe Di Guglielmo
  2017-05-05 17:04 ` Andrea Galbusera
  0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe Di Guglielmo @ 2017-05-05 14:40 UTC (permalink / raw)
  To: yocto


[-- Attachment #1.1: Type: text/plain, Size: 1033 bytes --]

Hi all,
I am trying to create a new recipe for Bazel (from Google):
https://bazel.build/versions/master/docs/install-compile-source.html

The standard compilation flow is relatively simple: "Unzip the archive and
call bash ./compile.sh; this will create a bazel binary in output/bazel.
This binary is self-contained, so it can be copied to a directory on the
PATH (such as /usr/local/bin) or used in-place."

I need some support on how to debug the recipe file that I attach.

In do_compile(), I run bash ./compile.sh. This requires the JAVA_HOME
variable that I export hard-coded because at the moment I do not know how
to fetch that path in a recipe. At this point the compile.sh fails and I do
not know how to debug. Please, can you have a look at it and provide me
some comments?

do_compile () {
        export
JAVA_HOME=/home/giuseppe/research/projects/zynq/yocto/build/tmp/work/zc702_zynq7-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/usr/lib/jvm/openjdk-8
        bash ./compile.sh
}

Giuseppe

[-- Attachment #1.2: Type: text/html, Size: 3048 bytes --]

[-- Attachment #2: bazel.bb --]
[-- Type: application/octet-stream, Size: 791 bytes --]

SUMMARY = "Bazel: Correct, reproducible, and fast builds for everyone."
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"

SRC_URI = "https://github.com/bazelbuild/bazel/releases/download/0.4.5/bazel-0.4.5-dist.zip"
SRC_URI[md5sum] = "e45ff9b31bc3c811167ab85930bd6378"
SRC_URI[sha256sum] = "2b737be42678900470ae9e48c975ac5b2296d9ae23c007bf118350dbe7c0552b"


DEPENDS = "openjdk-8"

inherit java-library

do_unpack () {
        unzip ${PN}-0.4.5-dist.zip
        echo ${libdir}
}

do_configure () {
        :
}

do_compile () {
	export JAVA_HOME=/home/giuseppe/research/projects/zynq/yocto/build/tmp/work/zc702_zynq7-poky-linux-gnueabi/core-image-minimal/1.0-r0/rootfs/usr/lib/jvm/openjdk-8
        bash ./compile.sh
}

do_install () {
	:
}


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating a new recipe
  2017-05-05 14:40 Creating a new recipe Giuseppe Di Guglielmo
@ 2017-05-05 17:04 ` Andrea Galbusera
  2017-05-05 17:24   ` Giuseppe Di Guglielmo
  0 siblings, 1 reply; 3+ messages in thread
From: Andrea Galbusera @ 2017-05-05 17:04 UTC (permalink / raw)
  To: Giuseppe Di Guglielmo; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]

On Fri, May 5, 2017 at 4:40 PM, Giuseppe Di Guglielmo <
giuseppe.diguglielmo@gmail.com> wrote:

> Hi all,
> I am trying to create a new recipe for Bazel (from Google):
> https://bazel.build/versions/master/docs/install-compile-source.html
>
> The standard compilation flow is relatively simple: "Unzip the archive
> and call bash ./compile.sh; this will create a bazel binary in
> output/bazel. This binary is self-contained, so it can be copied to a
> directory on the PATH (such as /usr/local/bin) or used in-place."
>
> I need some support on how to debug the recipe file that I attach.
>
> In do_compile(), I run bash ./compile.sh. This requires the JAVA_HOME
> variable that I export hard-coded because at the moment I do not know how
> to fetch that path in a recipe. At this point the compile.sh fails and I do
> not know how to debug. Please, can you have a look at it and provide me
> some comments?
>

How does it fail? What is the log from bitbake? Please also provide the
layers configuration that bitbake shows.

[-- Attachment #2: Type: text/html, Size: 3018 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Creating a new recipe
  2017-05-05 17:04 ` Andrea Galbusera
@ 2017-05-05 17:24   ` Giuseppe Di Guglielmo
  0 siblings, 0 replies; 3+ messages in thread
From: Giuseppe Di Guglielmo @ 2017-05-05 17:24 UTC (permalink / raw)
  To: Andrea Galbusera; +Cc: yocto


[-- Attachment #1.1: Type: text/plain, Size: 5717 bytes --]

I made some further steps.

I attach the layer package that I am creating. You can add it to
conf/bblayers.conf.

The error that I the following. Let me know what you thing of it.

Thank you,
Giuseppe

$ bitbake bazel
Parsing recipes: 100%
|#################################################################################################################################################################################################|
Time: 0:00:32
Parsing of 1774 .bb files complete (0 cached, 1774 parsed). 2490 targets,
149 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.32.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "universal-4.8"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "zc702-zynq7"
DISTRO            = "poky"
DISTRO_VERSION    = "2.2.1"
TUNE_FEATURES     = "arm armv7a vfp thumb neon       callconvention-hard
    cortexa9"
TARGET_FPU        = "hard"
meta              = "morty:924e576b8930fd2268d85f0b151e5f68a3c2afce"
meta-xilinx       = "morty:1ddfc0ba94f597822e619395fa0b35fb322e26af"
meta-poky
meta-tensorflow   = "morty:924e576b8930fd2268d85f0b151e5f68a3c2afce"
meta-xilinx-tools = "rel-v2017.1:64847a5afcffcb73e4bcf2137911819b55537308"
meta-yocto-bsp    = "morty:924e576b8930fd2268d85f0b151e5f68a3c2afce"
meta-oe
meta-python       = "morty:fe5c83312de11e80b85680ef237f8acb04b4b26e"
meta-java         = "HEAD:67e48693501bddb80745b9735b7b3d4d28dce9a1"
workspace         = "<unknown>:<unknown>"

Initialising tasks: 100%
|##############################################################################################################################################################################################|
Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: bazel-0.4.5-r0 do_compile: Function failed: do_compile (log file is
located at
/home/giuseppe/research/projects/zynq/yocto/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/bazel/0.4.5-r0/temp/log.do_compile.4221)
ERROR: Logfile of failure stored in:
/home/giuseppe/research/projects/zynq/yocto/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/bazel/0.4.5-r0/temp/log.do_compile.4221
Log data follows:
| DEBUG: Executing shell function do_compile
| INFO: You can skip this first step by providing a path to the bazel
binary as second argument:
| INFO:    ./compile.sh compile /path/to/bazel
| �  Building Bazel from scratch.......
| �  Building Bazel with Bazel.
| .WARNING: /tmp/bazel_tTNeGhsI/out/external/bazel_tools/WORKSPACE:1:
Workspace name in /tmp/bazel_tTNeGhsI/out/external/bazel_tools/WORKSPACE
(@io_bazel) does not match the name given in the repository's definition
(@bazel_tools); this will cause a build error in future versions.
| INFO: Loading package: src
| INFO: Loading package: @bazel_tools//tools/cpp
| INFO: Loading package: @local_config_xcode//
| ERROR: in target '//external:cc_toolchain': no such package
'@local_config_cc//': Traceback (most recent call last):
|       File
"/tmp/bazel_tTNeGhsI/out/external/bazel_tools/tools/cpp/cc_configure.bzl",
line 684
|               _find_cc(repository_ctx)
|       File
"/tmp/bazel_tTNeGhsI/out/external/bazel_tools/tools/cpp/cc_configure.bzl",
line 398, in _find_cc
|               repository_ctx.which(cc_name)
| Program argument of which() may not contains a / or a \
('arm-poky-linux-gnueabi-gcc  -march=armv7-a -marm -mfpu=neon
 -mfloat-abi=hard -mcpu=cortex-a9
--sysroot=/home/giuseppe/research/projects/zynq/yocto/build/tmp/sysroots/zc702-zynq7'
given).
| INFO: Elapsed time: 1.004s
|
| ERROR: Could not build Bazel
| WARNING:
/home/giuseppe/research/projects/zynq/yocto/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/bazel/0.4.5-r0/temp/run.do_compile.4221:1
exit 2 from 'bash ./compile.sh'
| ERROR: Function failed: do_compile (log file is located at
/home/giuseppe/research/projects/zynq/yocto/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/bazel/0.4.5-r0/temp/log.do_compile.4221)
ERROR: Task
(/home/giuseppe/research/projects/zynq/yocto/poky/meta-tensorflow/recipes/bazel/bazel_0.4.5.bb:do_compile)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 1370 tasks of which 1369 didn't need to be
rerun and 1 failed.

Summary: 1 task failed:

/home/giuseppe/research/projects/zynq/yocto/poky/meta-tensorflow/recipes/bazel/bazel_0.4.5.bb:
do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.








On Fri, May 5, 2017 at 1:04 PM, Andrea Galbusera <gizero@gmail.com> wrote:

> On Fri, May 5, 2017 at 4:40 PM, Giuseppe Di Guglielmo <
> giuseppe.diguglielmo@gmail.com> wrote:
>
>> Hi all,
>> I am trying to create a new recipe for Bazel (from Google):
>> https://bazel.build/versions/master/docs/install-compile-source.html
>>
>> The standard compilation flow is relatively simple: "Unzip the archive
>> and call bash ./compile.sh; this will create a bazel binary in
>> output/bazel. This binary is self-contained, so it can be copied to a
>> directory on the PATH (such as /usr/local/bin) or used in-place."
>>
>> I need some support on how to debug the recipe file that I attach.
>>
>> In do_compile(), I run bash ./compile.sh. This requires the JAVA_HOME
>> variable that I export hard-coded because at the moment I do not know how
>> to fetch that path in a recipe. At this point the compile.sh fails and I do
>> not know how to debug. Please, can you have a look at it and provide me
>> some comments?
>>
>
> How does it fail? What is the log from bitbake? Please also provide the
> layers configuration that bitbake shows.
>

[-- Attachment #1.2: Type: text/html, Size: 12460 bytes --]

[-- Attachment #2: meta-tensorflow.tgz --]
[-- Type: application/x-gzip, Size: 1551 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-05 17:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-05 14:40 Creating a new recipe Giuseppe Di Guglielmo
2017-05-05 17:04 ` Andrea Galbusera
2017-05-05 17:24   ` Giuseppe Di Guglielmo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.