brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.27k stars 620 forks source link

[Bug]: Compile error with 1.17.0 on Slackware -current #1406

Closed mdinslage closed 1 year ago

mdinslage commented 1 year ago

What happened?

I reported a compile failure with 1.17.0 on Slackware-current and brndnmtthws pushed a fix (Thank you for that). I applied the patch and it allowed the build to get farther along but I have run into another error. This is not critical since the problem with is the bleeding edge Slackware tree and not the stable release. But I figure it is worth reporting.

Kernel: 6.1.12 imlib2: 1.10.0 lua: 5.3.4

If any other info is needed let me know and I will provide it.

Thank You.

Version

1.17.0

Which OS/distro are you seeing the problem on?

Linux (other)

Conky config

No response

Stack trace

No response

Relevant log output

conky-1.17.0/README.docker
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- CMAKE_C_FLAGS: -O2 -fPIC
-- CMAKE_CXX_FLAGS: -O2 -fPIC
-- CMAKE_C_FLAGS_DEBUG: -g
-- CMAKE_CXX_FLAGS_DEBUG: -g
-- CMAKE_C_FLAGS_MINSIZEREL: -Os -DNDEBUG
-- CMAKE_CXX_FLAGS_MINSIZEREL: -Os -DNDEBUG
-- CMAKE_C_FLAGS_RELEASE: -O3 -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE: -O3 -DNDEBUG
-- CMAKE_C_FLAGS_RELWITHDEBINFO: -O2 -g -DNDEBUG
-- CMAKE_CXX_FLAGS_RELWITHDEBINFO: -O2 -g -DNDEBUG
-- CMAKE_BUILD_TYPE: Release
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
-- Looking for include file sys/statfs.h
-- Looking for include file sys/statfs.h - found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/inotify.h
-- Looking for include file sys/inotify.h - found
-- Looking for include file dirent.h
-- Looking for include file dirent.h - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for pipe2
-- Looking for pipe2 - not found
-- Looking for O_CLOEXEC
-- Looking for O_CLOEXEC - found
-- Looking for statfs64
-- Looking for statfs64 - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for include file linux/soundcard.h
-- Looking for include file linux/soundcard.h - found
-- Looking for include file linux/soundcard.h
-- Looking for include file linux/soundcard.h - found
-- Looking for include file linux/sockios.h
-- Looking for include file linux/sockios.h - found
-- Looking for wsyncup in /usr/lib64/libcurses.so
-- Looking for wsyncup in /usr/lib64/libcurses.so - found
-- Looking for cbreak in /usr/lib64/libncurses.so
-- Looking for cbreak in /usr/lib64/libncurses.so - found
-- Looking for nodelay in /usr/lib64/libncurses.so
-- Looking for nodelay in /usr/lib64/libncurses.so - found
-- Found Curses: /usr/lib64/libncurses.so  
-- Looking for include file iwlib.h
-- Looking for include file iwlib.h - found
-- Looking for iw_sockets_open
-- Looking for iw_sockets_open - not found
-- Looking for getnameinfo
-- Looking for getnameinfo - found
-- Looking for 5 include files netdb.h, ..., arpa/inet.h
-- Looking for 5 include files netdb.h, ..., arpa/inet.h - found
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found Lua: /usr/lib64/liblua5.3.so;/usr/lib64/libm.so (found version "5.3.4") 
-- Checking for modules 'cairo>=1.14;cairo-xlib'
--   Found cairo, version 1.16.0
--   Found cairo-xlib, version 1.16.0
-- Checking for one of the modules 'imlib2;Imlib2'
-- Checking for module 'libpulse'
--   Found libpulse, version 16.1
-- Checking for module 'libcurl'
--   Found libcurl, version 7.88.0
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.14") 
-- Found Python3: /usr/bin/python3.9 (found version "3.9.16") found components: Interpreter 
Configuration for target conky-cairo
-- SOURCE_DIR = /tmp/SBo/conky-1.17.0/lua
-- BINARY_DIR = /tmp/SBo/conky-1.17.0/build/lua
-- COMPILE_OPTIONS = $<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>
-- INCLUDE_DIRECTORIES = /tmp/SBo/conky-1.17.0/3rdparty/toluapp/include;/usr/include/cairo;/usr/include/pixman-1;/usr/include/libxml2;/usr/include/freetype2;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib64/glib-2.0/include;/usr/include/libpng16;/usr/include/lua5.3;/tmp/SBo/conky-1.17.0/lua
-- LINK_LIBRARIES = cairo;X11;Xext;/usr/lib64/liblua5.3.so;/usr/lib64/libm.so;toluapp_lib_static
Configuration for target conky-imlib2
-- SOURCE_DIR = /tmp/SBo/conky-1.17.0/lua
-- BINARY_DIR = /tmp/SBo/conky-1.17.0/build/lua
-- COMPILE_OPTIONS = $<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>
-- INCLUDE_DIRECTORIES = /tmp/SBo/conky-1.17.0/3rdparty/toluapp/include;/usr/include/cairo;/usr/include/pixman-1;/usr/include/libxml2;/usr/include/freetype2;/usr/include/harfbuzz;/usr/include/glib-2.0;/usr/lib64/glib-2.0/include;/usr/include/libpng16;/usr/include/lua5.3;/tmp/SBo/conky-1.17.0/lua;/usr/include/lua5.3;/usr/include;/tmp/SBo/conky-1.17.0/lua
-- LINK_LIBRARIES = -L/usr/lib64;-lImlib2;/usr/lib64/liblua5.3.so;/usr/lib64/libm.so;toluapp_lib_static
Configuration for target conky
-- SOURCE_DIR = /tmp/SBo/conky-1.17.0/src
-- BINARY_DIR = /tmp/SBo/conky-1.17.0/build/src
-- COMPILE_OPTIONS = $<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>
-- INCLUDE_DIRECTORIES = /tmp/SBo/conky-1.17.0/3rdparty/toluapp/include;/tmp/SBo/conky-1.17.0/build;/usr/include;/usr/include;/usr/include/freetype2;/usr/include/lua5.3;/usr/include/libxml2;/tmp/SBo/conky-1.17.0/build/data
-- LINK_LIBRARIES = conky_core;-lm;/usr/lib64/libncurses.so;/usr/lib64/libform.so;/usr/lib64/libiw.a;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXdamage.so;/usr/lib64/libXfixes.so;/usr/lib64/libXft.so;/usr/lib64/libXext.so;/usr/lib64/libXinerama.so;/usr/lib64/libXfixes.so;/usr/lib64/liblua5.3.so;/usr/lib64/libm.so;-L/usr/lib64;-lImlib2;pulse;curl;curl;/usr/lib64/libxml2.so;toluapp_lib_static;tcp-portmon
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/SBo/conky-1.17.0/build
[  1%] Generating defconfig.h
[  2%] Generating convertconf.h
[  3%] Building C object 3rdparty/toluapp/CMakeFiles/toluapp_lib_static.dir/src/lib/tolua_map.c.o
[  4%] Building C object 3rdparty/toluapp/CMakeFiles/toluapp_lib_static.dir/src/lib/tolua_is.c.o
[  5%] Building C object 3rdparty/toluapp/CMakeFiles/toluapp_lib_static.dir/src/lib/tolua_event.c.o
[  6%] Building C object 3rdparty/toluapp/CMakeFiles/toluapp_lib_static.dir/src/lib/tolua_push.c.o
[  7%] Building CXX object src/CMakeFiles/tcp-portmon.dir/libtcp-portmon.cc.o
[  8%] Building C object 3rdparty/toluapp/CMakeFiles/toluapp_lib_static.dir/src/lib/tolua_to.c.o
[  8%] Built target generated_hdr_files
[  9%] Linking C static library libtoluapp.a
[  9%] Built target toluapp_lib_static
[ 10%] Building C object 3rdparty/toluapp/CMakeFiles/toluapp.dir/src/bin/tolua.c.o
[ 11%] Building C object 3rdparty/toluapp/CMakeFiles/toluapp.dir/src/bin/toluabind.c.o
[ 12%] Linking C executable toluapp
[ 12%] Built target toluapp
[ 13%] Running tolua++ on cairo_imlib2_helper.pkg
[ 14%] Running tolua++ on cairo.pkg
[ 15%] Running tolua++ on imlib2.pkg
[ 16%] Building C object lua/CMakeFiles/conky-cairo_imlib2_helper.dir/libcairo_imlib2_helper.c.o
[ 16%] Built target conky.nanorc
[ 16%] Built target conkyrc.vim
[ 17%] Linking C shared library libcairo_imlib2_helper.so
[ 17%] Built target conky-cairo_imlib2_helper
[ 18%] Building C object lua/CMakeFiles/conky-imlib2.dir/libimlib2.c.o
[ 19%] Patching libcairo-orig.c
[ 20%] Building C object lua/CMakeFiles/conky-cairo.dir/libcairo.c.o
[ 21%] Linking CXX static library libtcp-portmon.a
[ 21%] Built target tcp-portmon
[ 22%] Building CXX object src/CMakeFiles/conky_core.dir/c++wrap.cc.o
[ 23%] Building CXX object src/CMakeFiles/conky_core.dir/common.cc.o
[ 24%] Building CXX object src/CMakeFiles/conky_core.dir/colour-settings.cc.o
[ 25%] Building CXX object src/CMakeFiles/conky_core.dir/combine.cc.o
[ 26%] Building CXX object src/CMakeFiles/conky_core.dir/colours.cc.o
[ 27%] Building CXX object src/CMakeFiles/conky_core.dir/conky.cc.o
[ 28%] Building CXX object src/CMakeFiles/conky_core.dir/core.cc.o
[ 29%] Building CXX object src/CMakeFiles/conky_core.dir/cpu.cc.o
[ 30%] Linking C shared library libimlib2.so
[ 30%] Built target conky-imlib2
[ 31%] Building CXX object src/CMakeFiles/conky_core.dir/diskio.cc.o
[ 32%] Linking C shared library libcairo.so
[ 33%] Building CXX object src/CMakeFiles/conky_core.dir/entropy.cc.o
[ 34%] Building CXX object src/CMakeFiles/conky_core.dir/exec.cc.o
[ 34%] Built target conky-cairo
[ 35%] Building CXX object src/CMakeFiles/conky_core.dir/fs.cc.o
[ 36%] Building CXX object src/CMakeFiles/conky_core.dir/gradient.cc.o
[ 37%] Building CXX object src/CMakeFiles/conky_core.dir/mail.cc.o
[ 38%] Building CXX object src/CMakeFiles/conky_core.dir/misc.cc.o
[ 39%] Building CXX object src/CMakeFiles/conky_core.dir/net_stat.cc.o
[ 40%] Building CXX object src/CMakeFiles/conky_core.dir/template.cc.o
[ 41%] Building CXX object src/CMakeFiles/conky_core.dir/mboxscan.cc.o
[ 42%] Building CXX object src/CMakeFiles/conky_core.dir/read_tcpip.cc.o
[ 43%] Building CXX object src/CMakeFiles/conky_core.dir/scroll.cc.o
[ 44%] Building CXX object src/CMakeFiles/conky_core.dir/specials.cc.o
[ 45%] Building CXX object src/CMakeFiles/conky_core.dir/tailhead.cc.o
[ 46%] Building CXX object src/CMakeFiles/conky_core.dir/temphelper.cc.o
[ 47%] Building CXX object src/CMakeFiles/conky_core.dir/text_object.cc.o
[ 48%] Building CXX object src/CMakeFiles/conky_core.dir/timeinfo.cc.o
[ 49%] Building CXX object src/CMakeFiles/conky_core.dir/top.cc.o
/tmp/SBo/conky-1.17.0/src/scroll.cc: In function ‘void parse_scroll_arg(text_object*, const char*, void*, char*)’:
/tmp/SBo/conky-1.17.0/src/scroll.cc:193:10: error: ‘char* strncat(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
  193 |   strncat(sd->text, arg + n1, strlen(arg + n1));
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/conky_core.dir/build.make:342: src/CMakeFiles/conky_core.dir/scroll.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:512: src/CMakeFiles/conky_core.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
brndnmtthws commented 1 year ago

Neat, I should enable GCC 12.