Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 931954

Summary: gui-wm/hyprland-0.40.0 - ../.../SdDaemon.cpp: error: strnlen was not declared in this scope
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: CONFIRMED ---    
Severity: normal CC: amit.ugol, johnmh, julien, proxy-maint
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/hyprwm/Hyprland/issues/6094
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt.xz
environment
etc.clang.tar.xz
etc.portage.tar.xz
gui-wm:hyprland-0.40.0:20240515-114743.log.xz
qlist-info.txt.xz
temp.tar.xz
fixes missing header files

Description Toralf Förster gentoo-dev 2024-05-15 17:03:02 UTC
too long lines were shrinked:

[438/531] x86_64-pc-linux-musl-g++ -Isrc/Hyprland.p -Isrc -I../hyprland-source/src -Isubprojects/wlroots-hyprland/include -I../hyprland-source/subprojects/wlroots-hyprland/include -Isubprojects/udis86 -I../hyprland-source/subprojects/udis86 -I../hyprland-source/subprojects/udis86/libudis86 -Isubproj
[439/531] x86_64-pc-linux-musl-g++ -Isrc/Hyprland.p -Isrc -I../hyprland-source/src -Isubprojects/wlroots-hyprland/include -I../hyprland-source/subprojects/wlroots-hyprland/include -Isubprojects/udis86 -I../hyprland-source/subprojects/udis86 -I../hyprland-source/subprojects/udis86/libudis86 -Isubproj
[440/531] x86_64-pc-linux-musl-g++ -Isrc/Hyprland.p -Isrc -I../hyprland-source/src -Isubprojects/wlroots-hyprland/include -I../hyprland-source/subprojects/wlroots-hyprland/include -Isubprojects/udis86 -I../hyprland-source/subprojects/udis86 -I../hyprland-source/subprojects/udis86/libudis86 -Isubproj
FAILED: src/Hyprland.p/helpers_SdDaemon.cpp.o 
x86_64-pc-linux-musl-g++ -Isrc/Hyprland.p -Isrc -I../hyprland-source/src -Isubprojects/wlroots-hyprland/include -I../hyprland-source/subprojects/wlroots-hyprland/include -Isubprojects/udis86 -I../hyprland-source/subprojects/udis86 -I../hyprland-source/subprojects/udis86/libudis86 -Isubprojects/udis8
../hyprland-source/src/helpers/SdDaemon.cpp: In function 'int Systemd::SdNotify(int, const char*)':
../hyprland-source/src/helpers/SdDaemon.cpp:40:38: error: 'strnlen' was not declared in this scope; did you mean 'strlen'?
   40 |         size_t             addrLen = strnlen(addr, 107);
      |                                      ^~~~~~~

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_musl_hardened-20240501-134026

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

gcc-config -l:
 [1] x86_64-pc-linux-musl-13 *
clang/llvm (if any):
clang version 18.1.5
Target: x86_64-pc-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-musl-clang.cfg
/usr/lib/llvm/18
18.1.5
Python 3.11.9
Available Ruby profiles:
  [1]   ruby31 (with Rubygems)
  [2]   ruby32 (with Rubygems)
  [3]   ruby33 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.77.1
  [2]   rust-1.77.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 11.0.23_p9 [openjdk-bin-11]
2)	Eclipse Temurin JDK 17.0.11_p9 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.3_p9 [openjdk-bin-21]
Available Java Virtual Machines:
  [1]   openjdk-bin-11 
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21  system-vm

php cli (if any):
  [1]   php8.1 *
  [2]   php8.3
go version go1.22.3 linux/amd64

  HEAD of ::gentoo
commit 6c2057fe3010c8632c92e00ca71518138644fb1d
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed May 15 11:03:48 2024 +0000

    2024-05-15 11:03:48 UTC

emerge -qpvO gui-wm/hyprland
Comment 1 Toralf Förster gentoo-dev 2024-05-15 17:03:03 UTC
Created attachment 892994 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-05-15 17:03:05 UTC
Created attachment 892995 [details]
emerge-history.txt.xz
Comment 3 Toralf Förster gentoo-dev 2024-05-15 17:03:06 UTC
Created attachment 892996 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2024-05-15 17:03:07 UTC
Created attachment 892997 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2024-05-15 17:03:09 UTC
Created attachment 892998 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-05-15 17:03:10 UTC
Created attachment 892999 [details]
gui-wm:hyprland-0.40.0:20240515-114743.log.xz
Comment 7 Toralf Förster gentoo-dev 2024-05-15 17:03:11 UTC
Created attachment 893000 [details]
qlist-info.txt.xz
Comment 8 Toralf Förster gentoo-dev 2024-05-15 17:03:13 UTC
Created attachment 893001 [details]
temp.tar.xz
Comment 9 Amit Ugol 2024-05-15 21:02:05 UTC
Created attachment 893034 [details, diff]
fixes missing header files

There are two issues with this file, one is missing errno.h (already fixed upstream) that prevents compilation with clang and missing string.h that prevents compilation with gcc the way you tried it... this patch worked for me, feel free to try it.