Bug 9966

Summary: util-linux-2.30/.stamp_built' failed
Product: buildroot Reporter: Refik Tuzakli <tuzakli.refik>
Component: OtherAssignee: Carlos Santos <casantos>
Status: RESOLVED WORKSFORME    
Severity: normal CC: buildroot, mirq-boogs
Priority: P5    
Version: 2018.11.3   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: Target:
Build:
Attachments: patch for util-linux configure.ac

Description Refik Tuzakli 2017-06-19 11:11:57 UTC
/home/osboxes/Desktop/boards/arm/karo/tx6u_8033/fs/buildroot/output/host/usr/lib/libncurses.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:5997: recipe for target 'dmesg' failed
make[3]: *** [dmesg] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/osboxes/Desktop/boards/arm/karo/tx6u_8033/fs/buildroot/output/build/util-linux-2.30'
Makefile:11718: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/osboxes/Desktop/boards/arm/karo/tx6u_8033/fs/buildroot/output/build/util-linux-2.30'
Makefile:4913: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/osboxes/Desktop/boards/arm/karo/tx6u_8033/fs/buildroot/output/build/util-linux-2.30'
package/pkg-generic.mk:227: recipe for target '/home/osboxes/Desktop/boards/arm/karo/tx6u_8033/fs/buildroot/output/build/util-linux-2.30/.stamp_built' failed
make: *** [/home/osboxes/Desktop/boards/arm/karo/tx6u_8033/fs/buildroot/output/build/util-linux-2.30/.stamp_built] Error 2


armv7 a9
Comment 1 Carlos Santos 2017-06-26 11:07:37 UTC
Please check if the problem persists on a recent master snapshot (as of commit 74235a6854d6e469f2dbc141fe08ce9ae94e7d3c).

Please provide a copy of your defconfig. Run

    $ make savedefconfig BR2_DEFCONFIG=/tmp/bug_9966_defconfig

Then attach /tmp/bug_9966_defconfig to this bug report.
Comment 2 Refik Tuzakli 2017-06-28 06:25:55 UTC
After I run make clean, I run make again then it works.
Comment 3 Carlos Santos 2017-06-28 11:03:02 UTC
Looks like the reporter attempted to perform a dirty build in an output directory containing traces of a previous build, for a different architecture.

Closing as RESOLVED/WORKSFORME, since the reporter did not provide enough information to reproduce the failure and was able to circumvent the problem by means of a clean build.
Comment 4 Michał Mirosław 2019-02-25 00:58:10 UTC
I just stumbled on this problem on 2018.11.3 after adding a patch that modifies configure.ac.

'make clean' does not help in this case.

It seems that this modification triggers regererating of aclocal.m4 (it has some parts replaced with an older version) and all the paths to tools and libraries in resulting Makefiles get mixed up.
Comment 5 Michał Mirosław 2019-02-25 01:02:19 UTC
Created attachment 7961 [details]
patch for util-linux configure.ac

For reproduction: put attached patch in package/util-linux/
Comment 6 Carlos Santos 2019-02-25 11:44:03 UTC
(In reply to Michał Mirosław from comment #5)

Sorry, this is not a bug in Buildroot. You add a patch that knowingly breaks the build and then complain that the build gets broken.

Also, please do not reopen an old bug just because you saw a similar behavior in a new situation. A bug must be reopened if it's resolution was not correct. New problems must be reported as new bugs.
Comment 7 Michał Mirosław 2019-02-25 13:49:50 UTC
(In reply to Carlos Santos from comment #6)

I don't want to point fingers. Adding 'UTIL_LINUX_AUTORECONF = YES' line to 
package/util-linux/util-linux.mk fixes the problem.

I guess it has something to do with buildroot's makefile replacing 
config/ltmain.sh in the package but not in autotools it provides. The file 
get's replaced with unpatched version when ./configure runs autoreconf to 
update itself.
Comment 8 Carlos Santos 2019-02-25 16:51:14 UTC
(In reply to Michał Mirosław from comment #7)

Let me clarify my point: I'm not against adding a patch to disable rtcwake, even though I believe this should be submitted upstream first. My point is that such change would be an improvement, not a bug fix, so the right way to do it is by means of a patch on Buildroot that adds the required patch for util-linux and also turns AUTORECONF to YES.

Also, this discussion should happen on the buildroot mailing list, not on a bug report, so I stop here.