Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 713422 - sys-apps/pmount-0.9.99_alpha-r5 : utils.c: error: PATH_MAX undeclared (first use in this function)
Summary: sys-apps/pmount-0.9.99_alpha-r5 : utils.c: error: PATH_MAX undeclared (first ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo musl team
URL:
Whiteboard: Missing limits.h?
Keywords: PATCH
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2020-03-19 11:18 UTC by Toralf Förster
Modified: 2022-06-25 04:16 UTC (History)
3 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.35 KB, text/plain)
2020-03-19 11:18 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,128.69 KB, text/plain)
2020-03-19 11:18 UTC, Toralf Förster
Details
environment (environment,54.16 KB, text/plain)
2020-03-19 11:18 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,12.86 KB, application/x-bzip)
2020-03-19 11:18 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,8.13 KB, application/x-bzip)
2020-03-19 11:18 UTC, Toralf Förster
Details
sys-apps:pmount-0.9.99_alpha-r5:20200319-052335.log (sys-apps:pmount-0.9.99_alpha-r5:20200319-052335.log,15.12 KB, text/plain)
2020-03-19 11:18 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,16.95 KB, application/x-bzip)
2020-03-19 11:18 UTC, Toralf Förster
Details
include <limits.h> for PATH_MAX definition (pmount-0.9.99_alpha-PATH_MAX.patch,254 bytes, patch)
2022-06-23 19:32 UTC, CFuga
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-19 11:18:02 UTC
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..     -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -c utils.c
utils.c: In function assert_dir:
utils.c:103:21: error: PATH_MAX undeclared (first use in this function)
  103 |     char stampfname[PATH_MAX];
      |                     ^~~~~~~~
utils.c:103:21: note: each undeclared identifier is reported only once for each function it appears in

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200316-165821

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.3.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.1 *

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Wed, 18 Mar 2020 13:38:27 +0000
emerge -qpvO sys-apps/pmount
[ebuild  N    ] sys-apps/pmount-0.9.99_alpha-r5  USE="crypt"
Comment 1 Toralf Förster gentoo-dev 2020-03-19 11:18:05 UTC
Created attachment 622450 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-19 11:18:08 UTC
Created attachment 622452 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-19 11:18:10 UTC
Created attachment 622454 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-19 11:18:13 UTC
Created attachment 622456 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-19 11:18:16 UTC
Created attachment 622458 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-19 11:18:19 UTC
Created attachment 622460 [details]
sys-apps:pmount-0.9.99_alpha-r5:20200319-052335.log
Comment 7 Toralf Förster gentoo-dev 2020-03-19 11:18:22 UTC
Created attachment 622462 [details]
temp.tbz2
Comment 8 Michael 'veremitz' Everitt 2020-03-21 02:06:07 UTC
I suspect this is a case of a missing #include <limits.h> which is required explicitly on musl-libc.
Comment 9 CFuga 2022-06-23 19:32:59 UTC
Created attachment 787208 [details, diff]
include <limits.h> for PATH_MAX definition

This patch adds

#include <limits.h>

in the file src/utils.c, and allows pmount to compile with musl.
Comment 10 Larry the Git Cow gentoo-dev 2022-06-25 04:15:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0773dc7048e4ce34e9d61c580a7424348f5124db

commit 0773dc7048e4ce34e9d61c580a7424348f5124db
Author:     Cristian Othón Martínez Vera <cfuga@cfuga.mx>
AuthorDate: 2022-06-25 03:44:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-25 03:44:00 +0000

    sys-apps/pmount: fix build with musl
    
    Closes: https://bugs.gentoo.org/713422
    Signed-off-by: Cristian Othón Martínez Vera <cfuga@cfuga.mx>
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/pmount/files/pmount-0.9.99_alpha-limits-musl.patch | 12 ++++++++++++
 sys-apps/pmount/pmount-0.9.99_alpha-r6.ebuild               |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-25 04:16:21 UTC
Thanks! I went ahead and fixed some implicit function declarations in a follow up too (unrelated to your commit other than being similar in nature).