Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 829325 - dev-util/trace-cmd-2.9.1 - tracefs-events.c: error: PATH_MAX undeclared (first use in this function)
Summary: dev-util/trace-cmd-2.9.1 - tracefs-events.c: error: PATH_MAX undeclared (firs...
Status: RESOLVED DUPLICATE of bug 782565
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard: Needs limits.h
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2021-12-16 10:46 UTC by Toralf Förster
Modified: 2022-06-27 23:03 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.63 KB, text/plain)
2021-12-16 10:46 UTC, Toralf Förster
Details
dev-util:trace-cmd-2.9.1:20211216-060957.log (dev-util:trace-cmd-2.9.1:20211216-060957.log,52.19 KB, text/plain)
2021-12-16 10:47 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,111.41 KB, text/plain)
2021-12-16 10:47 UTC, Toralf Förster
Details
environment (environment,117.66 KB, text/plain)
2021-12-16 10:47 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,27.18 KB, application/x-bzip)
2021-12-16 10:47 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,27.37 KB, application/x-bzip)
2021-12-16 10:47 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2021-12-16 10:46:58 UTC
too long lines were shrinked:

x86_64-gentoo-linux-musl-gcc -M -MT /var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-2.9.1_build/lib/traceevent/event-parse-api.o  -pipe -march=native -fno-diagnostics-color -O2 -DVSOCK -D_GNU_SOURCE -I/var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-v2.9.1/include -I/var/tmp/portage
x86_64-gentoo-linux-musl-gcc -M -MT /var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-2.9.1_build/lib/traceevent/tep_strerror.o  -pipe -march=native -fno-diagnostics-color -O2 -DVSOCK -D_GNU_SOURCE -I/var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-v2.9.1/include -I/var/tmp/portage/de
x86_64-gentoo-linux-musl-gcc -M -MT /var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-2.9.1_build/lib/trace-cmd/trace-timesync.o  -pipe -march=native -fno-diagnostics-color -O2 -DVSOCK -D_GNU_SOURCE -I/var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-v2.9.1/include -I/var/tmp/portage/d
tracefs-events.c: In function 'tracefs_iterate_raw_events':
tracefs-events.c:135:19: error: 'PATH_MAX' undeclared (first use in this function)
  135 |         char file[PATH_MAX];
      |                   ^~~~~~~~
tracefs-events.c:135:19: note: each undeclared identifier is reported only once for each function it appears in
( x86_64-gentoo-linux-musl-gcc -c  -pipe -march=native -fno-diagnostics-color -O2 -DVSOCK -D_GNU_SOURCE -I/var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-v2.9.1/include -I/var/tmp/portage/dev-util/trace-cmd-2.9.1/work/trace-cmd-v2.9.1/../../include -I/var/tmp/portage/dev-util/trace-cmd-2.9.

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl_hardened-j4-20211215-000030

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-11.2.0 *
clang version 13.0.0
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/13/bin
/usr/lib/llvm/13
13.0.0
Python 3.9.9
Available Rust versions:
  [1]   rust-1.57.0 *
The following VMs are available for generation-2:
Available Java Virtual Machines:
  (none found)

php cli:

  HEAD of ::gentoo
commit b4e44726911f6bd8b842571f0ed5a312a85e5927
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu Dec 16 05:36:44 2021 +0000

    2021-12-16 05:36:43 UTC

emerge -qpvO dev-util/trace-cmd
[ebuild  N    ] dev-util/trace-cmd-2.9.1  USE="audit -doc -python -test -udis86" PYTHON_TARGETS="python3_9 -python3_8"
Comment 1 Toralf Förster gentoo-dev 2021-12-16 10:46:59 UTC
Created attachment 759283 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-12-16 10:47:00 UTC
Created attachment 759284 [details]
dev-util:trace-cmd-2.9.1:20211216-060957.log
Comment 3 Toralf Förster gentoo-dev 2021-12-16 10:47:01 UTC
Created attachment 759285 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-12-16 10:47:03 UTC
Created attachment 759286 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-12-16 10:47:04 UTC
Created attachment 759287 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-12-16 10:47:05 UTC
Created attachment 759288 [details]
temp.tar.bz2
Comment 7 CFuga 2022-06-24 21:51:56 UTC
There's no way to compile dev-util/trace-cmd-2.9.1 with musl. This version calls pthread_attr_setaffinity_np() and it's only implemented in glibc.

The easiest solution is bump this ebuild to upstream version 2.9.2; it already has fixes for musl.

https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?h=trace-cmd-stable-v2.9&id=1a000636c1828eecdcec5360a51623ef4ffbff04
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-25 04:30:57 UTC
(In reply to CFuga from comment #7)
> There's no way to compile dev-util/trace-cmd-2.9.1 with musl. This version
> calls pthread_attr_setaffinity_np() and it's only implemented in glibc.
> 
> The easiest solution is bump this ebuild to upstream version 2.9.2; it
> already has fixes for musl.
> 
> https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?h=trace-
> cmd-stable-v2.9&id=1a000636c1828eecdcec5360a51623ef4ffbff04

Thanks! It recently got bumped to 3.x already but that'll take longer to stable. In theory, could bump to 2.9.2 and stable it quickly, but inclined personally to just wait for newer 3.x to get stabled.

What do you think?
Comment 9 CFuga 2022-06-27 21:52:46 UTC
(In reply to Sam James from comment #8)
> (In reply to CFuga from comment #7)
> > There's no way to compile dev-util/trace-cmd-2.9.1 with musl. This version
> > calls pthread_attr_setaffinity_np() and it's only implemented in glibc.
> > 
> > The easiest solution is bump this ebuild to upstream version 2.9.2; it
> > already has fixes for musl.
> > 
> > https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?h=trace-
> > cmd-stable-v2.9&id=1a000636c1828eecdcec5360a51623ef4ffbff04
> 
> Thanks! It recently got bumped to 3.x already but that'll take longer to
> stable. In theory, could bump to 2.9.2 and stable it quickly, but inclined
> personally to just wait for newer 3.x to get stabled.
> 
> What do you think?

I also prefer the option to wait for 3.x to get stable. But upstream is still updating the 2.9.x version: there's a 2.9.7 release in 2022.

I suggest the following path:
* bump to 2.9.3 release (not 2.9.2) as unstable; this is the last version that doesn't explicitly requires libtracefs/libtraceevent 
* stabilize a 3.x version
* delete the 2.9.1 version
Comment 10 CFuga 2022-06-27 21:59:20 UTC
There's a previous open bug for the same error, please mark it as duplicate.

https://bugs.gentoo.org/782565
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-27 23:03:22 UTC

*** This bug has been marked as a duplicate of bug 782565 ***