Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 895842 - dev-util/premake-5.0.0_beta2 fails to compile (MUSL-CLANG-SYSTEM): mkstemp.c:76:8: error: call to undeclared function getpid; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
Summary: dev-util/premake-5.0.0_beta2 fails to compile (MUSL-CLANG-SYSTEM): mkstemp.c:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Aaron W. Swenson
URL:
Whiteboard: patch
Keywords: PATCH
: 938083 940246 (view as bug list)
Depends on:
Blocks: c99-porting gcc-14-stable
  Show dependency tree
 
Reported: 2023-02-22 08:32 UTC by Agostino Sarubbo
Modified: 2025-01-19 00:17 UTC (History)
9 users (show)

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


Attachments
build.log (build.log,50.77 KB, text/plain)
2023-02-22 08:32 UTC, Agostino Sarubbo
Details
#include <unistd.h> in contrib/libzip/mkstemp.c (premake-5.0.0-getpid-unistd.patch,444 bytes, patch)
2024-05-17 14:20 UTC, Jon Daniel
Details | Diff
add getpid-unistd.patch (premake-5.0.0_beta2-r1.ebuild,740 bytes, application/vnd.gentoo.ebuild)
2024-05-17 14:22 UTC, Jon Daniel
Details
add HAVE_UNISTD_H #include <unistd.h> and #include "zipint.h" (premake-5.0.0-getpid-unistd.patch,1.11 KB, patch)
2024-05-17 14:43 UTC, Jon Daniel
Details | Diff
unistd.h patch (premake-5.0.0-getpid-unistd.patch,1.65 KB, patch)
2024-05-17 14:52 UTC, Jon Daniel
Details | Diff
build.log on a glibc profile (build.log,7.70 KB, text/x-log)
2025-01-07 13:37 UTC, rachitverma1122
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-22 08:32:12 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/premake-5.0.0_alpha16 fails to compile (MUSL-CLANG-SYSTEM).
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
(MUSL-CLANG-SYSTEM) in the summary means that bug was found on a machine that runs MUSL libc + clang16 but this bug MAY or MAY NOT BE related to musl/clang16.
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-22 08:32:14 UTC
Created attachment 853838 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-12-30 09:42:52 UTC
gcc14_tinderbox has reproduced this issue with version 5.0.0_beta2 - Updating summary.
Comment 3 Jon Daniel 2024-05-17 14:20:42 UTC Comment hidden (obsolete)
Comment 4 Jon Daniel 2024-05-17 14:22:55 UTC Comment hidden (obsolete)
Comment 5 Jon Daniel 2024-05-17 14:43:45 UTC Comment hidden (obsolete)
Comment 6 Jon Daniel 2024-05-17 14:52:21 UTC
Created attachment 893155 [details, diff]
unistd.h patch
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-25 16:15:00 UTC
*** Bug 938083 has been marked as a duplicate of this bug. ***
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-25 16:15:09 UTC
*** Bug 940246 has been marked as a duplicate of this bug. ***
Comment 9 CaptainBlood 2024-10-21 09:09:17 UTC Comment hidden (obsolete)
Comment 10 CaptainBlood 2024-10-21 13:25:12 UTC Comment hidden (obsolete)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-21 13:30:22 UTC Comment hidden (obsolete)
Comment 12 rachitverma1122 2025-01-04 13:12:31 UTC Comment hidden (obsolete)
Comment 13 rachitverma1122 2025-01-07 13:37:38 UTC
Created attachment 916068 [details]
build.log on a glibc profile

This is the emerge --info of premake-5.0.0_beta2:5

```
Portage 3.0.66.1 (python 3.12.8-final-0, default/linux/amd64/23.0/no-multilib/hardened/systemd, gcc-14, glibc-2.40-r5, 6.6.67-gentoo-dist-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.67-gentoo-dist-hardened-x86_64-13th_Gen_Intel-R-_Core-TM-_i7-1360P-with-glibc2.40
KiB Mem:    15998524 total,   6201832 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Tue, 07 Jan 2025 13:00:00 +0000
Head commit of repository gentoo: 495a0a25e181d019233ee10ff6a9110db097b605
Head commit of repository brave-overlay: 9efce9f27c5e830e2d33581369b0b38e003c81b2

Timestamp of repository guru: Tue, 07 Jan 2025 13:03:17 +0000
Head commit of repository guru: 8b262766b56701ef98daa8d4d2ea6d2d4d3672b6

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p3) 2.43.1
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.6::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.5.2::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.11_p1::gentoo, 3.12.8::gentoo, 3.13.1::gentoo
dev-lang/rust-bin:         1.81.0-r101::gentoo, 1.82.0-r101::gentoo
llvm-core/clang:           18.1.8-r6::gentoo, 19.1.4::gentoo
llvm-core/lld:             19.1.4::gentoo
llvm-core/llvm:            18.1.8-r6::gentoo, 19.1.4::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-apps/systemd:          256.7::gentoo
sys-devel/binutils:        2.43-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 3
    sync-rsync-verify-metamanifest: yes

brave-overlay
    location: /var/db/repos/brave-overlay
    sync-type: git
    sync-uri: https://gitlab.com/jason.oliveira/brave-overlay.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64_hardened

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=alderlake -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=alderlake -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="-j2 -l10.8"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=alderlake -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=alderlake -O2 -pipe"
GENTOO_MIRRORS="https://mirrors.nxtgen.com/gentoo-mirror/gentoo-source/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RUSTFLAGS=" -C target-cpu=alderlake"
SHELL="/bin/zsh"
USE="acl amd64 bluetooth bzip2 cet crypt dbus dist-kernel evdev gdbm hardened iconv ipv6 libinput libtirpc ncurses networkmanager nls openmp pam pcre pic pie pipewire pulseaudio readline seccomp ssl ssp systemd test-rust udev unicode vaapi vulkan wayland xattr xtpax zlib zsh-completion" ABI_X86="64" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS

```
Comment 14 olafito18 2025-01-17 00:12:18 UTC Comment hidden (obsolete)
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-01-17 18:49:02 UTC
There's a patch at https://bugs.gentoo.org/895842#c6. I was hoping the maintainer would apply it.
Comment 16 Larry the Git Cow gentoo-dev 2025-01-19 00:17:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=766b0c26c457068b023770da032ee2cb4c25cd61

commit 766b0c26c457068b023770da032ee2cb4c25cd61
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-01-19 00:16:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-01-19 00:17:11 +0000

    dev-util/premake: fix modern C issues
    
    Closes: https://bugs.gentoo.org/895842
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/premake/files/premake-5.0.0-c99.patch | 59 ++++++++++++++++++++++++++
 dev-util/premake/premake-5.0.0_beta2.ebuild    |  7 ++-
 2 files changed, 64 insertions(+), 2 deletions(-)