mynewt-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Collins (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MYNEWT-860) Newt - Empty `pkg.yml` file causes target to be built as split image
Date Thu, 26 Oct 2017 23:01:00 GMT
Christopher Collins created MYNEWT-860:
------------------------------------------

             Summary: Newt - Empty `pkg.yml` file causes target to be built as split image
                 Key: MYNEWT-860
                 URL: https://issues.apache.org/jira/browse/MYNEWT-860
             Project: Mynewt
          Issue Type: Bug
      Security Level: Public (Viewable by anyone)
          Components: Newt
            Reporter: Christopher Collins
            Assignee: Christopher Collins


1. Create a directory in your project:
{noformat}
mkdir blah
{noformat}

2. Create an empty {pkg.yml} file in the directory:
{noformat}
touch blah/pkg.yml
{noformat}

3. Build a non-split-image target.

Newt will compile everything twice, as if it were building a split image.  Then it will fail
in an unpredictable way, e.g.:

{noformat}
Error: In file included from apps/krang/src/main.c:23:0:
repos/apache-mynewt-core/sys/sysinit/include/sysinit/sysinit.h:28:25: fatal error: split/split.h:
No such file or directory
 #include "split/split.h"
{noformat}

{noformat}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12a71d4]

goroutine 1 [running]:
mynewt.apache.org/newt/newt/pkg.(*LocalPackage).Name(...)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/builder/paths.go:179
mynewt.apache.org/newt/newt/builder.(*Builder).TestExePath(0xc4205307e0, 0x0, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/builder/paths.go:179 +0x34
mynewt.apache.org/newt/newt/builder.(*Builder).CompileCmdsPath(0xc4205307e0, 0xc420308920,
0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/builder/paths.go:198 +0xad
mynewt.apache.org/newt/newt/builder.(*Builder).Build(0xc4205307e0, 0x0, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/builder/build.go:601 +0xa20
mynewt.apache.org/newt/newt/builder.(*TargetBuilder).buildLoader(0xc420518120, 0x0, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:319 +0xc6
mynewt.apache.org/newt/newt/builder.(*TargetBuilder).Build(0xc420518120, 0xc420518120, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:372 +0x16d
mynewt.apache.org/newt/newt/cli.buildRunCmd(0xc420090b40, 0xc420048d50, 0x1, 0x1, 0x0)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:160 +0x2c9
mynewt.apache.org/newt/newt/cli.AddBuildCommands.func1(0xc420090b40, 0xc420048d50, 0x1, 0x1)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:404 +0x5f
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xc420090b40,
0xc420048d10, 0x1, 0x1, 0xc420090b40, 0xc420048d10)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:636
+0x234
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4200906c0,
0x5, 0x25, 0x1399e93)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:722
+0x2fe
mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4200906c0,
0x1399e93, 0x5)
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/vendor/github.com/spf13/cobra/command.go:681
+0x2b
main.main()
        /Users/ccollins/go/src/mynewt.apache.org/newt/newt/newt.go:170 +0x1ac
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message