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

Bug 799281

Summary: games-emulation/dolphin-5.0_p20210506 - .../dolphin-5.0_p20210506/Source/Core/Core/MemoryWatcher.cpp:63:3: error: 'strncpy' was not declared in this scope (on musl)
Product: Gentoo Linux Reporter: ernsteiswuerfel <erhard_f>
Component: Current packagesAssignee: Sergei Trofimovich (RETIRED) <slyfox>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/dolphin-emu/dolphin/commit/7a1922fd8f0f6686188d179732c9757faf2d1b4f
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: build.log
emerge --info

Description ernsteiswuerfel archtester 2021-06-29 21:14:09 UTC
Created attachment 720249 [details]
build.log

[...]
FAILED: Source/Core/Core/CMakeFiles/core.dir/MemoryWatcher.cpp.o 
/usr/bin/x86_64-gentoo-linux-musl-g++ -DDATA_DIR=\"/usr/share/dolphin-emu/\" -DFMT_LOCALE -DFMT_SHARED -DHAS_OPENGL -DHAVE_BLUEZ=1 -DHAVE_EGL=1 -DHAVE_HIDAPI=1 -DHAVE_LIBEVDEV=1 -DHAVE_LIBUDEV=1 -DHAVE_X11=1 -DHAVE_XRANDR=1 -DUSE_ANALYTICS=1 -DUSE_GDBSTUB -DUSE_MEMORYWATCHER=1 -DUSE_PIPES=1 -D_ARCH_64=1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_M_X86=1 -D_M_X86_64=1 -D__LIBUSB__ -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Source/Core -I/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/External/minizip -I/usr/include/libpng16 -I/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Externals/soundtouch -I/usr/include/libusb-1.0 -I/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Externals/picojson -ISource/Core -I/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Externals/minizip/. -I/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Externals/cubeb/include -Iexports -I/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Externals/Bochs_disasm -isystem /var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Externals/rangeset/include -isystem /usr/include/hidapi -O3 -march=x86-64 -mtune=k8 -msse3 -msse3 -pipe -msse2 -fdiagnostics-color -fno-strict-aliasing -fno-exceptions -fvisibility-inlines-hidden -fvisibility=hidden -fomit-frame-pointer -Wall -Wtype-limits -Wsign-compare -Wignored-qualifiers -Wuninitialized -Wlogical-op -Wshadow -Winit-self -Wmissing-declarations -Wno-stringop-truncation -Werror=format -std=c++17 -MD -MT Source/Core/Core/CMakeFiles/core.dir/MemoryWatcher.cpp.o -MF Source/Core/Core/CMakeFiles/core.dir/MemoryWatcher.cpp.o.d -o Source/Core/Core/CMakeFiles/core.dir/MemoryWatcher.cpp.o -c /var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Source/Core/Core/MemoryWatcher.cpp
/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Source/Core/Core/MemoryWatcher.cpp: In member function 'bool MemoryWatcher::OpenSocket(const string&)':
/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Source/Core/Core/MemoryWatcher.cpp:63:3: error: 'strncpy' was not declared in this scope
   63 |   strncpy(m_addr.sun_path, path.c_str(), sizeof(m_addr.sun_path) - 1);
      |   ^~~~~~~
/var/tmp/portage/games-emulation/dolphin-5.0_p20210506/work/dolphin-5.0_p20210506/Source/Core/Core/MemoryWatcher.cpp:14:1: note: 'strncpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
   13 | #include "Core/PowerPC/MMU.h"
  +++ |+#include <cstring>
   14 |
Comment 1 ernsteiswuerfel archtester 2021-06-29 21:15:15 UTC
Created attachment 720252 [details]
emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2021-06-30 23:50:20 UTC
Upstream fix: https://github.com/dolphin-emu/dolphin/commit/7a1922fd8f0f6686188d179732c9757faf2d1b4f

Do you want to prepare a commit against ::gentoo so I could apply it with 'git am'? :)
Comment 3 Larry the Git Cow gentoo-dev 2021-07-02 06:43:13 UTC
The bug has been closed via the following commit(s):

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

commit e7e66a46b94f8707499ab2c266b3a6ce627cadc5
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-07-02 06:42:59 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-07-02 06:43:10 +0000

    games-emulation/dolphin: add missing headers for musl
    
    Reported-by: ernsteiswuerfel
    Closes: https://bugs.gentoo.org/799281
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../dolphin/dolphin-5.0_p20210506.ebuild           |  2 ++
 .../dolphin/files/dolphin-5.0_p20210506-musl.patch | 24 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)
Comment 4 ernsteiswuerfel archtester 2021-07-02 08:42:57 UTC
Thanks!