Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 690150 - dev-util/trace-cmd-2.8 Parallel building fails
Summary: dev-util/trace-cmd-2.8 Parallel building fails
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2019-07-18 14:25 UTC by Phil
Modified: 2023-01-04 04:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/var/tmp/portage/dev-util/trace-cmd-2.8/temp/build.log (build.log,53.29 KB, text/x-log)
2019-07-18 14:27 UTC, Phil
Details
trace-cmd-2.8.2-r1-split-build.patch (trace-cmd-2.8.2-r1-split-build.patch,442 bytes, patch)
2019-07-24 20:14 UTC, Patrick McLean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phil 2019-07-18 14:25:04 UTC
Hi,

Emerging dev-util/trace-cmd-2.8 on a dual-core system with HT fails. MAKEOPTS set to '-j5', used gcc is 9.1.0-r1. Compilation aborts with file truncated messages, obviously an object file is used for linking while another instance writes to it:

/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/dev-util/trace-cmd-2.8/work/trace-cmd-v2.8/lib/traceevent/parse-filter.o: file not recognized: file truncated
collect2: error: ld returned 1 exit status

Downgrading to dev-util/trace-cmd-2.7-r2 succeeds without changes to the configuration. Emerging version 2.8 is possible after changing MAKEOPTS to '-j1'.

Cheers, Phil
Comment 1 Phil 2019-07-18 14:27:20 UTC
Created attachment 583392 [details]
/var/tmp/portage/dev-util/trace-cmd-2.8/temp/build.log
Comment 2 Patrick McLean gentoo-dev 2019-07-24 20:14:14 UTC
Created attachment 584462 [details, diff]
trace-cmd-2.8.2-r1-split-build.patch

I am having trouble reproducing this on my workstation. Does this patch help?
Comment 3 Phil 2019-07-25 08:32:35 UTC
Hi Patrick,

(In reply to Patrick McLean from comment #2)
> Created attachment 584462 [details, diff] [details, diff]
> trace-cmd-2.8.2-r1-split-build.patch
> 
> I am having trouble reproducing this on my workstation. Does this patch help?

Sadly not, I'm still getting the "file truncated" error.

Here's a minimal reproducer:

CFLAGS="-pipe" make -j5 NO_UDIS86=1 VERBOSE=1 trace-cmd libs

Seems the combination of -pipe and specifying the inter-dependent targets 'trace-cmd' and 'libs' when calling make does the trick.

I'm not sure whether requesting to build trace-cmd and libs in parallel is a good idea: trace-cmd requires LIBTRACECMD_STATIC which causes make sub-process call in lib/trace-cmd to build libtracecmd.a. OTOH, libs requires LIBTRACECMD_SHARED which causes a similar make sub-process to build libtracecmd.so.

Meanwhile I'll remove -pipe from my CFLAGS - my /var/tmp/portage is a tmpfs with 17GB max size, so despite its questionable relevance in modern systems I'll probably not see any of the expected downsides when omitting it.

Cheers, Phil
Comment 4 Toralf Förster gentoo-dev 2022-12-10 11:44:55 UTC
compile hangs for -j1 too
Comment 5 Phil 2022-12-12 15:52:39 UTC
Toralf, wrong bug? This is not about a hang, but parallel build failure.
Comment 6 Yixun Lan archtester gentoo-dev 2023-01-04 04:30:11 UTC
I can't reproduce this problem at 3.1.5, so will close as obsolete.

please try again, and re-open if you still have problem.