User: Password:
|
|
Subscribe / Log in / New account

KS2011: Afternoon topics

KS2011: Afternoon topics

Posted Oct 27, 2011 0:06 UTC (Thu) by mhelsley (guest, #11324)
In reply to: KS2011: Afternoon topics by pj
Parent article: KS2011: Afternoon topics

Discovering dependencies with strace is not reliable. You would also need to check code coverage of the strace'd run to know if you have anything resembling a reliable set of dependencies. Even if you have 100% code coverage (and few *small* programs can claim that) obscure data-dependent or time-dependent code paths may still be hidden.

The alternative is probably something vaguely like static analysis of the code. Static analysis is notoriously complicated and often produces a flood of false-positives though.

So my guess is we'll still have humans involved in dependency generation and maintenance for quite some time -- even with use of tools like strace :).


(Log in to post comments)

KS2011: Afternoon topics

Posted Oct 27, 2011 2:28 UTC (Thu) by nlhepler (subscriber, #54047) [Link]

Fabricate uses strace to find all uses of open() during the build (gcc or whichever compilation tool) to build a dependency tree for each the sources specified, for each target built, so that later re-builds only re-compile the files modified since the last build. This way, you don't need to specify the dependency structure yourself.

As for standardizing on a build system, I have mixed feelings about using automake. It's a PITA, even the presenters admit this. All the problems with regenerating the configure, autoconf-ing, incompatibilities between versions, etc make it an absolute pain to use. Extending something like waf or fabricate to perform all the tests that are needed (is libA around? what about libB?, etc), and to build a monolithic C function to grab platform-specific information seems like a much less painful approach. Also, fabricate is a single python file that can easily be included with your package -- not the best approach, but it could give something like a make.py a fallback if it's not available system-wide.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds