Re: [meta-virtualization] [PATCH] Revert "runc: Don't override GOARCH or GOROOT"

2017-10-12 Thread Anibal Limón
On Thu, Oct 12, 2017 at 6:58 AM, Paul Barker  wrote:

> On Tue, Oct 10, 2017 at 12:30 AM, Paul Barker 
> wrote:
> > On Tue, Oct 10, 2017 at 12:02 AM, Bruce Ashfield
> >  wrote:
> >> On Mon, Oct 9, 2017 at 5:56 PM, Paul Barker 
> wrote:
> >>>
> >>> It seems like we have conflicting changes :( Reverting this patch will
> >>> break cross-compilation of runc-opencontainers for x86-64 with musl
> >>> libc again.
> >>>
> >>> I'll try cross-compiling both runc variants for arm, aarch64, x86 and
> >>> x86-64 and see if I can find a solution that works for everything.
> >>>
> >>
> >> Agreed.
> >>
> >> I'll hold off on any revert until I hear from your tests.
> >>
> >> For the configs I'm using everything is building with the current set
> >> of changes.
> >>
> >> Bruce
> >>
> >
> > I can re-produce the failure by building runc-docker for
> > raspberrypi3-64. However, runc-opencontainers builds successfully for
> > raspberrypi3-64. So at worst we can add a do_compile_prepend() in the
> > recipe for runc-docker (but not the common .inc file). However, the
> > whole thing looks wrong, GOROOT shouldn't be pointing at the native
> > sysroot at all. There's probably something strange going on in the
> > runc-docker makefile.
> >
>
> I've found that the issue is with building the recvtty demo/reference
> application within runc-docker. That's under a contrib directory in
> the source tree and isn't a core part of the runc application. If I
> patch out the line in the Makefile which builds recvtty then the build
> succeeds for all platforms I build tested (qemux86, qemux86-64,
> raspberrypi, raspberrypi2, raspberrypi3, raspberrypi3-64).
>
> So I'm going to propose we just patch out the compilation of recvtty
> for this recipe unless someone is actually using it. Aníbal, is this
> ok for you?
>

Hi Paul,

For me is ok, i think the recvtty makefile needs to be fixed but since is a
demo application i don't see any problem to disable the build of it.

Cheers,
Anibal

>
> Thanks,
>
> --
> Paul Barker
> Togán Labs Ltd
>
-- 
___
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [meta-virtualization] [PATCH] Revert "runc: Don't override GOARCH or GOROOT"

2017-10-12 Thread Paul Barker
On Tue, Oct 10, 2017 at 12:30 AM, Paul Barker  wrote:
> On Tue, Oct 10, 2017 at 12:02 AM, Bruce Ashfield
>  wrote:
>> On Mon, Oct 9, 2017 at 5:56 PM, Paul Barker  wrote:
>>>
>>> It seems like we have conflicting changes :( Reverting this patch will
>>> break cross-compilation of runc-opencontainers for x86-64 with musl
>>> libc again.
>>>
>>> I'll try cross-compiling both runc variants for arm, aarch64, x86 and
>>> x86-64 and see if I can find a solution that works for everything.
>>>
>>
>> Agreed.
>>
>> I'll hold off on any revert until I hear from your tests.
>>
>> For the configs I'm using everything is building with the current set
>> of changes.
>>
>> Bruce
>>
>
> I can re-produce the failure by building runc-docker for
> raspberrypi3-64. However, runc-opencontainers builds successfully for
> raspberrypi3-64. So at worst we can add a do_compile_prepend() in the
> recipe for runc-docker (but not the common .inc file). However, the
> whole thing looks wrong, GOROOT shouldn't be pointing at the native
> sysroot at all. There's probably something strange going on in the
> runc-docker makefile.
>

I've found that the issue is with building the recvtty demo/reference
application within runc-docker. That's under a contrib directory in
the source tree and isn't a core part of the runc application. If I
patch out the line in the Makefile which builds recvtty then the build
succeeds for all platforms I build tested (qemux86, qemux86-64,
raspberrypi, raspberrypi2, raspberrypi3, raspberrypi3-64).

So I'm going to propose we just patch out the compilation of recvtty
for this recipe unless someone is actually using it. Aníbal, is this
ok for you?

Thanks,

-- 
Paul Barker
Togán Labs Ltd
-- 
___
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [meta-virtualization] [PATCH] Revert "runc: Don't override GOARCH or GOROOT"

2017-10-09 Thread Paul Barker
On Tue, Oct 10, 2017 at 12:02 AM, Bruce Ashfield
 wrote:
> On Mon, Oct 9, 2017 at 5:56 PM, Paul Barker  wrote:
>> On Mon, Oct 9, 2017 at 8:54 PM, Aníbal Limón  wrote:
>>> From: Aníbal Limón 
>>>
>>> This reverts commit fdee07aadc1b5224a540c7e8893144207e1979cb.
>>>
>>> Causes build failures when is cross-compiling to aarch64,
>>>
>>> | CGO_ENABLED=1 aarch64-linaro-linux-go build -i  -tags " cgo static_build" 
>>> -ldflags "-w -extldflags -static -X 
>>> main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X 
>>> main.version=1.0.0-rc3 " -o runc .
>>> ...
>>> | 
>>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link:
>>>  running aarch64-linaro-linux-gcc failed: exit status 1
>>> | 
>>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>>>  cannot find crt1.o: No such file or directory
>>> | 
>>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>>>  cannot find crti.o: No such file or directory
>>> | 
>>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>>>  cannot find crtbeginT.o: No such file or directory
>>> ...
>>>
>>> Signed-off-by: Aníbal Limón 
>>> ---
>>>  recipes-containers/runc/runc.inc | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/recipes-containers/runc/runc.inc 
>>> b/recipes-containers/runc/runc.inc
>>> index b1f2ba8..83d5f86 100644
>>> --- a/recipes-containers/runc/runc.inc
>>> +++ b/recipes-containers/runc/runc.inc
>>> @@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''"
>>>  inherit goarch
>>>
>>>  do_compile() {
>>> +   export GOARCH="${TARGET_GOARCH}"
>>> +   export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
>>> # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
>>> # docker to download its dependencies but rather
>>> # use dependencies packaged independently.
>>> @@ -32,6 +34,7 @@ do_compile() {
>>>
>>> (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
>>> export 
>>> GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
>>> +   export 
>>> GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
>>>
>>> # Fix up symlink for go-cross compiler
>>> rm -f ${S}/src/import/vendor/src
>>
>> It seems like we have conflicting changes :( Reverting this patch will
>> break cross-compilation of runc-opencontainers for x86-64 with musl
>> libc again.
>>
>> I'll try cross-compiling both runc variants for arm, aarch64, x86 and
>> x86-64 and see if I can find a solution that works for everything.
>>
>
> Agreed.
>
> I'll hold off on any revert until I hear from your tests.
>
> For the configs I'm using everything is building with the current set
> of changes.
>
> Bruce
>

I can re-produce the failure by building runc-docker for
raspberrypi3-64. However, runc-opencontainers builds successfully for
raspberrypi3-64. So at worst we can add a do_compile_prepend() in the
recipe for runc-docker (but not the common .inc file). However, the
whole thing looks wrong, GOROOT shouldn't be pointing at the native
sysroot at all. There's probably something strange going on in the
runc-docker makefile.

I'm away for the next couple of days but will then get back to this.

Cheers,

-- 
Paul Barker
Togán Labs Ltd
-- 
___
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [meta-virtualization] [PATCH] Revert "runc: Don't override GOARCH or GOROOT"

2017-10-09 Thread Bruce Ashfield
On Mon, Oct 9, 2017 at 5:56 PM, Paul Barker  wrote:
> On Mon, Oct 9, 2017 at 8:54 PM, Aníbal Limón  wrote:
>> From: Aníbal Limón 
>>
>> This reverts commit fdee07aadc1b5224a540c7e8893144207e1979cb.
>>
>> Causes build failures when is cross-compiling to aarch64,
>>
>> | CGO_ENABLED=1 aarch64-linaro-linux-go build -i  -tags " cgo static_build" 
>> -ldflags "-w -extldflags -static -X 
>> main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X 
>> main.version=1.0.0-rc3 " -o runc .
>> ...
>> | 
>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link:
>>  running aarch64-linaro-linux-gcc failed: exit status 1
>> | 
>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>>  cannot find crt1.o: No such file or directory
>> | 
>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>>  cannot find crti.o: No such file or directory
>> | 
>> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>>  cannot find crtbeginT.o: No such file or directory
>> ...
>>
>> Signed-off-by: Aníbal Limón 
>> ---
>>  recipes-containers/runc/runc.inc | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/recipes-containers/runc/runc.inc 
>> b/recipes-containers/runc/runc.inc
>> index b1f2ba8..83d5f86 100644
>> --- a/recipes-containers/runc/runc.inc
>> +++ b/recipes-containers/runc/runc.inc
>> @@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''"
>>  inherit goarch
>>
>>  do_compile() {
>> +   export GOARCH="${TARGET_GOARCH}"
>> +   export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
>> # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
>> # docker to download its dependencies but rather
>> # use dependencies packaged independently.
>> @@ -32,6 +34,7 @@ do_compile() {
>>
>> (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
>> export 
>> GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
>> +   export 
>> GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
>>
>> # Fix up symlink for go-cross compiler
>> rm -f ${S}/src/import/vendor/src
>
> It seems like we have conflicting changes :( Reverting this patch will
> break cross-compilation of runc-opencontainers for x86-64 with musl
> libc again.
>
> I'll try cross-compiling both runc variants for arm, aarch64, x86 and
> x86-64 and see if I can find a solution that works for everything.
>

Agreed.

I'll hold off on any revert until I hear from your tests.

For the configs I'm using everything is building with the current set
of changes.

Bruce

> --
> Paul Barker
> Togán Labs Ltd



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
-- 
___
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization


Re: [meta-virtualization] [PATCH] Revert "runc: Don't override GOARCH or GOROOT"

2017-10-09 Thread Paul Barker
On Mon, Oct 9, 2017 at 8:54 PM, Aníbal Limón  wrote:
> From: Aníbal Limón 
>
> This reverts commit fdee07aadc1b5224a540c7e8893144207e1979cb.
>
> Causes build failures when is cross-compiling to aarch64,
>
> | CGO_ENABLED=1 aarch64-linaro-linux-go build -i  -tags " cgo static_build" 
> -ldflags "-w -extldflags -static -X 
> main.gitCommit="9d6821d1b53908e249487741eccd567249ca1d99-dirty" -X 
> main.version=1.0.0-rc3 " -o runc .
> ...
> | 
> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/lib/aarch64-linaro-linux/go/pkg/tool/linux_amd64/link:
>  running aarch64-linaro-linux-gcc failed: exit status 1
> | 
> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>  cannot find crt1.o: No such file or directory
> | 
> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>  cannot find crti.o: No such file or directory
> | 
> /home/anibal.limon/linaro/oe-rpb-master/build-rpb/tmp-rpb-glibc/work/aarch64-linaro-linux/runc-docker/1.0.0-rc3+gitINVALID-r0/recipe-sysroot-native/usr/bin/aarch64-linaro-linux/../../libexec/aarch64-linaro-linux/gcc/aarch64-linaro-linux/7.1.1/ld:
>  cannot find crtbeginT.o: No such file or directory
> ...
>
> Signed-off-by: Aníbal Limón 
> ---
>  recipes-containers/runc/runc.inc | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/recipes-containers/runc/runc.inc 
> b/recipes-containers/runc/runc.inc
> index b1f2ba8..83d5f86 100644
> --- a/recipes-containers/runc/runc.inc
> +++ b/recipes-containers/runc/runc.inc
> @@ -21,6 +21,8 @@ EXTRA_OEMAKE="BUILDTAGS=''"
>  inherit goarch
>
>  do_compile() {
> +   export GOARCH="${TARGET_GOARCH}"
> +   export GOROOT="${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go"
> # Set GOPATH. See 'PACKAGERS.md'. Don't rely on
> # docker to download its dependencies but rather
> # use dependencies packaged independently.
> @@ -32,6 +34,7 @@ do_compile() {
>
> (cd .gopath/src/${dname}; ln -sf ../../../../../${bname} ${bname})
> export 
> GOPATH="${S}/src/import/.gopath:${S}/src/import/vendor:${STAGING_DIR_TARGET}/${prefix}/local/go"
> +   export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go"
>
> # Fix up symlink for go-cross compiler
> rm -f ${S}/src/import/vendor/src

It seems like we have conflicting changes :( Reverting this patch will
break cross-compilation of runc-opencontainers for x86-64 with musl
libc again.

I'll try cross-compiling both runc variants for arm, aarch64, x86 and
x86-64 and see if I can find a solution that works for everything.

-- 
Paul Barker
Togán Labs Ltd
-- 
___
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization