Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946088 - sys-apps/iproute2-6.12.0: error: use of undeclared identifier 'PATH_MAX' (musl)
Summary: sys-apps/iproute2-6.12.0: error: use of undeclared identifier 'PATH_MAX' (musl)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL: https://github.com/iproute2/iproute2/...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-12-08 08:26 UTC by misile
Modified: 2024-12-08 12:30 UTC (History)
3 users (show)

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


Attachments
full build log (emerge-log.txt,58.64 KB, text/plain)
2024-12-08 08:26 UTC, misile
Details
emerge --info's output (emerge-info.txt,6.10 KB, text/plain)
2024-12-08 08:27 UTC, misile
Details
Patch to include limits.h (6.12-limits.patch,442 bytes, patch)
2024-12-08 09:21 UTC, Holger Hoffstätte
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description misile 2024-12-08 08:26:07 UTC
Created attachment 913548 [details]
full build log

```
make[1]: Leaving directory '/var/tmp/portage/sys-apps/iproute2-6.12.0/work/iproute2-6.12.0/ip'
make[1]: Entering directory '/var/tmp/portage/sys-apps/iproute2-6.12.0/work/iproute2-6.12.0/ip'
clang -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wformat=2 -O2 -march=native -pipe  -pipe -I../include -I../include/uapi -DRE
SOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib\" -DCONF_USR_DIR=\"/usr/share/iproute2\" -DCONF_ETC_DIR=\"/etc/iproute2\" -DNETNS_RUN_DIR=\"/run/netns\" -DNETNS_ETC_DIR=\"/etc/netns\" -DARP
DDIR=\"/var/lib/arpd\" -DCONF_COLOR=COLOR_OPT_NEVER -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -march=native -pipe -DHAVE_HANDLE_AT -DHAV
E_HANDLE_AT -DHAVE_SETNS -DHAVE_SETNS -DHAVE_LIBMNL  -DHAVE_LIBMNL    -c -o iplink.o iplink.c
iplink.c:663:15: error: use of undeclared identifier 'PATH_MAX'
  663 |                                 char path[PATH_MAX];
      |                                           ^
1 error generated.
make[1]: *** [../config.include:24: iplink.o] Error 1
```
Comment 1 misile 2024-12-08 08:27:07 UTC
Created attachment 913549 [details]
emerge --info's output
Comment 2 Holger Hoffstätte 2024-12-08 09:21:34 UTC
Created attachment 913550 [details, diff]
Patch to include limits.h

This makes it build on musl where for some reason limits.h is not implicitly included by stdio/stdlib etc.
Comment 3 Holger Hoffstätte 2024-12-08 09:50:48 UTC
Reported upstream at https://lore.kernel.org/netdev/27de1ca7-659f-bf0f-e53c-5336245078a4@applied-asynchrony.com/
Comment 4 Larry the Git Cow gentoo-dev 2024-12-08 12:30:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=063779bef9dcbf9f76360d89a18d89f95a7c025d

commit 063779bef9dcbf9f76360d89a18d89f95a7c025d
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2024-12-08 12:30:47 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2024-12-08 12:30:47 +0000

    sys-apps/iproute2: add patch for <limits.h> on musl
    
    Closes: https://bugs.gentoo.org/946088
    Signed-off-by: David Seifert <soap@gentoo.org>

 .../iproute2/files/iproute2-6.12.0-musl-3.patch    | 37 ++++++++++++++++++++++
 sys-apps/iproute2/iproute2-6.12.0.ebuild           |  1 +
 2 files changed, 38 insertions(+)