MusicPlayerDaemon / mpdscribble

a MPD client which submits information about tracks being played to a scrobbler (e.g. last.fm)
GNU General Public License v2.0
114 stars 15 forks source link

Build failed on FC37 #52

Closed dksoftware2130 closed 1 year ago

dksoftware2130 commented 1 year ago

FAILED: mpdscribble.p/src_Log.cxx.o g++ -Impdscribble.p -I. -I.. -Isrc -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++17 -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wundef -fno-threadsafe-statics -fmerge-all-constants -Wcomma-subscript -Wextra-semi -Wmismatched-tags -Woverloaded-virtual -Wsign-promo -Wvolatile -Wvirtual-inheritance -Wno-non-virtual-dtor -fvisibility=hidden -ffunction-sections -fdata-sections -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mno-avx512f -mfpmath=sse -msse2avx -ftree-slp-vectorize -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fno-asynchronous-unwind-tables -fstack-protector-strong --param=ssp-buffer-size=6 -Wp,-D_FORTIFY_SOURCE=2 -w -Wformat -Werror=format-security -fPIC -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -pthread -MD -MQ mpdscribble.p/src_Log.cxx.o -MF mpdscribble.p/src_Log.cxx.o.d -o mpdscribble.p/src_Log.cxx.o -c ../src/Log.cxx ../src/Log.cxx: In function ‘const char* log_date()’: ../src/Log.cxx:48:13: error: ‘time’ was not declared in this scope 48 | t = time(nullptr); | ^~~~ ../src/Log.cxx:29:1: note: ‘time’ is defined in header ‘’; did you forget to ‘#include ’? 28 | #include +++ |+#include 29 | #include ../src/Log.cxx:49:15: error: ‘localtime’ was not declared in this scope 49 | tmp = localtime(&t); | ^~~~~ ../src/Log.cxx:49:15: note: ‘localtime’ is defined in header ‘’; did you forget to ‘#include ’? ../src/Log.cxx:55:14: error: ‘strftime’ was not declared in this scope 55 | if (!strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z", tmp)) { | ^~~~ ../src/Log.cxx:55:14: note: ‘strftime’ is defined in header ‘’; did you forget to ‘#include ’? [44/45] g++ -Impdscribble.p -I. -I.. -Isrc -I../src -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++17 -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wundef -fno-threadsafe-statics -fmerge-all-constants -Wcomma-subscript -Wextra-semi -Wmismatched-tags -Woverloaded-virtual -Wsign-promo -Wvolatile -Wvirtual-inheritance -Wno-non-virtual-dtor -fvisibility=hidden -ffunction-sections -fdata-sections -m64 -O2 -g0 -march=sandybridge -mtune=sandybridge -mno-avx512f -mfpmath=sse -msse2avx -ftree-slp-vectorize -fopenmp -pipe -fno-strict-aliasing -fomit-frame-pointer -fexceptions -fno-asynchronous-unwind-tables -fstack-protector-strong --param=ssp-buffer-size=6 -Wp,-D_FORTIFY_SOURCE=2 -w -Wformat -Werror=format-security -fPIC -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack -pthread -MD -MQ mpdscribble.p/src_MpdObserver.cxx.o -MF mpdscribble.p/src_MpdObserver.cxx.o.d -o mpdscribble.p/src_MpdObserver.cxx.o -c ../src/MpdObserver.cxx ninja: build stopped: subcommand failed. Fehler: Fehler-Status beim Beenden von /var/tmp/rpm-tmp.3mEMre (%build)

%prep %setup -q

%build export CFLAGS="%{optflags} -fPIE -fuse-ld=gold -fuse-linker-plugin -Wa,--noexecstack" export CXXFLAGS="$CFLAGS" export CC="gcc $CFLAGS" export LDFLAGS="-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -pie $CFLAGS" %meson --strip --auto-features=disabled --default-library=static %meson_build

%install %meson_install install -D -m 0644 -p %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service install -D -m 0644 -p %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf install -d %{buildroot}%{_localstatedir}/run/%{name}

Make room for logs

install -d %{buildroot}%{_localstatedir}/cache/%{name}

minimize build

rm -rf %{buildroot}%{_defaultdocdir} rm -rf %{buildroot}%{_sysconfdir}/%{name}.conf

%pre getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_localstatedir}/cache/%{name} -s /sbin/nologin -c "Mpdscribble" %{name} 2>/dev/null || :

%files %{_bindir}/mpdscribble %{_mandir}/man1/mpdscribble.1.gz %{_unitdir}/%{name}.service %{_tmpfilesdir}/%{name}.conf %attr(0755,%{name},%{name}) %dir %{_localstatedir}/run/%{name} %attr(0755,%{name},%{name}) %dir %{_localstatedir}/cache/%{name}

MaxKellermann commented 1 year ago

Those missing functions are supposed to be in time.h, and look: https://github.com/MusicPlayerDaemon/mpdscribble/blob/7f0d2385fb5a9ac38defba7d0358af6f3dcb2ccb/src/Log.cxx#L15 Can you convince me that this is a mpdscribble bug and not a problem in your build environment?

MaxKellermann commented 1 year ago

Bug report is bogus.