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.31k stars 620 forks source link

Fail to compile conky 1.11.0 #700

Closed florin65 closed 5 years ago

florin65 commented 5 years ago

Hi,

I have tried to compile conky 1.11.0 on my system. I have applied the patch https://github.com/brndnmtthws/conky/commit/4d098b053690861992f9daa4e3195b31295c735c.patch' too. It still keep failing to compile. Any solution to this?

Building conky version 1.11.0 patching file .gitignore patching file src/conky.cc patching file src/fonts.cc patching file src/fonts.h patching file src/linux.cc patching file src/specials.cc -- The C compiler identification is GNU 8.2.0 -- The CXX compiler identification is GNU 8.2.0 -- Check for working C compiler: /var/lib/lunar/compilers/cc -- Check for working C compiler: /var/lib/lunar/compilers/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /var/lib/lunar/compilers/c++ -- Check for working CXX compiler: /var/lib/lunar/compilers/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkgconf (found version "1.5.4") -- 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 -- Found Curses: /usr/lib/libcurses.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 XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/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 X11: /usr/lib/libX11.so -- Checking for one of the modules 'lua>=5.3;luajit' -- Checking for modules 'cairo;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 'librsvg-2.0' -- Found librsvg-2.0, version 2.44.10 -- Checking for module 'libpulse' -- Found libpulse, version 12.2-rebootstrapped -- Checking for module 'libcurl' -- Found libcurl, version 7.63.0 -- Found LibXml2: /usr/lib/libxml2.so (found version "2.9.8") -- Looking for XineramaQueryScreens in /usr/lib/libXinerama.so -- Looking for XineramaQueryScreens in /usr/lib/libXinerama.so - found -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

BUILD_TESTING
BUILD_WEATHER_XOAP
SYSCONF_INSTALL_DIR

-- Build files have been written to: /usr/src/conky-1.11.0/conky-oosb [ 5%] Running tolua++ on cairo.pkg [ 4%] Running tolua++ on rsvg.pkg [ 5%] Running tolua++ on imlib2.pkg [ 5%] Running tolua++ on cairo_imlib2_helper.pkg Scanning dependencies of target defconfig Scanning dependencies of target convertconf [ 8%] Generating convertconf.h [ 8%] Generating defconfig.h [ 8%] Built target defconfig [ 8%] Built target convertconf luaL_loadfile failed luaL_loadfile failed luaL_loadfile failed luaL_loadfile failed make[2]: [lua/CMakeFiles/conky-imlib2.dir/build.make:62: lua/libimlib2.c] Error 1 make[2]: [lua/CMakeFiles/conky-cairo.dir/build.make:67: lua/libcairo-orig.c] Error 1 make[2]: [lua/CMakeFiles/conky-rsvg.dir/build.make:62: lua/librsvg.c] Error 1 make[2]: [lua/CMakeFiles/conky-cairo_imlib2_helper.dir/build.make:62: lua/libcairo_imlib2_helper.c] Error 1 make[1]: [CMakeFiles/Makefile2:170: lua/CMakeFiles/conky-rsvg.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... make[1]: [CMakeFiles/Makefile2:96: lua/CMakeFiles/conky-imlib2.dir/all] Error 2 make[1]: [CMakeFiles/Makefile2:133: lua/CMakeFiles/conky-cairo.dir/all] Error 2 make[1]: ** [CMakeFiles/Makefile2:207: lua/CMakeFiles/conky-cairo_imlib2_helper.dir/all] Error 2 Scanning dependencies of target conky [ 9%] Building CXX object src/CMakeFiles/conky.dir/common.cc.o [ 10%] Building CXX object src/CMakeFiles/conky.dir/c++wrap.cc.o [ 12%] Building CXX object src/CMakeFiles/conky.dir/combine.cc.o [ 13%] Building CXX object src/CMakeFiles/conky.dir/conky.cc.o [ 15%] Building CXX object src/CMakeFiles/conky.dir/core.cc.o [ 16%] Building CXX object src/CMakeFiles/conky.dir/colours.cc.o [ 17%] Building CXX object src/CMakeFiles/conky.dir/cpu.cc.o [ 19%] Building CXX object src/CMakeFiles/conky.dir/diskio.cc.o [ 20%] Building CXX object src/CMakeFiles/conky.dir/entropy.cc.o [ 21%] Building CXX object src/CMakeFiles/conky.dir/exec.cc.o [ 23%] Building CXX object src/CMakeFiles/conky.dir/fs.cc.o [ 24%] Building CXX object src/CMakeFiles/conky.dir/mail.cc.o [ 26%] Building CXX object src/CMakeFiles/conky.dir/misc.cc.o [ 27%] Building CXX object src/CMakeFiles/conky.dir/net_stat.cc.o [ 30%] Building CXX object src/CMakeFiles/conky.dir/mboxscan.cc.o [ 30%] Building CXX object src/CMakeFiles/conky.dir/template.cc.o [ 31%] Building CXX object src/CMakeFiles/conky.dir/read_tcpip.cc.o [ 32%] Building CXX object src/CMakeFiles/conky.dir/scroll.cc.o [ 34%] Building CXX object src/CMakeFiles/conky.dir/specials.cc.o [ 35%] Building CXX object src/CMakeFiles/conky.dir/tailhead.cc.o [ 36%] Building CXX object src/CMakeFiles/conky.dir/temphelper.cc.o [ 38%] Building CXX object src/CMakeFiles/conky.dir/text_object.cc.o [ 39%] Building CXX object src/CMakeFiles/conky.dir/timeinfo.cc.o /usr/src/conky-1.11.0/src/scroll.cc: In function 'void parse_scroll_arg(text_object, const char, void, char)': /usr/src/conky-1.11.0/src/scroll.cc:189:10: warning: 'char strncat(char, const char, size_t)' specified bound depends on the length of the source argument [-Wstringop-overflow=] strncat(sd->text, arg + n1, strlen(arg + n1));


[ 41%] Building CXX object src/CMakeFiles/conky.dir/top.cc.o
[ 42%] Building CXX object src/CMakeFiles/conky.dir/algebra.cc.o
[ 43%] Building CXX object src/CMakeFiles/conky.dir/prioqueue.cc.o
[ 45%] Building CXX object src/CMakeFiles/conky.dir/proc.cc.o
[ 46%] Building CXX object src/CMakeFiles/conky.dir/user.cc.o
[ 47%] Building CXX object src/CMakeFiles/conky.dir/luamm.cc.o
[ 49%] Building CXX object src/CMakeFiles/conky.dir/data-source.cc.o
[ 50%] Building CXX object src/CMakeFiles/conky.dir/lua-config.cc.o
[ 52%] Building CXX object src/CMakeFiles/conky.dir/setting.cc.o
[ 53%] Building CXX object src/CMakeFiles/conky.dir/llua.cc.o
[ 54%] Building CXX object src/CMakeFiles/conky.dir/update-cb.cc.o
[ 56%] Building CXX object src/CMakeFiles/conky.dir/linux.cc.o
[ 57%] Building CXX object src/CMakeFiles/conky.dir/users.cc.o
[ 58%] Building CXX object src/CMakeFiles/conky.dir/sony.cc.o
[ 60%] Building CXX object src/CMakeFiles/conky.dir/i8k.cc.o
/usr/src/conky-1.11.0/src/users.cc: In function 'int update_users()':
/usr/src/conky-1.11.0/src/users.cc:43:31: warning: 'size_t strlen(const char*)' argument 1 declared attribute 'nonstring' [-Wstringop-overflow=]
       if (strlen(ptr) + strlen(usr->ut_name) + 1 <= BUFLEN) {
                         ~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/features.h:428,
                 from /usr/include/time.h:25,
                 from /usr/src/conky-1.11.0/src/users.cc:30:
/usr/include/bits/utmp.h:66:5: note: argument 'utmp::ut_user' declared here
     __attribute_nonstring__; /* Username.  */
     ^~~~~~~~~~~~~~~~~~~~~~~
/usr/src/conky-1.11.0/src/users.cc:65:31: warning: 'size_t strlen(const char*)' argument 1 declared attribute 'nonstring' [-Wstringop-overflow=]
       if (strlen(ptr) + strlen(usr->ut_line) + 1 <= BUFLEN) {
                         ~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/features.h:428,
                 from /usr/include/time.h:25,
                 from /usr/src/conky-1.11.0/src/users.cc:30:
/usr/include/bits/utmp.h:63:5: note: argument 'utmp::ut_line' declared here
     __attribute_nonstring__; /* Devicename.  */
     ^~~~~~~~~~~~~~~~~~~~~~~
[ 61%] Building CXX object src/CMakeFiles/conky.dir/mixer.cc.o
[ 63%] Building CXX object src/CMakeFiles/conky.dir/ibm.cc.o
[ 64%] Building CXX object src/CMakeFiles/conky.dir/smapi.cc.o
[ 65%] Building CXX object src/CMakeFiles/conky.dir/mpd.cc.o
[ 67%] Building CXX object src/CMakeFiles/conky.dir/libmpdclient.cc.o
[ 68%] Building CXX object src/CMakeFiles/conky.dir/moc.cc.o
[ 69%] Building CXX object src/CMakeFiles/conky.dir/cmus.cc.o
[ 71%] Building CXX object src/CMakeFiles/conky.dir/x11.cc.o
[ 72%] Building CXX object src/CMakeFiles/conky.dir/fonts.cc.o
[ 73%] Building CXX object src/CMakeFiles/conky.dir/hddtemp.cc.o
[ 75%] Building CXX object src/CMakeFiles/conky.dir/eve.cc.o
[ 76%] Building CXX object src/CMakeFiles/conky.dir/ccurl_thread.cc.o
[ 78%] Building CXX object src/CMakeFiles/conky.dir/rss.cc.o
[ 79%] Building CXX object src/CMakeFiles/conky.dir/prss.cc.o
[ 80%] Building CXX object src/CMakeFiles/conky.dir/weather.cc.o
/usr/src/conky-1.11.0/src/llua.cc: In function 'void llua_init()':
/usr/src/conky-1.11.0/src/llua.cc:154:10: warning: 'char* strncat(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   strncat(new_path, old_path, strlen(old_path));
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 82%] Building CXX object src/CMakeFiles/conky.dir/imlib2.cc.o
[ 83%] Building CXX object src/CMakeFiles/conky.dir/apcupsd.cc.o
[ 84%] Building CXX object src/CMakeFiles/conky.dir/nc.cc.o
[ 86%] Building CXX object src/CMakeFiles/conky.dir/pulseaudio.cc.o
/usr/src/conky-1.11.0/src/linux.cc: In function 'int open_sysfs_sensor(const char*, const char*, const char*, int, int*, char*)':
/usr/src/conky-1.11.0/src/linux.cc:1153:14: warning: 'char* strncat(char*, const char*, size_t)' specified bound 256 equals destination size [-Wstringop-overflow=]
       strncat(buf, "/device", 256);
       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/usr/src/conky-1.11.0/src/linux.cc: In function 'void process_parse_stat(process*)':
/usr/src/conky-1.11.0/src/linux.cc:2796:10: warning: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Wstringop-overflow=]
   strncpy(basename, procname, strlen(procname) + 1);
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/conky-1.11.0/src/linux.cc:2796:37: note: length computed here
   strncpy(basename, procname, strlen(procname) + 1);
                               ~~~~~~^~~~~~~~~~
/usr/src/conky-1.11.0/src/linux.cc:2799:12: warning: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Wstringop-overflow=]
     strncpy(procname, cmdline_procname, strlen(cmdline_procname) + 1);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/conky-1.11.0/src/linux.cc:2798:32: note: length computed here
   if (strlen(procname) < strlen(cmdline_procname))
                          ~~~~~~^~~~~~~~~~~~~~~~~~
[ 87%] Linking CXX executable conky
[ 87%] Built target conky
make: *** [Makefile:152: all] Error 2

Regards,

Florin
florin65 commented 5 years ago

PS: this is the module I use to compile it https://github.com/Florin65/zlocal/tree/master/other/x11-utils/conky

brndnmtthws commented 5 years ago

Hmm, it's not really clear from the error above what the problem is. What are the exact flags you're passing to cmake?

florin65 commented 5 years ago

based on the selection I've made before compiling the cmake flags are as following:

-D BUILD_NCURSES=ON -D BUILD_X11=ON -D BUILD_XDAMAGE=ON -D BUILD_XINERAMA=ON -D BUILD_XFT=ON -D BUILD_CURL=ON -D BUILD_WLAN=ON -D BUILD_HDDTEMP=ON -D BUILD_PULSEAUDIO=ON -D BUILD_MPD=ON -D BUILD_LUA_RSVG=ON -D BUILD_IMLIB2=ON -D BUILD_LUA_IMLIB2=ON -D BUILD_LUA_CAIRO=ON -D BUILD_WEATHER_METAR=ON -D BUILD_WEATHER_XOAP=ON -D BUILD_RSS=ON -D BUILD_I18N=ON -D BUILD_XDBE=ON -D BUILD_XSHAPE=ON -D BUILD_IOSTATS=ON -D BUILD_OLD_CONFIG=ON -D BUILD_BUILTIN_CONFIG=ON -D CMAKE_INSTALL_PREFIX=/usr -D DEFAULTNETDEV=wlp3s0 -D BUILD_PORT_MONITORS=OFF

brndnmtthws commented 5 years ago

I ran this and had no errors when compiling:

$ cmake .. -DBUILD_NCURSES=ON -DBUILD_X11=ON -DBUILD_XDAMAGE=ON \
-DBUILD_XINERAMA=ON -DBUILD_XFT=ON -DBUILD_CURL=ON -DBUILD_WLAN=ON \
-DBUILD_HDDTEMP=ON -DBUILD_PULSEAUDIO=ON -DBUILD_MPD=ON \
-DBUILD_LUA_RSVG=ON -DBUILD_IMLIB2=ON -DBUILD_LUA_IMLIB2=ON \
-DBUILD_LUA_CAIRO=ON -DBUILD_WEATHER_METAR=ON \
-DBUILD_WEATHER_XOAP=ON -DBUILD_RSS=ON -DBUILD_I18N=ON -DBUILD_XDBE=ON \
-DBUILD_XSHAPE=ON -DBUILD_IOSTATS=ON -DBUILD_OLD_CONFIG=ON \
-DBUILD_BUILTIN_CONFIG=ON -DCMAKE_INSTALL_PREFIX=/usr \
-DDEFAULTNETDEV=wlp3s0 -DBUILD_PORT_MONITORS=OFF
lasers commented 5 years ago

@brndnmtthws He might be is on http://lunar-linux.org/. Your command works fine for me on Arch Linux.

florin65 commented 5 years ago

OK, Thank you. I'll try to compile it that way.

Regards,

Florin

florin65 commented 5 years ago

I have removed the selection for imlib2, cairo and librsvg. This way it compiles/installs just fine.

lasers commented 5 years ago

Hi. I don't know where we stand today on this issue. Is it something we need to fix in Conky to support Lunar Linux or is it a problem on Lunar Linux's side?

Slightly related, we have toluapp subtree in 1.11.1 now (#712) and luajit was dropped (#723). EDIT: It would be nice if you can confirm this is still an issue on latest current. Thank you.

florin65 commented 5 years ago

Hi. It could be a Lunar Linux related problem. And it's an older one regarding imlib2 and cairo. Thank you for the support and a happy New Year!

brndnmtthws commented 5 years ago

Closing this for now.