You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Christopher Collins <cc...@apache.org> on 2016/12/14 00:09:55 UTC

Run "newt clean all" after upgrading newt

Hello all,

The short version is: run "newt clean all" after pulling newt from
develop.

Recently, newt changed the way it names .a files.  Originally, each .a
file was named after the "leaf" directory of its package.  Now, the full
path is included in the name.  For example, for the sys/console/full
package:

    old: full.a
    new: sys_console_full.a

The new naming scheme is more descriptive, and it improves the output of
the "newt size" command.

(commit=e7f31c7e0a9bff4f1e88a6df7f8ca3edd3e81b90)

The problem is that, during linking, newt indiscriminately collects all
.a files in the target's binary directory and links them together.  If
you upgrade newt and build a project, the old .a files won't get
overwritten by the new ones.  I don't know how gcc determines which .a
file to pull a symbol from when there is a conflict, and frankly, I
don't want to know :).  Anyway, definitely be sure to clean your project
after upgrading, or you risk losing your mind trying to debug your code.

I am not sure if there is a reason why newt links all the .a files it
finds.  If there isn't, then we should probably change newt so that it
only pulls in the .a files that it is supposed to.

Thanks,
Chris