Hi, On Thu, Sep 15, 2016 at 03:09:34PM +0800, 王华源 wrote: > Hi, > > When I build slinky native example as document, the builder throws error > > Building target targets/sim_slinky > > Compiling x509_crl.c > > Error: x509_crl.c: In function 'mbedtls_x509_crl_parse': > > x509_crl.c:508:5: error: this 'else' clause does not guard... > [-Werror=misleading-indentation] [...]
You must be using gcc 6. Most of the Mynewt developers still use gcc 5 for sim builds, so we haven't fixed the issues reported by the new compiler. There are a few ways to work around this until the issues get fixes: 1. Downgrade to gcc 5 This may be easy or difficult, depending on your system and package manager. 2. Modify the mynewt sim compiler definition so that it doesn't report the problematic warnings. I don't have gcc 6 handy at the moment, so I don't know if there are additional warnings that need to be disabled. This one can be disabled by making the following change to repos/apache-mynewt-core/compiler/sim/compiler.yml: compiler.flags.base: > - -m32 -Wall -Werror -ggdb + -m32 -Wall -Werror -ggdb -Wno-misleading-indentation (i.e., add "-Wno-misleading-indentation" to compiler.flags.base). Sorry for the hassle! Let us know how it goes. Thanks, Chris