Closed barracuda156 closed 5 months ago
Building from 855ef848fe0aded503b4100e734e58a3b872a91f instead of 1.1.3 release, I get this error:
[ 38%] Building CXX object CMakeFiles/Hypr.dir/src/helpers/Vector.cpp.o
/opt/local/bin/g++-mp-13 -isystem /opt/local/include/gtkmm-3.0 -isystem /opt/local/lib/gtkmm-3.0/include -isystem /opt/local/include/atkmm-1.6 -isystem /opt/local/include/gtk-3.0/unix-print -isystem /opt/local/include/gdkmm-3.0 -isystem /opt/local/lib/gdkmm-3.0/include -isystem /opt/local/include/giomm-2.4 -isystem /opt/local/lib/giomm-2.4/include -isystem /opt/local/include/gtk-3.0 -isystem /opt/local/include/at-spi2-atk/2.0 -isystem /opt/local/include/at-spi-2.0 -isystem /opt/local/include -isystem /opt/local/include/dbus-1.0 -isystem /opt/local/lib/dbus-1.0/include -isystem /opt/local/include/gio-unix-2.0 -isystem /opt/local/include/cairo -isystem /opt/local/include/atk-1.0 -isystem /opt/local/include/pangomm-1.4 -isystem /opt/local/lib/pangomm-1.4/include -isystem /opt/local/include/glibmm-2.4 -isystem /opt/local/lib/glibmm-2.4/include -isystem /opt/local/include/cairomm-1.0 -isystem /opt/local/lib/cairomm-1.0/include -isystem /opt/local/include/sigc++-2.0 -isystem /opt/local/lib/sigc++-2.0/include -isystem /opt/local/include/pango-1.0 -isystem /opt/local/include/harfbuzz -isystem /opt/local/include/fribidi -isystem /opt/local/include/pixman-1 -isystem /opt/local/include/freetype2 -isystem /opt/local/include/gdk-pixbuf-2.0 -isystem /opt/local/include/libpng16 -isystem /opt/local/include/glib-2.0 -isystem /opt/local/lib/glib-2.0/include -pipe -Os -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc -mmacosx-version-min=10.6 -std=c++17 -Wall -Wextra -MD -MT CMakeFiles/Hypr.dir/src/helpers/Vector.cpp.o -MF CMakeFiles/Hypr.dir/src/helpers/Vector.cpp.o.d -o CMakeFiles/Hypr.dir/src/helpers/Vector.cpp.o -c /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_Hypr/Hypr/work/Hypr-855ef848fe0aded503b4100e734e58a3b872a91f/src/helpers/Vector.cpp
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_Hypr/Hypr/work/Hypr-855ef848fe0aded503b4100e734e58a3b872a91f/src/helpers/Vector.cpp: In member function 'double Vector2D::normalize()':
/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_x11_Hypr/Hypr/work/Hypr-855ef848fe0aded503b4100e734e58a3b872a91f/src/helpers/Vector.cpp:13:22: error: 'abs' was not declared in this scope; did you mean 'fabs'?
13 | const auto max = abs(x) > abs(y) ? abs(x) : abs(y);
| ^~~
| fabs
make[2]: *** [CMakeFiles/Hypr.dir/src/helpers/Vector.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 44%] Building CXX object CMakeFiles/Hypr.dir/src/ipc/ipc.cpp.o
Then, at least recent Clang need the following flag, otherwise build fails:
/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_x11_Hypr/Hypr/work/Hypr-855ef848fe0aded503b4100e734e58a3b872a91f/src/bar/Bar.cpp:594:90: error: non-constant-expression cannot be narrowed from type 'int' to 'uint32_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
uint32_t values[] = {(int)(position.x + (i * (ELEMENTWIDTH + PAD)) + PAD / 2.f), (int)position.y + 1, (int)XCB_STACK_MODE_ABOVE};
^~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_x11_Hypr/Hypr/work/Hypr-855ef848fe0aded503b4100e734e58a3b872a91f/src/bar/Bar.cpp:594:90: note: insert an explicit cast to silence this issue
uint32_t values[] = {(int)(position.x + (i * (ELEMENTWIDTH + PAD)) + PAD / 2.f), (int)position.y + 1, (int)XCB_STACK_MODE_ABOVE};
^~~~~~~~~~~~~~~~~~~
static_cast<uint32_t>( )
UPD. The error reported in the first comment is not relevant for the master branch. See below.
Error:
Context in the log:
P. S. gcc-13.2.0, macOS 10.6