conky icon indicating copy to clipboard operation
conky copied to clipboard

[Bug]: Cannot compile on macos 15.4 (M1)

Open thanosz opened this issue 1 year ago • 6 comments

What happened?

# mkdir build; cd build
# cmake -G Ninja ..

...
...
...
-- Found Fontconfig: /opt/homebrew/lib/libfontconfig.dylib (found version "2.16.0")
-- Found Lua: /opt/homebrew/lib/liblua5.4.dylib (found suitable version "5.4.7", minimum required is "5.3")
-- Checking for one of the modules 'imlib2;Imlib2'
CMake Warning at cmake/CCache.cmake:15 (message):
  Neither sccache nor ccache found
Call Stack (most recent call first):
  CMakeLists.txt:44 (include)


-- Detected Compiler: Clang 17.0.0
CMake Warning at 3rdparty/Vc/CMakeLists.txt:34 (message):
  No optimized implementation of the Vc types available for arm64


-- Performing Test check_cxx_compiler_flag__std_c__14
-- Performing Test check_cxx_compiler_flag__std_c__14 - Failed
-- Performing Test check_cxx_compiler_flag__std_c__1y
-- Performing Test check_cxx_compiler_flag__std_c__1y - Failed
-- Performing Test check_cxx_compiler_flag__std_c__11
-- Performing Test check_cxx_compiler_flag__std_c__11 - Failed
-- Performing Test check_cxx_compiler_flag__std_c__0x
-- Performing Test check_cxx_compiler_flag__std_c__0x - Failed
CMake Error at 3rdparty/Vc/CMakeLists.txt:49 (message):
  Vc 1.x requires C++11, better even C++14.  It seems this is not available.
  If this was incorrectly determined please notify
  [email protected]


-- Configuring incomplete, errors occurred!

Version

1.22.1

Which OS/distro are you seeing the problem on?

macOS

Conky config


Stack trace


Relevant log output


thanosz avatar Apr 07 '25 11:04 thanosz

Which compiler are you using?

brndnmtthws avatar Apr 07 '25 13:04 brndnmtthws

# g++ -v
Apple clang version 17.0.0 (clang-1700.0.13.3)
Target: arm64-apple-darwin24.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

thanosz avatar Apr 07 '25 18:04 thanosz

MacOS 15.7.2 and Conky v1.22.2:

# cmake -G Ninja ..
-- CMAKE_C_FLAGS:
-- CMAKE_CXX_FLAGS:
-- 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: RelWithDebInfo
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- curses found.
--   include: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include
--   lib: -L/usr/lib;-lncurses
-- Found Lua: /opt/homebrew/lib/liblua5.4.dylib (found suitable version "5.4.8", minimum required is "5.3")
CMake Warning at cmake/CCache.cmake:15 (message):
  Neither sccache nor ccache found
Call Stack (most recent call first):
  CMakeLists.txt:44 (include)


-- Detected Compiler: Clang 17.0.0
CMake Warning at 3rdparty/Vc/CMakeLists.txt:34 (message):
  No optimized implementation of the Vc types available for arm64


-- No support for auto-detection of the target instruction set/extension
-- Found Lua: /opt/homebrew/lib/liblua5.4.dylib (found version "5.4.8")
Configuration for target conky
-- SOURCE_DIR = /Users/than/depot/repos/public/conky/src
-- BINARY_DIR = /Users/than/depot/repos/public/conky/build/src
-- COMPILE_OPTIONS = $<$<COMPILE_LANG_AND_ID:CXX,Clang>:-stdlib=libc++>;$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-Wno-unknown-warning-option>;$<$<COMPILE_LANG_AND_ID:CXX,GCC>:-Wno-unknown-warning>
-- INCLUDE_DIRECTORIES = /opt/homebrew/include;/Users/than/depot/repos/public/conky/3rdparty/toluapp/include;/Users/than/depot/repos/public/conky/build;/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include;/opt/homebrew/include;/usr/X11R6/include;/opt/homebrew/include/freetype2;/opt/homebrew/include/freetype2;/opt/homebrew/Cellar/fontconfig/2.17.1/include;/opt/homebrew/include;/opt/homebrew/include/lua;/opt/homebrew/Cellar/imlib2/1.12.5/include;/Users/than/depot/repos/public/conky/3rdparty/Vc;/Users/than/depot/repos/public/conky/build/src;/Users/than/depot/repos/public/conky/build/data
-- LINK_LIBRARIES = /opt/homebrew/lib/libintl.dylib;-lncurses;-lm;-L/usr/lib;-lncurses;/opt/homebrew/lib/libX11.dylib;/opt/homebrew/lib/libXext.dylib;/opt/homebrew/lib/libXft.dylib;/opt/homebrew/lib/libfontconfig.dylib;/opt/homebrew/lib/libXext.dylib;/opt/homebrew/lib/libXinerama.dylib;/opt/homebrew/lib/libxcb.dylib;/opt/homebrew/lib/libxcb.dylib;/usr/X11R6/lib/libxcb-errors.dylib;/opt/homebrew/lib/liblua5.4.dylib;-L/opt/homebrew/Cellar/imlib2/1.12.5/lib;-lImlib2;toluapp_lib_static;Vc
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/than/depot/repos/public/conky/build





# cmake --build .
[7/47] Building CXX object src/CMakeFiles/conky.dir/content/specials.cc.o
FAILED: [code=1] src/CMakeFiles/conky.dir/content/specials.cc.o
/usr/bin/c++  -I/opt/homebrew/include -I/Users/than/depot/repos/public/conky/3rdparty/toluapp/include -I/Users/than/depot/repos/public/conky/build -I/usr/X11R6/include -I/opt/homebrew/include/freetype2 -I/opt/homebrew/Cellar/fontconfig/2.17.1/include -I/opt/homebrew/include/lua -I/opt/homebrew/Cellar/imlib2/1.12.5/include -I/Users/than/depot/repos/public/conky/3rdparty/Vc -I/Users/than/depot/repos/public/conky/build/src -I/Users/than/depot/repos/public/conky/build/data -O2 -g -DNDEBUG -std=c++17 -arch arm64 -MD -MT src/CMakeFiles/conky.dir/content/specials.cc.o -MF src/CMakeFiles/conky.dir/content/specials.cc.o.d -o src/CMakeFiles/conky.dir/content/specials.cc.o -c /Users/than/depot/repos/public/conky/src/content/specials.cc
In file included from /Users/than/depot/repos/public/conky/src/content/specials.cc:32:
In file included from /Users/than/depot/repos/public/conky/src/content/../output/gui.h:29:
/Users/than/depot/repos/public/conky/src/content/../output/../geometry.h:125:52: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  125 |   vec(vec<T, Length> &&other) { this->value = other->value; }
      |                                               ~~~~~^~
      |                                                    .
/Users/than/depot/repos/public/conky/src/content/../output/../geometry.h:328:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/content/../output/../geometry.h:328:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
/Users/than/depot/repos/public/conky/src/content/../output/../geometry.h:335:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/content/../output/../geometry.h:335:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
5 errors generated.
[9/47] Building CXX object src/CMakeFiles/conky.dir/main.cc.o
FAILED: [code=1] src/CMakeFiles/conky.dir/main.cc.o
/usr/bin/c++  -I/opt/homebrew/include -I/Users/than/depot/repos/public/conky/3rdparty/toluapp/include -I/Users/than/depot/repos/public/conky/build -I/usr/X11R6/include -I/opt/homebrew/include/freetype2 -I/opt/homebrew/Cellar/fontconfig/2.17.1/include -I/opt/homebrew/include/lua -I/opt/homebrew/Cellar/imlib2/1.12.5/include -I/Users/than/depot/repos/public/conky/3rdparty/Vc -I/Users/than/depot/repos/public/conky/build/src -I/Users/than/depot/repos/public/conky/build/data -O2 -g -DNDEBUG -std=c++17 -arch arm64 -MD -MT src/CMakeFiles/conky.dir/main.cc.o -MF src/CMakeFiles/conky.dir/main.cc.o.d -o src/CMakeFiles/conky.dir/main.cc.o -c /Users/than/depot/repos/public/conky/src/main.cc
In file included from /Users/than/depot/repos/public/conky/src/main.cc:40:
In file included from /Users/than/depot/repos/public/conky/src/output/x11.h:52:
In file included from /Users/than/depot/repos/public/conky/src/output/../lua/llua.h:34:
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:125:52: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  125 |   vec(vec<T, Length> &&other) { this->value = other->value; }
      |                                               ~~~~~^~
      |                                                    .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:328:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:328:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:335:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:335:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
5 errors generated.
[10/47] Building CXX object src/CMakeFiles/conky.dir/core.cc.o
FAILED: [code=1] src/CMakeFiles/conky.dir/core.cc.o
/usr/bin/c++  -I/opt/homebrew/include -I/Users/than/depot/repos/public/conky/3rdparty/toluapp/include -I/Users/than/depot/repos/public/conky/build -I/usr/X11R6/include -I/opt/homebrew/include/freetype2 -I/opt/homebrew/Cellar/fontconfig/2.17.1/include -I/opt/homebrew/include/lua -I/opt/homebrew/Cellar/imlib2/1.12.5/include -I/Users/than/depot/repos/public/conky/3rdparty/Vc -I/Users/than/depot/repos/public/conky/build/src -I/Users/than/depot/repos/public/conky/build/data -O2 -g -DNDEBUG -std=c++17 -arch arm64 -MD -MT src/CMakeFiles/conky.dir/core.cc.o -MF src/CMakeFiles/conky.dir/core.cc.o.d -o src/CMakeFiles/conky.dir/core.cc.o -c /Users/than/depot/repos/public/conky/src/core.cc
In file included from /Users/than/depot/repos/public/conky/src/core.cc:62:
In file included from /Users/than/depot/repos/public/conky/src/output/gui.h:29:
/Users/than/depot/repos/public/conky/src/output/../geometry.h:125:52: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  125 |   vec(vec<T, Length> &&other) { this->value = other->value; }
      |                                               ~~~~~^~
      |                                                    .
/Users/than/depot/repos/public/conky/src/output/../geometry.h:328:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/output/../geometry.h:328:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
/Users/than/depot/repos/public/conky/src/output/../geometry.h:335:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/output/../geometry.h:335:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
5 errors generated.
[12/47] Building CXX object src/CMakeFiles/conky.dir/conky.cc.o
FAILED: [code=1] src/CMakeFiles/conky.dir/conky.cc.o
/usr/bin/c++  -I/opt/homebrew/include -I/Users/than/depot/repos/public/conky/3rdparty/toluapp/include -I/Users/than/depot/repos/public/conky/build -I/usr/X11R6/include -I/opt/homebrew/include/freetype2 -I/opt/homebrew/Cellar/fontconfig/2.17.1/include -I/opt/homebrew/include/lua -I/opt/homebrew/Cellar/imlib2/1.12.5/include -I/Users/than/depot/repos/public/conky/3rdparty/Vc -I/Users/than/depot/repos/public/conky/build/src -I/Users/than/depot/repos/public/conky/build/data -O2 -g -DNDEBUG -std=c++17 -arch arm64 -MD -MT src/CMakeFiles/conky.dir/conky.cc.o -MF src/CMakeFiles/conky.dir/conky.cc.o.d -o src/CMakeFiles/conky.dir/conky.cc.o -c /Users/than/depot/repos/public/conky/src/conky.cc
In file included from /Users/than/depot/repos/public/conky/src/conky.cc:78:
In file included from /Users/than/depot/repos/public/conky/src/output/x11.h:52:
In file included from /Users/than/depot/repos/public/conky/src/output/../lua/llua.h:34:
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:125:52: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  125 |   vec(vec<T, Length> &&other) { this->value = other->value; }
      |                                               ~~~~~^~
      |                                                    .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:328:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:328:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  328 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:335:34: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                            ~~~~~~^~
      |                                  .
/Users/than/depot/repos/public/conky/src/output/../lua/../geometry.h:335:57: error: member reference type 'vec<T, Length>' is not a pointer; did you mean to use '.'?
  335 |     return std::accumulate(buffer->value.begin(), buffer->value.end(), T{0});
      |                                                   ~~~~~~^~
      |                                                         .
5 errors generated.
[18/47] Building CXX object src/CMakeFiles/conky.dir/prioqueue.cc.o
ninja: build stopped: subcommand failed.

thanosz avatar Nov 11 '25 11:11 thanosz

Thank you for the issue report. Yeah, both GCC and Clang on Linux allowed -> operator for some reason. Apple clang 17 definitely supports C++14, maybe the compiler was returning non-zero value because the flags for older standards are removed.

Please try out the fix/apple-geometry branch (git fetch && git checkout fix/apple-geometry) and let us know whether that one compiles now.

Caellian avatar Nov 11 '25 12:11 Caellian

Thank you @Caellian, I was able to compile from fix/apple-geometry branch!

thanosz avatar Nov 11 '25 14:11 thanosz

Alright, thank you for testing it. It will be merged into main sometime soon at which point this issue will be closed automatically.

Caellian avatar Nov 11 '25 18:11 Caellian