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.29k stars 621 forks source link

[Bug]: unable to build due to Vc on OpenBSD 7.6 #2073

Open epsheldoni opened 2 weeks ago

epsheldoni commented 2 weeks ago

What happened?

I cloned the latest from github and after extracting it and adding a build directory and cd-ing to that directory, I type cmake ../ and there is scrolling on the erminal and I get the following

-- Build files have been written to: /home/sheldoni/Downloads/conky/build

and it stops. So I see that there is a makefile now in build and I type make and I get the following error

In file included from /home/sheldoni/Downloads/conky/build/3rdparty/Vc/trigonometric_SSE2.cpp:31: In file included from /home/sheldoni/Downloads/conky/3rdparty/Vc/Vc/vector.h:221: /home/sheldoni/Downloads/conky/3rdparty/Vc/Vc/scalar/math.h:118:7: error: no member named 'sincos' in the global namespace ::sincos(x.data(), &sin->data(), &cos->data()); ~~^ 1 error generated. Error 1 in . (3rdparty/Vc/CMakeFiles/Vc.dir/build.make:186 '3rdparty/Vc/CMakeFiles/Vc.dir/trigonometric_SSE2.cpp.o': cd /home/sheldoni/D...) Error 2 in . (CMakeFiles/Makefile2:367 '3rdparty/Vc/CMakeFiles/Vc.dir/all': make -s -f 3rdparty/Vc/CMakeFiles/Vc.dir/build.make 3rdparty...) *** Error 2 in /home/sheldoni/Downloads/conky/build (Makefile:156 'all': make -s -f CMakeFiles/Makefile2 all)

Am I doing something wrong?

Version

latest cloned version

Which OS/distro are you seeing the problem on?

Linux (other)

Conky config

No response

Stack trace

No response

Relevant log output

No response

Caellian commented 2 weeks ago

Am I doing something wrong?

Likely no. Do you mind providing the whole build log? It contains a lot of useful information and will reduce back-and-forth a lot.

epsheldoni commented 2 weeks ago

Where is the build log?

Caellian commented 2 weeks ago

You included the end of it in the issue.

Example of mine
-- CMAKE_C_FLAGS: 
-- CMAKE_CXX_FLAGS: -pthread
-- CMAKE_C_FLAGS_DEBUG: -g
-- CMAKE_CXX_FLAGS_DEBUG: -O0 -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: Debug
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Found Lua: /usr/lib/liblua5.4.so;/usr/lib/libm.so (found suitable version "5.4.7", minimum required is "5.3")
CMake Warning (dev) at 3rdparty/Vc/cmake/VcMacros.cmake:65 (exec_program):
  Policy CMP0153 is not set: The exec_program command should not be called.
  Run "cmake --help-policy CMP0153" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  Use execute_process() instead.
Call Stack (most recent call first):
  3rdparty/Vc/CMakeLists.txt:29 (vc_determine_compiler)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Detected Compiler: Clang 18.1.8
-- Detected CPU: kaby-lake
-- Found Lua: /usr/lib/liblua5.4.so;/usr/lib/libm.so (found version "5.4.7")
Configuration for target conky
-- SOURCE_DIR = /data/code/FOSS/conky/src
-- BINARY_DIR = /data/code/FOSS/conky/build/src
-- COMPILE_OPTIONS = $<$:-stdlib=libc++>;$<$:-Wno-unknown-warning-option>;$<$:-Wno-unknown-warning>
-- INCLUDE_DIRECTORIES = /data/code/FOSS/conky/3rdparty/toluapp/include;/data/code/FOSS/conky/build;/usr/include;/usr/include;/usr/include/freetype2;/usr/include/freetype2;/usr/include;/usr/include;/usr/include;/usr/include;/data/code/FOSS/conky/3rdparty/Vc;/data/code/FOSS/conky/build/src;/data/code/FOSS/conky/build/data
-- LINK_LIBRARIES = -lm;/usr/lib/libncurses.so;/usr/lib/libform.so;/usr/lib/libiw.so;/usr/lib/libSM.so;/usr/lib/libICE.so;/usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libXdamage.so;/usr/lib/libXfixes.so;/usr/lib/libXft.so;/usr/lib/libfontconfig.so;/usr/lib/libXext.so;/usr/lib/libXinerama.so;/usr/lib/libXfixes.so;/usr/lib/libxcb.so;/usr/lib/libxcb.so;/usr/lib/libxcb-errors.so;/usr/lib/liblua5.4.so;/usr/lib/libm.so;-L/usr/lib;-lImlib2;toluapp_lib_static;Vc;tcp-portmon
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /data/code/FOSS/conky/build
[ 32%] Built target Vc
[ 38%] Built target toluapp_lib_static
[ 40%] Built target toluapp
[ 42%] Built target tcp-portmon
[ 44%] Built target generated_hdr_files
[ 45%] Building CXX object src/CMakeFiles/conky.dir/main.cc.o
[ 46%] Building CXX object src/CMakeFiles/conky.dir/c++wrap.cc.o
[ 47%] Building CXX object src/CMakeFiles/conky.dir/colour-settings.cc.o
[ 47%] Building CXX object src/CMakeFiles/conky.dir/colours.cc.o
[ 48%] Building CXX object src/CMakeFiles/conky.dir/combine.cc.o
[ 49%] Building CXX object src/CMakeFiles/conky.dir/common.cc.o
[ 50%] Building CXX object src/CMakeFiles/conky.dir/conky.cc.o
[ 51%] Building CXX object src/CMakeFiles/conky.dir/core.cc.o
[ 52%] Building CXX object src/CMakeFiles/conky.dir/cpu.cc.o
[ 53%] Building CXX object src/CMakeFiles/conky.dir/diskio.cc.o
[ 53%] Building CXX object src/CMakeFiles/conky.dir/entropy.cc.o
[ 54%] Building CXX object src/CMakeFiles/conky.dir/exec.cc.o
[ 55%] Building CXX object src/CMakeFiles/conky.dir/fs.cc.o
[ 56%] Building CXX object src/CMakeFiles/conky.dir/gradient.cc.o
[ 57%] Building CXX object src/CMakeFiles/conky.dir/mail.cc.o
[ 58%] Building CXX object src/CMakeFiles/conky.dir/misc.cc.o
[ 59%] Building CXX object src/CMakeFiles/conky.dir/net_stat.cc.o
[ 59%] Building CXX object src/CMakeFiles/conky.dir/template.cc.o
[ 60%] Building CXX object src/CMakeFiles/conky.dir/mboxscan.cc.o
[ 61%] Building CXX object src/CMakeFiles/conky.dir/read_tcpip.cc.o
[ 62%] Building CXX object src/CMakeFiles/conky.dir/scroll.cc.o
[ 63%] Building CXX object src/CMakeFiles/conky.dir/specials.cc.o
[ 64%] Building CXX object src/CMakeFiles/conky.dir/tailhead.cc.o
[ 64%] Building CXX object src/CMakeFiles/conky.dir/temphelper.cc.o
[ 65%] Building CXX object src/CMakeFiles/conky.dir/text_object.cc.o
[ 66%] Building CXX object src/CMakeFiles/conky.dir/timeinfo.cc.o
[ 67%] Building CXX object src/CMakeFiles/conky.dir/top.cc.o
[ 68%] Building CXX object src/CMakeFiles/conky.dir/algebra.cc.o
[ 69%] Building CXX object src/CMakeFiles/conky.dir/prioqueue.cc.o
[ 70%] Building CXX object src/CMakeFiles/conky.dir/proc.cc.o
[ 70%] Building CXX object src/CMakeFiles/conky.dir/user.cc.o
[ 71%] Building CXX object src/CMakeFiles/conky.dir/luamm.cc.o
[ 72%] Building CXX object src/CMakeFiles/conky.dir/data-source.cc.o
[ 73%] Building CXX object src/CMakeFiles/conky.dir/display-output.cc.o
[ 74%] Building CXX object src/CMakeFiles/conky.dir/display-console.cc.o
[ 75%] Building CXX object src/CMakeFiles/conky.dir/display-file.cc.o
[ 76%] Building CXX object src/CMakeFiles/conky.dir/lua-config.cc.o
[ 76%] Building CXX object src/CMakeFiles/conky.dir/setting.cc.o
[ 77%] Building CXX object src/CMakeFiles/conky.dir/llua.cc.o
[ 78%] Building CXX object src/CMakeFiles/conky.dir/update-cb.cc.o
[ 79%] Building CXX object src/CMakeFiles/conky.dir/linux.cc.o
[ 80%] Building CXX object src/CMakeFiles/conky.dir/users.cc.o
[ 81%] Building CXX object src/CMakeFiles/conky.dir/sony.cc.o
[ 82%] Building CXX object src/CMakeFiles/conky.dir/i8k.cc.o
[ 82%] Building CXX object src/CMakeFiles/conky.dir/mixer.cc.o
[ 83%] Building CXX object src/CMakeFiles/conky.dir/ibm.cc.o
[ 84%] Building CXX object src/CMakeFiles/conky.dir/smapi.cc.o
[ 85%] Building CXX object src/CMakeFiles/conky.dir/mpd.cc.o
[ 86%] Building CXX object src/CMakeFiles/conky.dir/libmpdclient.cc.o
[ 87%] Building CXX object src/CMakeFiles/conky.dir/netlink-conky.cc.o
cc1plus: fatal error: /data/code/FOSS/conky/src/netlink-conky.cc: No such file or directory
compilation terminated.
make[2]: *** [src/CMakeFiles/conky.dir/build.make:762: src/CMakeFiles/conky.dir/netlink-conky.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:502: src/CMakeFiles/conky.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
Except yours ends with the error you already provided. Mine has a different error because I _did_ build conky incorrectly.
Caellian commented 2 weeks ago

Hmm interestingly enough, OpenBSD does have sincos is math.h (since 2018).

epsheldoni commented 2 days ago

I am still unable to successfully compile the latest from g0mb4. I get the same errors

In file included from /home/sheldoni/Downloads/conky/build/3rdparty/Vc/trigonometric_SSE2.cpp:31: In file included from /home/sheldoni/Downloads/conky/3rdparty/Vc/Vc/vector.h:221: /home/sheldoni/Downloads/conky/3rdparty/Vc/Vc/scalar/math.h:118:7: error: no member named 'sincos' in the global namespace ::sincos(x.data(), &sin->data(), &cos->data()); ~~^ 1 error generated. Error 1 in . (3rdparty/Vc/CMakeFiles/Vc.dir/build.make:186 '3rdparty/Vc/CMakeFiles/Vc.dir/trigonometric_SSE2.cpp.o': cd /home/sheldoni/D...) Error 2 in . (CMakeFiles/Makefile2:367 '3rdparty/Vc/CMakeFiles/Vc.dir/all': make -s -f 3rdparty/Vc/CMakeFiles/Vc.dir/build.make 3rdparty...) *** Error 2 in /home/sheldoni/Downloads/conky/build (Makefile:156 'all': make -s -f CMakeFiles/Makefile2 all)

epsheldoni commented 2 days ago

I cloned the latest from https://github.com/brndnmtthws/conky.git and I still get the same errors.

Caellian commented 1 day ago

2080 hasn't been merged yet, you'll need to clone from g0mb4's repo (https://github.com/g0mb4/conky) and checkout fix/openbsd76-build branch as it's not default.

epsheldoni commented 1 day ago

Thanks for the explanation. I downloaded the conky-fix-openbsd76-build and built it. After figuring out that it required the new format for .conkyrc, or conky.conf, I tried to run it and it crashes. Here is the terminal output

pangolin$ ./conky -d conky: desktop window (0x1a00003) is subwindow of root window (0x538) conky: window type - normal conky: drawing to created window (0x3000002) conky: drawing to double buffer conky: forked to background, pid is 33192 pangolin$ conky: FOUND: console conky: FOUND: ncurses conky: FOUND: file conky: FOUND: x11 conky: '(null)' (null) session running 'XFCE' desktop conky: Cannot get kern.cp_time conky: obj->data.i 2 info.cpu_count 1 conky: attempting to use more CPUs than you have!

I'm not sure how to proceed from here. I'll keep investigating.

Sheldon

epsheldoni commented 23 hours ago

Here is the output from sysctl | grep cpu

angolin$ sysctl | grep cpu kern.ccpu=1948 hw.ncpu=16 hw.sensors.cpu0.frequency0=1500000000.00 Hz hw.sensors.cpu1.frequency0=1650000000.00 Hz hw.sensors.cpu2.frequency0=1650000000.00 Hz hw.sensors.cpu3.frequency0=1600000000.00 Hz hw.sensors.cpu4.frequency0=1750000000.00 Hz hw.sensors.cpu5.frequency0=1850000000.00 Hz hw.sensors.cpu6.frequency0=1850000000.00 Hz hw.sensors.cpu7.frequency0=1850000000.00 Hz hw.cpuspeed=3300 hw.ncpufound=16 hw.ncpuonline=8 machdep.cpuvendor=AuthenticAMD machdep.cpuid=0xa70f41 machdep.cpufeature=0x179bfbff

Not sure if this helps but more information can't hurt.

epsheldoni commented 21 hours ago

Here is a partial copy of the cpu lines in .conkyrc that causes it to crash

CPU 1 usage:$alignr ${cpu cpu1}% CPU 2 usage:$alignr ${cpu cpu2}% CPU 3 usage:$alignr ${cpu cpu3}% . down to CPU 15 usage $alignr ${cpu cpu15}%

Even if I only use one of the lines, it still crashes.

The following lines in the terminal output may indicate something OpenBSD specific

conky: Cannot get kern.cp_time conky: obj->data.i 2 info.cpu_count 1 conky: attempting to use more CPUs than you have!

Caellian commented 13 hours ago

Thank you for very detailed information. I marked it as off-topic because it's not related to this issue, but I opened up #2088 for you and copied all relevant information there. That issue will probably wait for fix/openbsd76-build to be completed first to avoid having to rebase changes.