Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 881605

Summary: dev-util/trace-cmd-3.1.4 fails to compile: hangs
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Patrick McLean <chutzpah>
Status: RESOLVED FIXED    
Severity: normal CC: dlan, mail, proteuss
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/28717
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 879081    
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2022-11-17 06:57:06 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/trace-cmd-3.1.4 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2022-11-17 06:57:09 UTC
Created attachment 833131 [details]
build.log

build log and emerge --info
Comment 2 Maciej S. Szmigiero 2022-11-19 23:42:06 UTC
Likely either make, bash or pkg-config version dependent.

Manually hardcoding the proper values to LIBTRACEEVENT_{C,LD}FLAGS and LIBTRACEFS_{C,LD}FLAGS variables in the package Makefile makes it build successfully.
Comment 3 Malcolm Lashley 2022-12-03 13:40:25 UTC
Observed the same here - make-4.4 gets in an infinite loop somehow, downgrading to make-4.3 fixes it - this should probably block #879081
Comment 4 Toralf Förster gentoo-dev 2022-12-10 10:59:31 UTC
maybe dup of bug 690150
Comment 5 Toralf Förster gentoo-dev 2022-12-10 11:45:16 UTC
(In reply to Toralf Förster from comment #4)
> maybe dup of bug 690150

nope, hangs with -j1 too
Comment 6 Yixun Lan archtester gentoo-dev 2022-12-19 09:46:24 UTC
(In reply to Malcolm Lashley from comment #3)
> Observed the same here - make-4.4 gets in an infinite loop somehow,
> downgrading to make-4.3 fixes it - this should probably block #879081

confirm here, downgrade to make-4.3 will fix the problem, while "-j1" doesn't help ..

let's add this bug to make-4.4 tracker
Comment 7 jinqiang zhang 2022-12-19 23:55:11 UTC
make-4.4 changed the behavior of shell export variable, recursively variables will set as empty string, and no failure.

  * [SV 10593] Export variables to $(shell ...) commands: https://git.savannah.gnu.org/cgit/make.git/commit/?id=98da874c
  * [SV 63016] Don't fail exporting to $(shell ...): https://git.savannah.gnu.org/cgit/make.git/commit/?id=7d484017
Comment 8 Maciej S. Szmigiero 2022-12-20 00:14:35 UTC
> See Also: https://github.com/gentoo/gentoo/pull/28717

Was the fix submitted upstream too?

We don't want to have to carry a downstream fix for this issue forever.
Comment 9 jinqiang zhang 2022-12-20 00:20:52 UTC
I will send this patch to upstream later.
Comment 10 Yixun Lan archtester gentoo-dev 2022-12-20 01:17:43 UTC
(In reply to Maciej S. Szmigiero from comment #8)
> > See Also: https://github.com/gentoo/gentoo/pull/28717
> 
> Was the fix submitted upstream too?
> 
> We don't want to have to carry a downstream fix for this issue forever.

using immediate expansion sounds a good solution, it actually fix the problem, so I will just go ahead and push this fix

(In reply to jinqiang zhang from comment #9)
> I will send this patch to upstream later.

yes, please, it's always a good idea to send patch to upstream, not only will other distro benefit, but also we will carry less at downstream (hopefully the patch can be dropped at next version bump)
Comment 11 Larry the Git Cow gentoo-dev 2022-12-20 01:56:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b6cc72975fcc8805ee33d1394a92545b9c901d9

commit 9b6cc72975fcc8805ee33d1394a92545b9c901d9
Author:     jinqiang zhang <peeweep@0x0.ee>
AuthorDate: 2022-12-20 00:06:26 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2022-12-20 01:54:30 +0000

    dev-util/trace-cmd: fix compile hangs under make-4.4
    
    expand variables immediately while invoking $(shell ) function
    
    Releated:
      * [SV 10593] Export variables to $(shell ...) commands
        https://git.savannah.gnu.org/cgit/make.git/commit/?id=98da874c
      * [SV 63016] Don't fail exporting to $(shell ...)
        https://git.savannah.gnu.org/cgit/make.git/commit/?id=7d484017
    
    Closes: https://bugs.gentoo.org/881605
    Closes: https://github.com/gentoo/gentoo/pull/28717
    Signed-off-by: jinqiang zhang <peeweep@0x0.ee>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 .../files/trace-cmd-3.1.4-hang-make-4.4.patch      | 65 ++++++++++++++++++++++
 dev-util/trace-cmd/trace-cmd-3.1.4.ebuild          |  4 ++
 2 files changed, 69 insertions(+)
Comment 12 jinqiang zhang 2022-12-27 07:33:09 UTC
I was about to make an upstream today and saw that someone posted a similar patch a few hours ago. For those who care about this issue, you can follow it on the mailing list.
https://lore.kernel.org/linux-trace-devel/20221226164951.2632069-1-michal.sojka@cvut.cz/T/#u