You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Li-Chun Ko <li...@gmail.com> on 2017/01/18 11:59:25 UTC

Tutorial problem with the Docker Container

Hi all,

I am a noob here and I am trying to build Mynewt applications with the
Docker Container (using the Docker Quickstart Terminal).

I followed the instructions I found here:
http://mynewt.apache.org/os/get_started/project_create/ and encountered a
problem in the step when executing this command:

newt test @apache-mynewt-core/libs/os

The error messages are shown below.
I have googled the problem and it seems this caused by the "go" command
(ref: https://github.com/golang/go/issues/16566).
However I have no clue, how this problem can be fixed.
For instance, how do I access the GOPATH parameter from the Docker
Quickstart Terminal?

Any suggestion?

BTW, I am running the Docker Container on a 64 bit Windows 10 platform.

Br,
Lichun

$ ./newt test @repos/apache-mynewt-core/libs/os panic: runtime error:
invalid memory address or nil pointer dereference [signal SIGSEGV:
segmentation violation code=0x1 addr=0x0 pc=0x626295] goroutine 1
[running]: panic(0x7f8480, 0xc420012080)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1a, 0x0) /go/src/
mynewt.apache.org/newt/newt/repo/repo.go:289 +0x5
mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc420322f60,
0xa4b180, 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffe9ebee01, 0xc420322f60) /go/src/
mynewt.apache.org/newt/newt/pkg/dependency.go:63 +0x169
mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc420322f60, 0xa4b180,
0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffffffffffff, 0x0) /go/src/
mynewt.apache.org/newt/newt/pkg/dependency.go:74 +0x57
mynewt.apache.org/newt/newt/pkg.NewDependency(0xa4b180, 0x0,
0x7fffe9ebeef1, 0x1a, 0xa89980, 0x1a, 0x0) /go/src/
mynewt.apache.org/newt/newt/pkg/dependency.go:84 +0x8b
mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc420052660,
0xa4b180, 0xc42006e3f0, 0x7fffe9ebeeea, 0x21, 0x0, 0x7f3e80, 0xc42000d6e0)
/go/src/mynewt.apache.org/newt/newt/project/project.go:547 +0xfe
mynewt.apache.org/newt/newt/cli.testRunCmd(0xc420208b40, 0xc4201c7a00, 0x1,
0x1) /go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:225 +0x119
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc420208b40,
0xc4201c79c0, 0x1, 0x1, 0xc420208b40, 0xc4201c79c0) /go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
+0x443
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420074fc0,
0x4, 0x2c, 0x87a8a3) /go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
+0x367
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420074fc0,
0x87a8a3, 0x4) /go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
+0x2b main.main() /go/src/mynewt.apache.org/newt/newt/newt.go:146 +0x1b6

Re: Tutorial problem with the Docker Container

Posted by aditi hilbert <ad...@runtime.io>.
And could you also make sure you are running the latest docker container?
docker pull mynewt/newt:latest

thanks,
aditi

> On Jan 18, 2017, at 10:42 AM, aditi hilbert <ad...@runtime.io> wrote:
> 
> Lichun,
> 
> That particular package path actually does not exist - so the documentation is incorrect. I can fix that. 
> 
> Try testing with the package with a valid path e.g. 
> 
> newt test @apache-mynewt-core/kernel/os 
> 
> thanks,
> aditi
> 
>> On Jan 18, 2017, at 3:59 AM, Li-Chun Ko <li...@gmail.com> wrote:
>> 
>> Hi all,
>> 
>> I am a noob here and I am trying to build Mynewt applications with the
>> Docker Container (using the Docker Quickstart Terminal).
>> 
>> I followed the instructions I found here:
>> http://mynewt.apache.org/os/get_started/project_create/ and encountered a
>> problem in the step when executing this command:
>> 
>> newt test @apache-mynewt-core/libs/os
>> 
>> The error messages are shown below.
>> I have googled the problem and it seems this caused by the "go" command
>> (ref: https://github.com/golang/go/issues/16566).
>> However I have no clue, how this problem can be fixed.
>> For instance, how do I access the GOPATH parameter from the Docker
>> Quickstart Terminal?
>> 
>> Any suggestion?
>> 
>> BTW, I am running the Docker Container on a 64 bit Windows 10 platform.
>> 
>> Br,
>> Lichun
>> 
>> $ ./newt test @repos/apache-mynewt-core/libs/os panic: runtime error:
>> invalid memory address or nil pointer dereference [signal SIGSEGV:
>> segmentation violation code=0x1 addr=0x0 pc=0x626295] goroutine 1
>> [running]: panic(0x7f8480, 0xc420012080)
>> /usr/local/go/src/runtime/panic.go:500 +0x1a1
>> mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1a, 0x0) /go/src/
>> mynewt.apache.org/newt/newt/repo/repo.go:289 +0x5
>> mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc420322f60,
>> 0xa4b180, 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffe9ebee01, 0xc420322f60) /go/src/
>> mynewt.apache.org/newt/newt/pkg/dependency.go:63 +0x169
>> mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc420322f60, 0xa4b180,
>> 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffffffffffff, 0x0) /go/src/
>> mynewt.apache.org/newt/newt/pkg/dependency.go:74 +0x57
>> mynewt.apache.org/newt/newt/pkg.NewDependency(0xa4b180, 0x0,
>> 0x7fffe9ebeef1, 0x1a, 0xa89980, 0x1a, 0x0) /go/src/
>> mynewt.apache.org/newt/newt/pkg/dependency.go:84 +0x8b
>> mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc420052660,
>> 0xa4b180, 0xc42006e3f0, 0x7fffe9ebeeea, 0x21, 0x0, 0x7f3e80, 0xc42000d6e0)
>> /go/src/mynewt.apache.org/newt/newt/project/project.go:547 +0xfe
>> mynewt.apache.org/newt/newt/cli.testRunCmd(0xc420208b40, 0xc4201c7a00, 0x1,
>> 0x1) /go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:225 +0x119
>> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc420208b40,
>> 0xc4201c79c0, 0x1, 0x1, 0xc420208b40, 0xc4201c79c0) /go/src/
>> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
>> +0x443
>> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420074fc0,
>> 0x4, 0x2c, 0x87a8a3) /go/src/
>> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
>> +0x367
>> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420074fc0,
>> 0x87a8a3, 0x4) /go/src/
>> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
>> +0x2b main.main() /go/src/mynewt.apache.org/newt/newt/newt.go:146 +0x1b6
> 


Re: Tutorial problem with the Docker Container

Posted by aditi hilbert <ad...@runtime.io>.
Lichun,

That particular package path actually does not exist - so the documentation is incorrect. I can fix that. 

Try testing with the package with a valid path e.g. 

newt test @apache-mynewt-core/kernel/os 

thanks,
aditi

> On Jan 18, 2017, at 3:59 AM, Li-Chun Ko <li...@gmail.com> wrote:
> 
> Hi all,
> 
> I am a noob here and I am trying to build Mynewt applications with the
> Docker Container (using the Docker Quickstart Terminal).
> 
> I followed the instructions I found here:
> http://mynewt.apache.org/os/get_started/project_create/ and encountered a
> problem in the step when executing this command:
> 
> newt test @apache-mynewt-core/libs/os
> 
> The error messages are shown below.
> I have googled the problem and it seems this caused by the "go" command
> (ref: https://github.com/golang/go/issues/16566).
> However I have no clue, how this problem can be fixed.
> For instance, how do I access the GOPATH parameter from the Docker
> Quickstart Terminal?
> 
> Any suggestion?
> 
> BTW, I am running the Docker Container on a 64 bit Windows 10 platform.
> 
> Br,
> Lichun
> 
> $ ./newt test @repos/apache-mynewt-core/libs/os panic: runtime error:
> invalid memory address or nil pointer dereference [signal SIGSEGV:
> segmentation violation code=0x1 addr=0x0 pc=0x626295] goroutine 1
> [running]: panic(0x7f8480, 0xc420012080)
> /usr/local/go/src/runtime/panic.go:500 +0x1a1
> mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1a, 0x0) /go/src/
> mynewt.apache.org/newt/newt/repo/repo.go:289 +0x5
> mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc420322f60,
> 0xa4b180, 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffe9ebee01, 0xc420322f60) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:63 +0x169
> mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc420322f60, 0xa4b180,
> 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffffffffffff, 0x0) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:74 +0x57
> mynewt.apache.org/newt/newt/pkg.NewDependency(0xa4b180, 0x0,
> 0x7fffe9ebeef1, 0x1a, 0xa89980, 0x1a, 0x0) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:84 +0x8b
> mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc420052660,
> 0xa4b180, 0xc42006e3f0, 0x7fffe9ebeeea, 0x21, 0x0, 0x7f3e80, 0xc42000d6e0)
> /go/src/mynewt.apache.org/newt/newt/project/project.go:547 +0xfe
> mynewt.apache.org/newt/newt/cli.testRunCmd(0xc420208b40, 0xc4201c7a00, 0x1,
> 0x1) /go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:225 +0x119
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc420208b40,
> 0xc4201c79c0, 0x1, 0x1, 0xc420208b40, 0xc4201c79c0) /go/src/
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
> +0x443
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420074fc0,
> 0x4, 0x2c, 0x87a8a3) /go/src/
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
> +0x367
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420074fc0,
> 0x87a8a3, 0x4) /go/src/
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
> +0x2b main.main() /go/src/mynewt.apache.org/newt/newt/newt.go:146 +0x1b6


Re: Tutorial problem with the Docker Container

Posted by Fabio Utzig <ut...@utzig.org>.
On Thu, Jan 19, 2017, at 12:44 PM, Li-Chun Ko wrote:
> Hi all,
> 

> 2. Error message when executing $newt test all:
> 
> lcko@lcko-VirtualBox:~/dev/go/myproj$ cd repos
> lcko@lcko-VirtualBox:~/dev/go/myproj/repos$ $newt test all
> Testing package @apache-mynewt-core/boot/boot_serial/test
> Compiling boot_serial.c
> In file included from /usr/include/assert.h:35:0,
>                  from boot_serial.c:19:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/boot/bootutil/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/crypto/mbedtls/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/encoding/base64/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/encoding/json/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/fs/fcb/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/fs/nffs/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/kernel/os/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/net/ip/mn_socket/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/net/nimble/host/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/config/test-fcb
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/config/test-nffs
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/flash_map/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/log/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/util/cbmem/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Error: Test failure(s):
> Passed tests: []
> Failed tests: [boot/boot_serial/test boot/bootutil/test
> crypto/mbedtls/test
> encoding/base64/test encoding/json/test fs/fcb/test fs/nffs/test
> kernel/os/test net/ip/mn_socket/test net/nimble/host/test
> sys/config/test-fcb sys/config/test-nffs sys/flash_map/test sys/log/test
> util/cbmem/test]
> exit status 1

You're probably running the standard gcc for 64-bit machines. It doesn't
support 32-bit. You need to install multiboot gcc. What distro are you
using? (btw, try looking for a package named something like
multiboot-gcc).

Re: Tutorial problem with the Docker Container

Posted by Jacob Rosenthal <ja...@gmail.com>.
Whats the easy way to get 'develop' in the docker?

On Fri, Jan 20, 2017 at 9:34 AM, Christopher Collins <cc...@apache.org>
wrote:

> On Fri, Jan 20, 2017 at 11:55:59PM +0800, Li-Chun Ko wrote:
> > As an update, the Docker Container works well with the "./newt test all"
> > commend.
>
> Great to hear.  Thanks for following up!
>
> Chris
>

Re: Tutorial problem with the Docker Container

Posted by Christopher Collins <cc...@apache.org>.
On Fri, Jan 20, 2017 at 11:55:59PM +0800, Li-Chun Ko wrote:
> As an update, the Docker Container works well with the "./newt test all"
> commend.

Great to hear.  Thanks for following up!

Chris

Re: Tutorial problem with the Docker Container

Posted by Li-Chun Ko <li...@gmail.com>.
Hi folks,

As an update, the Docker Container works well with the "./newt test all"
commend.

Br,
Lichun

2017-01-20 9:40 GMT+08:00 Li-Chun Ko <li...@gmail.com>:

> Hi Chris,
>
> I switched to Linux by installing Ubuntu on the same virtual box and am
> not using the Docker Container any more. I could try it again today and get
> back to you later.
>
> Previously the problem I encountered seemed to be I was compiling a
> tutorial package that doesn't exist (as pointed out by aditi). I switched
> to Linux after that due to I thought that was a problem of the Docker
> Container.
>
> Br,
> Lichun
>
> 2017年1月20日 上午6:51,"Christopher Collins" <cc...@apache.org>寫道:
>
>> Hi Li-Chun,
>>
>> I'm glad you got it working, but now I'm confused.  The docker container
>> should already use the correct version of gcc (multilib).  Furthermore,
>> as I understand it, installing a different compiler on your machine
>> should not have any effect on the docker container.  Are you still using
>> the docker container?
>>
>> Thanks,
>> Chris
>>
>> On Thu, Jan 19, 2017 at 11:55:52PM +0800, Li-Chun Ko wrote:
>> > Hi Fabio,
>> >
>> > After I install gcc-multilib all problems solved!
>> > I guess it is worthwhile to add a note for this in the tutorial.
>> > Thank you very much.
>> >
>> > BTW, I am using Ubuntu 16.04.1 64 bit version.
>> >
>> > Br,
>> > Lichun
>> >
>> >
>> > 2017-01-19 22:44 GMT+08:00 Li-Chun Ko <li...@gmail.com>:
>> >
>> > > Hi all,
>> > >
>> > > I tried "$newt test @repos/apache-mynewt-core/kernel/os" in Linux
>> but it
>> > > still doesn't work.
>> > > I also attached the error message of executing "$newt test all" below.
>> > > It seems some files are missing.
>> > >
>> > > Br,
>> > > Lichun
>> > >
>> > > 1. Error message when executing $newt test @repos/apache-mynewt-core/
>> > > kernel/os:
>> > >
>> > > lcko@lcko-VirtualBox:~/dev/go/myproj$ $newt test
>> > > @repos/apache-mynewt-core/kernel/os
>> > > panic: runtime error: invalid memory address or nil pointer
>> dereference
>> > > [signal 0xb code=0x1 addr=0x0 pc=0x6879bf]
>> > >
>> > > goroutine 1 [running]:
>> > > panic(0x963920, 0xc82000e170)
>> > >     /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
>> > > mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1c, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/repo/repo
>> .go:290
>> > > +0x1f
>> > > mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName
>> (0xc82043cbe0,
>> > > 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/depen
>> dency.go:63
>> > > +0x147
>> > > mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc82043cbe0,
>> > > 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/depen
>> dency.go:74
>> > > +0x55
>> > > mynewt.apache.org/newt/newt/pkg.NewDependency(0x7fcd8a960200, 0x0,
>> > > 0x7ffdb79b70e3, 0x1c, 0xd0dc40, 0x0, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/depen
>> dency.go:84
>> > > +0x7f
>> > > mynewt.apache.org/newt/newt/project.(*Project).ResolvePackag
>> e(0xc820054540,
>> > > 0x7fcd8a960200, 0xc820070510, 0x7ffdb79b70dc, 0x23, 0x4, 0x0, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/project/
>> > > project.go:522 +0x448
>> > > mynewt.apache.org/newt/newt/cli.testRunCmd(0xc82042cd80,
>> 0xc820435210,
>> > > 0x1, 0x1)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/cli/
>> > > build_cmds.go:225 +0x140e
>> > > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
>> > > (*Command).execute(0xc82042cd80, 0xc8204351d0, 0x1, 0x1, 0x0, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
>> > > github.com/spf13/cobra/command.go:636 +0x8e9
>> > > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
>> > > (*Command).ExecuteC(0xc820075440, 0xc82042cd80, 0x0, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
>> > > github.com/spf13/cobra/command.go:722 +0x55c
>> > > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
>> > > (*Command).Execute(0xc820075440, 0x0, 0x0)
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
>> > > github.com/spf13/cobra/command.go:681 +0x2d
>> > > main.main()
>> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/newt.go:146
>> +0x2a2
>> > > exit status 2
>> > >
>> > >
>> > > 2. Error message when executing $newt test all:
>> > >
>> > > lcko@lcko-VirtualBox:~/dev/go/myproj$ cd repos
>> > > lcko@lcko-VirtualBox:~/dev/go/myproj/repos$ $newt test all
>> > > Testing package @apache-mynewt-core/boot/boot_serial/test
>> > > Compiling boot_serial.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from boot_serial.c:19:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/boot/bootutil/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/crypto/mbedtls/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/encoding/base64/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/encoding/json/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/fs/fcb/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/fs/nffs/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/kernel/os/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/net/ip/mn_socket/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/net/nimble/host/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/sys/config/test-fcb
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/sys/config/test-nffs
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/sys/flash_map/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/sys/log/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Testing package @apache-mynewt-core/util/cbmem/test
>> > > Compiling bootutil_misc.c
>> > > In file included from /usr/include/assert.h:35:0,
>> > >                  from bootutil_misc.c:20:
>> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
>> file or
>> > > directory
>> > > compilation terminated.
>> > > Error: Test failure(s):
>> > > Passed tests: []
>> > > Failed tests: [boot/boot_serial/test boot/bootutil/test
>> > > crypto/mbedtls/test encoding/base64/test encoding/json/test
>> fs/fcb/test
>> > > fs/nffs/test kernel/os/test net/ip/mn_socket/test net/nimble/host/test
>> > > sys/config/test-fcb sys/config/test-nffs sys/flash_map/test
>> sys/log/test
>> > > util/cbmem/test]
>> > > exit status 1
>> > >
>> > >
>> > >
>> > > 2017-01-19 20:33 GMT+08:00 Fabio Utzig <ut...@utzig.org>:
>> > >
>> > >> On Thu, Jan 19, 2017, at 06:55 AM, Li-Chun Ko wrote:
>> > >> >
>> > >> > In addition, I also found the conmend:
>> > >> >
>> > >> > newt test all
>> > >> >
>> > >> > did not work in Linux and resulted in compiling errors and somehow
>> I
>> > >> feel
>> > >> > there is some issues with the  newt install commend.
>> > >>
>> > >> Hi, could you copy the error here?
>> > >>
>> > >
>> > >
>>
>

Re: Tutorial problem with the Docker Container

Posted by Li-Chun Ko <li...@gmail.com>.
Hi Chris,

I switched to Linux by installing Ubuntu on the same virtual box and am not
using the Docker Container any more. I could try it again today and get
back to you later.

Previously the problem I encountered seemed to be I was compiling a
tutorial package that doesn't exist (as pointed out by aditi). I switched
to Linux after that due to I thought that was a problem of the Docker
Container.

Br,
Lichun

2017年1月20日 上午6:51,"Christopher Collins" <cc...@apache.org>寫道:

> Hi Li-Chun,
>
> I'm glad you got it working, but now I'm confused.  The docker container
> should already use the correct version of gcc (multilib).  Furthermore,
> as I understand it, installing a different compiler on your machine
> should not have any effect on the docker container.  Are you still using
> the docker container?
>
> Thanks,
> Chris
>
> On Thu, Jan 19, 2017 at 11:55:52PM +0800, Li-Chun Ko wrote:
> > Hi Fabio,
> >
> > After I install gcc-multilib all problems solved!
> > I guess it is worthwhile to add a note for this in the tutorial.
> > Thank you very much.
> >
> > BTW, I am using Ubuntu 16.04.1 64 bit version.
> >
> > Br,
> > Lichun
> >
> >
> > 2017-01-19 22:44 GMT+08:00 Li-Chun Ko <li...@gmail.com>:
> >
> > > Hi all,
> > >
> > > I tried "$newt test @repos/apache-mynewt-core/kernel/os" in Linux but
> it
> > > still doesn't work.
> > > I also attached the error message of executing "$newt test all" below.
> > > It seems some files are missing.
> > >
> > > Br,
> > > Lichun
> > >
> > > 1. Error message when executing $newt test @repos/apache-mynewt-core/
> > > kernel/os:
> > >
> > > lcko@lcko-VirtualBox:~/dev/go/myproj$ $newt test
> > > @repos/apache-mynewt-core/kernel/os
> > > panic: runtime error: invalid memory address or nil pointer dereference
> > > [signal 0xb code=0x1 addr=0x0 pc=0x6879bf]
> > >
> > > goroutine 1 [running]:
> > > panic(0x963920, 0xc82000e170)
> > >     /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
> > > mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1c, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/repo/repo.go:290
> > > +0x1f
> > > mynewt.apache.org/newt/newt/pkg.(*Dependency).
> setRepoAndName(0xc82043cbe0,
> > > 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/
> dependency.go:63
> > > +0x147
> > > mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc82043cbe0,
> > > 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/
> dependency.go:74
> > > +0x55
> > > mynewt.apache.org/newt/newt/pkg.NewDependency(0x7fcd8a960200, 0x0,
> > > 0x7ffdb79b70e3, 0x1c, 0xd0dc40, 0x0, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/
> dependency.go:84
> > > +0x7f
> > > mynewt.apache.org/newt/newt/project.(*Project).
> ResolvePackage(0xc820054540,
> > > 0x7fcd8a960200, 0xc820070510, 0x7ffdb79b70dc, 0x23, 0x4, 0x0, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/project/
> > > project.go:522 +0x448
> > > mynewt.apache.org/newt/newt/cli.testRunCmd(0xc82042cd80, 0xc820435210,
> > > 0x1, 0x1)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/cli/
> > > build_cmds.go:225 +0x140e
> > > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> > > (*Command).execute(0xc82042cd80, 0xc8204351d0, 0x1, 0x1, 0x0, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> > > github.com/spf13/cobra/command.go:636 +0x8e9
> > > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> > > (*Command).ExecuteC(0xc820075440, 0xc82042cd80, 0x0, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> > > github.com/spf13/cobra/command.go:722 +0x55c
> > > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> > > (*Command).Execute(0xc820075440, 0x0, 0x0)
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> > > github.com/spf13/cobra/command.go:681 +0x2d
> > > main.main()
> > >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/newt.go:146
> +0x2a2
> > > exit status 2
> > >
> > >
> > > 2. Error message when executing $newt test all:
> > >
> > > lcko@lcko-VirtualBox:~/dev/go/myproj$ cd repos
> > > lcko@lcko-VirtualBox:~/dev/go/myproj/repos$ $newt test all
> > > Testing package @apache-mynewt-core/boot/boot_serial/test
> > > Compiling boot_serial.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from boot_serial.c:19:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/boot/bootutil/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/crypto/mbedtls/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/encoding/base64/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/encoding/json/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/fs/fcb/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/fs/nffs/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/kernel/os/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/net/ip/mn_socket/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/net/nimble/host/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/sys/config/test-fcb
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/sys/config/test-nffs
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/sys/flash_map/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/sys/log/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Testing package @apache-mynewt-core/util/cbmem/test
> > > Compiling bootutil_misc.c
> > > In file included from /usr/include/assert.h:35:0,
> > >                  from bootutil_misc.c:20:
> > > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such
> file or
> > > directory
> > > compilation terminated.
> > > Error: Test failure(s):
> > > Passed tests: []
> > > Failed tests: [boot/boot_serial/test boot/bootutil/test
> > > crypto/mbedtls/test encoding/base64/test encoding/json/test fs/fcb/test
> > > fs/nffs/test kernel/os/test net/ip/mn_socket/test net/nimble/host/test
> > > sys/config/test-fcb sys/config/test-nffs sys/flash_map/test
> sys/log/test
> > > util/cbmem/test]
> > > exit status 1
> > >
> > >
> > >
> > > 2017-01-19 20:33 GMT+08:00 Fabio Utzig <ut...@utzig.org>:
> > >
> > >> On Thu, Jan 19, 2017, at 06:55 AM, Li-Chun Ko wrote:
> > >> >
> > >> > In addition, I also found the conmend:
> > >> >
> > >> > newt test all
> > >> >
> > >> > did not work in Linux and resulted in compiling errors and somehow I
> > >> feel
> > >> > there is some issues with the  newt install commend.
> > >>
> > >> Hi, could you copy the error here?
> > >>
> > >
> > >
>

Re: Tutorial problem with the Docker Container

Posted by Christopher Collins <cc...@apache.org>.
Hi Li-Chun,

I'm glad you got it working, but now I'm confused.  The docker container
should already use the correct version of gcc (multilib).  Furthermore,
as I understand it, installing a different compiler on your machine
should not have any effect on the docker container.  Are you still using
the docker container?

Thanks,
Chris

On Thu, Jan 19, 2017 at 11:55:52PM +0800, Li-Chun Ko wrote:
> Hi Fabio,
> 
> After I install gcc-multilib all problems solved!
> I guess it is worthwhile to add a note for this in the tutorial.
> Thank you very much.
> 
> BTW, I am using Ubuntu 16.04.1 64 bit version.
> 
> Br,
> Lichun
> 
> 
> 2017-01-19 22:44 GMT+08:00 Li-Chun Ko <li...@gmail.com>:
> 
> > Hi all,
> >
> > I tried "$newt test @repos/apache-mynewt-core/kernel/os" in Linux but it
> > still doesn't work.
> > I also attached the error message of executing "$newt test all" below.
> > It seems some files are missing.
> >
> > Br,
> > Lichun
> >
> > 1. Error message when executing $newt test @repos/apache-mynewt-core/
> > kernel/os:
> >
> > lcko@lcko-VirtualBox:~/dev/go/myproj$ $newt test
> > @repos/apache-mynewt-core/kernel/os
> > panic: runtime error: invalid memory address or nil pointer dereference
> > [signal 0xb code=0x1 addr=0x0 pc=0x6879bf]
> >
> > goroutine 1 [running]:
> > panic(0x963920, 0xc82000e170)
> >     /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
> > mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1c, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/repo/repo.go:290
> > +0x1f
> > mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc82043cbe0,
> > 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:63
> > +0x147
> > mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc82043cbe0,
> > 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:74
> > +0x55
> > mynewt.apache.org/newt/newt/pkg.NewDependency(0x7fcd8a960200, 0x0,
> > 0x7ffdb79b70e3, 0x1c, 0xd0dc40, 0x0, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:84
> > +0x7f
> > mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc820054540,
> > 0x7fcd8a960200, 0xc820070510, 0x7ffdb79b70dc, 0x23, 0x4, 0x0, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/project/
> > project.go:522 +0x448
> > mynewt.apache.org/newt/newt/cli.testRunCmd(0xc82042cd80, 0xc820435210,
> > 0x1, 0x1)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/cli/
> > build_cmds.go:225 +0x140e
> > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> > (*Command).execute(0xc82042cd80, 0xc8204351d0, 0x1, 0x1, 0x0, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> > github.com/spf13/cobra/command.go:636 +0x8e9
> > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> > (*Command).ExecuteC(0xc820075440, 0xc82042cd80, 0x0, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> > github.com/spf13/cobra/command.go:722 +0x55c
> > mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> > (*Command).Execute(0xc820075440, 0x0, 0x0)
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> > github.com/spf13/cobra/command.go:681 +0x2d
> > main.main()
> >     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/newt.go:146 +0x2a2
> > exit status 2
> >
> >
> > 2. Error message when executing $newt test all:
> >
> > lcko@lcko-VirtualBox:~/dev/go/myproj$ cd repos
> > lcko@lcko-VirtualBox:~/dev/go/myproj/repos$ $newt test all
> > Testing package @apache-mynewt-core/boot/boot_serial/test
> > Compiling boot_serial.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from boot_serial.c:19:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/boot/bootutil/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/crypto/mbedtls/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/encoding/base64/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/encoding/json/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/fs/fcb/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/fs/nffs/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/kernel/os/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/net/ip/mn_socket/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/net/nimble/host/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/sys/config/test-fcb
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/sys/config/test-nffs
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/sys/flash_map/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/sys/log/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Testing package @apache-mynewt-core/util/cbmem/test
> > Compiling bootutil_misc.c
> > In file included from /usr/include/assert.h:35:0,
> >                  from bootutil_misc.c:20:
> > /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> > directory
> > compilation terminated.
> > Error: Test failure(s):
> > Passed tests: []
> > Failed tests: [boot/boot_serial/test boot/bootutil/test
> > crypto/mbedtls/test encoding/base64/test encoding/json/test fs/fcb/test
> > fs/nffs/test kernel/os/test net/ip/mn_socket/test net/nimble/host/test
> > sys/config/test-fcb sys/config/test-nffs sys/flash_map/test sys/log/test
> > util/cbmem/test]
> > exit status 1
> >
> >
> >
> > 2017-01-19 20:33 GMT+08:00 Fabio Utzig <ut...@utzig.org>:
> >
> >> On Thu, Jan 19, 2017, at 06:55 AM, Li-Chun Ko wrote:
> >> >
> >> > In addition, I also found the conmend:
> >> >
> >> > newt test all
> >> >
> >> > did not work in Linux and resulted in compiling errors and somehow I
> >> feel
> >> > there is some issues with the  newt install commend.
> >>
> >> Hi, could you copy the error here?
> >>
> >
> >

Re: Tutorial problem with the Docker Container

Posted by Li-Chun Ko <li...@gmail.com>.
Hi Fabio,

After I install gcc-multilib all problems solved!
I guess it is worthwhile to add a note for this in the tutorial.
Thank you very much.

BTW, I am using Ubuntu 16.04.1 64 bit version.

Br,
Lichun


2017-01-19 22:44 GMT+08:00 Li-Chun Ko <li...@gmail.com>:

> Hi all,
>
> I tried "$newt test @repos/apache-mynewt-core/kernel/os" in Linux but it
> still doesn't work.
> I also attached the error message of executing "$newt test all" below.
> It seems some files are missing.
>
> Br,
> Lichun
>
> 1. Error message when executing $newt test @repos/apache-mynewt-core/
> kernel/os:
>
> lcko@lcko-VirtualBox:~/dev/go/myproj$ $newt test
> @repos/apache-mynewt-core/kernel/os
> panic: runtime error: invalid memory address or nil pointer dereference
> [signal 0xb code=0x1 addr=0x0 pc=0x6879bf]
>
> goroutine 1 [running]:
> panic(0x963920, 0xc82000e170)
>     /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
> mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1c, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/repo/repo.go:290
> +0x1f
> mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc82043cbe0,
> 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:63
> +0x147
> mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc82043cbe0,
> 0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:74
> +0x55
> mynewt.apache.org/newt/newt/pkg.NewDependency(0x7fcd8a960200, 0x0,
> 0x7ffdb79b70e3, 0x1c, 0xd0dc40, 0x0, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:84
> +0x7f
> mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc820054540,
> 0x7fcd8a960200, 0xc820070510, 0x7ffdb79b70dc, 0x23, 0x4, 0x0, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/project/
> project.go:522 +0x448
> mynewt.apache.org/newt/newt/cli.testRunCmd(0xc82042cd80, 0xc820435210,
> 0x1, 0x1)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/cli/
> build_cmds.go:225 +0x140e
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> (*Command).execute(0xc82042cd80, 0xc8204351d0, 0x1, 0x1, 0x0, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> github.com/spf13/cobra/command.go:636 +0x8e9
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> (*Command).ExecuteC(0xc820075440, 0xc82042cd80, 0x0, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> github.com/spf13/cobra/command.go:722 +0x55c
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> (*Command).Execute(0xc820075440, 0x0, 0x0)
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/vendor/
> github.com/spf13/cobra/command.go:681 +0x2d
> main.main()
>     /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/newt.go:146 +0x2a2
> exit status 2
>
>
> 2. Error message when executing $newt test all:
>
> lcko@lcko-VirtualBox:~/dev/go/myproj$ cd repos
> lcko@lcko-VirtualBox:~/dev/go/myproj/repos$ $newt test all
> Testing package @apache-mynewt-core/boot/boot_serial/test
> Compiling boot_serial.c
> In file included from /usr/include/assert.h:35:0,
>                  from boot_serial.c:19:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/boot/bootutil/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/crypto/mbedtls/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/encoding/base64/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/encoding/json/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/fs/fcb/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/fs/nffs/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/kernel/os/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/net/ip/mn_socket/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/net/nimble/host/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/config/test-fcb
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/config/test-nffs
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/flash_map/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/sys/log/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Testing package @apache-mynewt-core/util/cbmem/test
> Compiling bootutil_misc.c
> In file included from /usr/include/assert.h:35:0,
>                  from bootutil_misc.c:20:
> /usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
> directory
> compilation terminated.
> Error: Test failure(s):
> Passed tests: []
> Failed tests: [boot/boot_serial/test boot/bootutil/test
> crypto/mbedtls/test encoding/base64/test encoding/json/test fs/fcb/test
> fs/nffs/test kernel/os/test net/ip/mn_socket/test net/nimble/host/test
> sys/config/test-fcb sys/config/test-nffs sys/flash_map/test sys/log/test
> util/cbmem/test]
> exit status 1
>
>
>
> 2017-01-19 20:33 GMT+08:00 Fabio Utzig <ut...@utzig.org>:
>
>> On Thu, Jan 19, 2017, at 06:55 AM, Li-Chun Ko wrote:
>> >
>> > In addition, I also found the conmend:
>> >
>> > newt test all
>> >
>> > did not work in Linux and resulted in compiling errors and somehow I
>> feel
>> > there is some issues with the  newt install commend.
>>
>> Hi, could you copy the error here?
>>
>
>

Re: Tutorial problem with the Docker Container

Posted by Li-Chun Ko <li...@gmail.com>.
Hi all,

I tried "$newt test @repos/apache-mynewt-core/kernel/os" in Linux but it
still doesn't work.
I also attached the error message of executing "$newt test all" below.
It seems some files are missing.

Br,
Lichun

1. Error message when executing $newt test
@repos/apache-mynewt-core/kernel/os:

lcko@lcko-VirtualBox:~/dev/go/myproj$ $newt test
@repos/apache-mynewt-core/kernel/os
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x6879bf]

goroutine 1 [running]:
panic(0x963920, 0xc82000e170)
    /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1c, 0x0)
    /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/repo/repo.go:290 +0x1f
mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc82043cbe0,
0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
    /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:63
+0x147
mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc82043cbe0,
0x7fcd8a960200, 0x0, 0x7ffdb79b70e3, 0x1c, 0x0, 0x0)
    /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:74
+0x55
mynewt.apache.org/newt/newt/pkg.NewDependency(0x7fcd8a960200, 0x0,
0x7ffdb79b70e3, 0x1c, 0xd0dc40, 0x0, 0x0)
    /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:84
+0x7f
mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc820054540,
0x7fcd8a960200, 0xc820070510, 0x7ffdb79b70dc, 0x23, 0x4, 0x0, 0x0)
    /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/project/project.go:522
+0x448
mynewt.apache.org/newt/newt/cli.testRunCmd(0xc82042cd80, 0xc820435210, 0x1,
0x1)
    /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:225
+0x140e
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc82042cd80,
0xc8204351d0, 0x1, 0x1, 0x0, 0x0)
    /home/lcko/dev/go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
+0x8e9
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc820075440,
0xc82042cd80, 0x0, 0x0)
    /home/lcko/dev/go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
+0x55c
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc820075440,
0x0, 0x0)
    /home/lcko/dev/go/src/
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
+0x2d
main.main()
    /home/lcko/dev/go/src/mynewt.apache.org/newt/newt/newt.go:146 +0x2a2
exit status 2


2. Error message when executing $newt test all:

lcko@lcko-VirtualBox:~/dev/go/myproj$ cd repos
lcko@lcko-VirtualBox:~/dev/go/myproj/repos$ $newt test all
Testing package @apache-mynewt-core/boot/boot_serial/test
Compiling boot_serial.c
In file included from /usr/include/assert.h:35:0,
                 from boot_serial.c:19:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/boot/bootutil/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/crypto/mbedtls/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/encoding/base64/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/encoding/json/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/fs/fcb/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/fs/nffs/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/kernel/os/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/net/ip/mn_socket/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/net/nimble/host/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/sys/config/test-fcb
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/sys/config/test-nffs
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/sys/flash_map/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/sys/log/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Testing package @apache-mynewt-core/util/cbmem/test
Compiling bootutil_misc.c
In file included from /usr/include/assert.h:35:0,
                 from bootutil_misc.c:20:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or
directory
compilation terminated.
Error: Test failure(s):
Passed tests: []
Failed tests: [boot/boot_serial/test boot/bootutil/test crypto/mbedtls/test
encoding/base64/test encoding/json/test fs/fcb/test fs/nffs/test
kernel/os/test net/ip/mn_socket/test net/nimble/host/test
sys/config/test-fcb sys/config/test-nffs sys/flash_map/test sys/log/test
util/cbmem/test]
exit status 1



2017-01-19 20:33 GMT+08:00 Fabio Utzig <ut...@utzig.org>:

> On Thu, Jan 19, 2017, at 06:55 AM, Li-Chun Ko wrote:
> >
> > In addition, I also found the conmend:
> >
> > newt test all
> >
> > did not work in Linux and resulted in compiling errors and somehow I feel
> > there is some issues with the  newt install commend.
>
> Hi, could you copy the error here?
>

Re: Tutorial problem with the Docker Container

Posted by Fabio Utzig <ut...@utzig.org>.
On Thu, Jan 19, 2017, at 06:55 AM, Li-Chun Ko wrote:
> 
> In addition, I also found the conmend:
> 
> newt test all
> 
> did not work in Linux and resulted in compiling errors and somehow I feel
> there is some issues with the  newt install commend.

Hi, could you copy the error here?

Re: Tutorial problem with the Docker Container

Posted by Li-Chun Ko <li...@gmail.com>.
Hi folks,

Thanks a lot for your reply.
I also realized this is not only a problem to the docker container after I
switched my platform to Linux last night and the same thing happened.

In addition, I also found the conmend:

newt test all

did not work in Linux and resulted in compiling errors and somehow I feel
there is some issues with the  newt install commend.

I will try and see what happens if a valid path is appointed as suggested
by aditi and get back to you later.

Br,
Lichun

2017年1月18日 下午7:59,"Li-Chun Ko" <li...@gmail.com>寫道:

> Hi all,
>
> I am a noob here and I am trying to build Mynewt applications with the
> Docker Container (using the Docker Quickstart Terminal).
>
> I followed the instructions I found here: http://mynewt.apache.org/os/
> get_started/project_create/ and encountered a problem in the step when
> executing this command:
>
> newt test @apache-mynewt-core/libs/os
>
> The error messages are shown below.
> I have googled the problem and it seems this caused by the "go" command
> (ref: https://github.com/golang/go/issues/16566).
> However I have no clue, how this problem can be fixed.
> For instance, how do I access the GOPATH parameter from the Docker
> Quickstart Terminal?
>
> Any suggestion?
>
> BTW, I am running the Docker Container on a 64 bit Windows 10 platform.
>
> Br,
> Lichun
>
> $ ./newt test @repos/apache-mynewt-core/libs/os panic: runtime error:
> invalid memory address or nil pointer dereference [signal SIGSEGV:
> segmentation violation code=0x1 addr=0x0 pc=0x626295] goroutine 1
> [running]: panic(0x7f8480, 0xc420012080) /usr/local/go/src/runtime/panic.go:500
> +0x1a1 mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1a, 0x0)
> /go/src/mynewt.apache.org/newt/newt/repo/repo.go:289 +0x5
> mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc420322f60,
> 0xa4b180, 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffe9ebee01, 0xc420322f60) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:63 +0x169
> mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc420322f60,
> 0xa4b180, 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffffffffffff, 0x0) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:74 +0x57
> mynewt.apache.org/newt/newt/pkg.NewDependency(0xa4b180, 0x0,
> 0x7fffe9ebeef1, 0x1a, 0xa89980, 0x1a, 0x0) /go/src/mynewt.apache.org/
> newt/newt/pkg/dependency.go:84 +0x8b mynewt.apache.org/newt/newt/
> project.(*Project).ResolvePackage(0xc420052660, 0xa4b180, 0xc42006e3f0,
> 0x7fffe9ebeeea, 0x21, 0x0, 0x7f3e80, 0xc42000d6e0) /go/src/
> mynewt.apache.org/newt/newt/project/project.go:547 +0xfe
> mynewt.apache.org/newt/newt/cli.testRunCmd(0xc420208b40, 0xc4201c7a00,
> 0x1, 0x1) /go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:225
> +0x119 mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.
> (*Command).execute(0xc420208b40, 0xc4201c79c0, 0x1, 0x1, 0xc420208b40,
> 0xc4201c79c0) /go/src/mynewt.apache.org/newt/newt/vendor/github.com/
> spf13/cobra/command.go:636 +0x443 mynewt.apache.org/newt/newt/
> vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420074fc0, 0x4,
> 0x2c, 0x87a8a3) /go/src/mynewt.apache.org/newt/newt/vendor/github.com/
> spf13/cobra/command.go:722 +0x367 mynewt.apache.org/newt/newt/
> vendor/github.com/spf13/cobra.(*Command).Execute(0xc420074fc0, 0x87a8a3,
> 0x4) /go/src/mynewt.apache.org/newt/newt/vendor/github.com/
> spf13/cobra/command.go:681 +0x2b main.main() /go/src/mynewt.apache.org/
> newt/newt/newt.go:146 +0x1b6
>
>
>

Re: Tutorial problem with the Docker Container

Posted by "David G. Simmons" <sa...@mac.com>.
This appears not to be a docker-specific problem.

I am running natively on MacOS Sierra and see the same problem. It seems to be a Go problem

newt test @repos/apache-mynewt-core/libs/os
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x22f845]

goroutine 1 [running]:
panic(0x406880, 0xc4200120a0)
	/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:500 +0x1a1
mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1a, 0x0)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/repo/repo.go:321 +0x5
mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc4204069e0, 0x664300, 0x0, 0x7fff5fbffb49, 0x1a, 0x7fff5fbffb01, 0xc4204069e0)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:63 +0x169
mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc4204069e0, 0x664300, 0x0, 0x7fff5fbffb49, 0x1a, 0x0, 0x0)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:74 +0x57
mynewt.apache.org/newt/newt/pkg.NewDependency(0x664300, 0x0, 0x7fff5fbffb49, 0x1a, 0x6a23a0, 0x1a, 0x0)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/pkg/dependency.go:84 +0x8b
mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc420070f00, 0x664300, 0xc4200a8f30, 0x7fff5fbffb42, 0x21, 0x4, 0xc420075f20, 0x4)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/project/project.go:531 +0xfe
mynewt.apache.org/newt/newt/cli.testRunCmd(0xc4200adb00, 0xc420075f10, 0x1, 0x1)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:228 +0xfe
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200adb00, 0xc420075ed0, 0x1, 0x1, 0xc4200adb00, 0xc420075ed0)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636 +0x443
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4200ad200, 0x4, 0x2c, 0x48ac8a)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722 +0x367
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200ad200, 0x48ac8a, 0x4)
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681 +0x2b
main.main()
	/Users/dsimmons/dev/go/src/mynewt.apache.org/newt/newt/newt.go:152 +0x1b6

dg

> On Jan 18, 2017, at 6:59 AM, Li-Chun Ko <li...@gmail.com> wrote:
> 
> Hi all,
> 
> I am a noob here and I am trying to build Mynewt applications with the
> Docker Container (using the Docker Quickstart Terminal).
> 
> I followed the instructions I found here:
> http://mynewt.apache.org/os/get_started/project_create/ and encountered a
> problem in the step when executing this command:
> 
> newt test @apache-mynewt-core/libs/os
> 
> The error messages are shown below.
> I have googled the problem and it seems this caused by the "go" command
> (ref: https://github.com/golang/go/issues/16566).
> However I have no clue, how this problem can be fixed.
> For instance, how do I access the GOPATH parameter from the Docker
> Quickstart Terminal?
> 
> Any suggestion?
> 
> BTW, I am running the Docker Container on a 64 bit Windows 10 platform.
> 
> Br,
> Lichun
> 
> $ ./newt test @repos/apache-mynewt-core/libs/os panic: runtime error:
> invalid memory address or nil pointer dereference [signal SIGSEGV:
> segmentation violation code=0x1 addr=0x0 pc=0x626295] goroutine 1
> [running]: panic(0x7f8480, 0xc420012080)
> /usr/local/go/src/runtime/panic.go:500 +0x1a1
> mynewt.apache.org/newt/newt/repo.(*Repo).Name(0x0, 0x1a, 0x0) /go/src/
> mynewt.apache.org/newt/newt/repo/repo.go:289 +0x5
> mynewt.apache.org/newt/newt/pkg.(*Dependency).setRepoAndName(0xc420322f60,
> 0xa4b180, 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffe9ebee01, 0xc420322f60) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:63 +0x169
> mynewt.apache.org/newt/newt/pkg.(*Dependency).Init(0xc420322f60, 0xa4b180,
> 0x0, 0x7fffe9ebeef1, 0x1a, 0x7fffffffffffff, 0x0) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:74 +0x57
> mynewt.apache.org/newt/newt/pkg.NewDependency(0xa4b180, 0x0,
> 0x7fffe9ebeef1, 0x1a, 0xa89980, 0x1a, 0x0) /go/src/
> mynewt.apache.org/newt/newt/pkg/dependency.go:84 +0x8b
> mynewt.apache.org/newt/newt/project.(*Project).ResolvePackage(0xc420052660,
> 0xa4b180, 0xc42006e3f0, 0x7fffe9ebeeea, 0x21, 0x0, 0x7f3e80, 0xc42000d6e0)
> /go/src/mynewt.apache.org/newt/newt/project/project.go:547 +0xfe
> mynewt.apache.org/newt/newt/cli.testRunCmd(0xc420208b40, 0xc4201c7a00, 0x1,
> 0x1) /go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:225 +0x119
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc420208b40,
> 0xc4201c79c0, 0x1, 0x1, 0xc420208b40, 0xc4201c79c0) /go/src/
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
> +0x443
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420074fc0,
> 0x4, 0x2c, 0x87a8a3) /go/src/
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
> +0x367
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420074fc0,
> 0x87a8a3, 0x4) /go/src/
> mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
> +0x2b main.main() /go/src/mynewt.apache.org/newt/newt/newt.go:146 +0x1b6

--
David G. Simmons
(919) 534-5099
Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
/** Message digitally signed for security and authenticity.
* If you cannot read the PGP.sig attachment, please go to
 * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
 * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
**/
♺ This email uses 100% recycled electrons. Don't blow it by printing!

There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.