| Summary: | binary reproducibility: ncurses-staticdev_6.0+20161126-r0_amd64.deb | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Juro Bystricky <juro.bystricky> | ||||||||
| Component: | core | Assignee: | Ross Burton <ross.burton> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | Medium+ | CC: | meta.mr.watcher, meta.watcher | ||||||||
| Version: | 2.3 | ||||||||||
| Target Milestone: | 2.4 M1 | ||||||||||
| Hardware: | x86 | ||||||||||
| OS: | Multiple | ||||||||||
| Whiteboard: | |||||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||||
| Verified: | Documentation change: | Don't know | |||||||||
| Attachments: |
|
||||||||||
Our ar is built with deterministic archives. I wonder if its using the host ar? Can you re-run with something like MACHINE=qemuarm? I will re-run with MACHINE=qemuarm. Another explanation would be the ncurses Makefile uses AR with -u flag Grepping log.do_compile shows:
x86_64-poky-linux-ar -curvU
U Do not operate in deterministic mode. This is the inverse of the D modifier, above: added files and the archive index
will get their actual UID, GID, timestamp, and file mode values.
This is the default unless binutils was configured with --enable-deterministic-archives.
Yet another reason to put ncurses on my list of Software I Hate.
aclocal.m4 says this:
AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[
cf_cv_ar_flags=unknown
for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
Can you verify that removing the -curvU entry solves the problem?
Will verify, no problem. Created attachment 3682 [details]
diffoscope output after "configure" patched
Created attachment 3683 [details]
Patch that replaces the ncurses AR command line options.
So patching aclocal.m4 did not help. I had to patch "configure" instead. After building ncurses with the patched recipe (two separate builds), the difference between the .deb packages was reduced as expected (see attached ncurses-config.html). The remaining difference should be addressed in a separate patch, similarily the way debian does it: examine the modification time of all files in the package build directory. If the file is newer than the date of the latest debian/changelog entry, we assume the file is a result of a build, and its modification time will be set to the date of the latest debian/changelog entry. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759886 (I also attached to ncurses recipe patch) The ar change is merged in OE-Core 46c757d0ca7ff294a7e55c130698fd256b69b62e. Merged in oe-core 46c757d0ca7ff294a7e55c130698fd256b69b62e. |
Created attachment 3674 [details] diffoscope output (HTML format) Two independent builds don't binary compare (diffoscope log attached). ncurses-staticdev_6.0+20161126-r0_amd64.deb It seems the various .a libraries were linked wih AR not configured with "--enable-deterministic-archives" One possible fix could be to pass correct flags to AR such as Dcvr, or post-process the archives: objcopy --enable-deterministic-archives libfoo.a Other fixes may be possible.