Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Building SFML, stuck at GlContext.cpp  (Read 531 times)

0 Members and 1 Guest are viewing this topic.

rubisetcie

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Building SFML, stuck at GlContext.cpp
« on: February 13, 2025, 11:18:51 am »
Hello everyone.

I don't know if this is the right place to ask for help about this, but I have a problem while trying to build SFML 3.0.0 from source code: when I invoke make, the compilation always gets permanently stuck at GlContext.cpp.o...

I am building for Linux (Debian 13), using GCC 14.2.0. Here are the full logs, including my CMake command:

cmake -G "Unix Makefiles" -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DSFML_BUILD_EXAMPLES=OFF \
-DSFML_BUILD_TEST_SUITE=OFF \
-DSFML_ENABLE_STDLIB_ASSERTIONS=OFF \
-DSFML_ENABLE_SANITIZERS=OFF\
-DSFML_ENABLE_COVERAGE=OFF \
-DSFML_USE_SYSTEM_DEPS=ON \
-DSFML_BUILD_AUDIO=ON \
-DSFML_BUILD_GRAPHICS=ON \
-DSFML_BUILD_NETWORK=ON \
-DSFML_BUILD_WINDOW=ON \
-DSFML_BUILD_DOC=ON \
-DSFML_OPENGL_ES=OFF \
-DSFML_CONFIGURE_EXTRAS=ON ..
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.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
-- Found X11: /usr/include  found components: Xrandr Xcursor Xi
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/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 OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so  found components: OpenGL
-- libudev stable: 1
-- Found UDev: /usr/lib/x86_64-linux-gnu/libudev.so
--    include: /usr/include
-- Found UDev: /usr/include
-- Performing Test ATOMIC_TEST
-- Performing Test ATOMIC_TEST - Success
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so
-- Found Vorbis: /usr/include
-- Found FLAC: /usr/lib/x86_64-linux-gnu/libFLAC.so
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.8") found components: doxygen missing components: dot
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/rubisetcie/SFML/build
rubisetcie@Debian-Matthieu-Vieux:~/SFML/build$ make
[  0%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o
[  1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.o
[  2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.o
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o
[  4%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Utils.cpp.o
[  5%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Vector2.cpp.o
[  6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Vector3.cpp.o
[  7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.o
[  8%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/MemoryInputStream.cpp.o
[  9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Unix/SleepImpl.cpp.o
[ 10%] Linking CXX shared library ../../../lib/libsfml-system.so
[ 10%] Built target sfml-system
[ 11%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Clipboard.cpp.o
[ 12%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Context.cpp.o
[ 13%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Cursor.cpp.o
[ 14%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o
 

... and it gets forever stuck at that point...

Could you please help me?

Thank you in advance!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11145
    • View Profile
    • development blog
    • Email
Re: Building SFML, stuck at GlContext.cpp
« Reply #1 on: February 13, 2025, 12:37:47 pm »
Can you run make VERBOSE=1?

Doesn't exactly sound like an SFML issue if the compiler gets stuck.
How long have you waited for progress?
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

rubisetcie

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Building SFML, stuck at GlContext.cpp
« Reply #2 on: February 13, 2025, 12:55:43 pm »
Here is the output of make VERBOSE=1:

make VERBOSE=1
/usr/bin/cmake -S/home/rubisetcie/SFML -B/home/rubisetcie/SFML/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/rubisetcie/SFML/build/CMakeFiles /home/rubisetcie/SFML/build//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1] : on entre dans le répertoire « /home/rubisetcie/SFML/build »
make  -f src/SFML/System/CMakeFiles/sfml-system.dir/build.make src/SFML/System/CMakeFiles/sfml-system.dir/depend
make[2] : on entre dans le répertoire « /home/rubisetcie/SFML/build »
cd /home/rubisetcie/SFML/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rubisetcie/SFML /home/rubisetcie/SFML/src/SFML/System /home/rubisetcie/SFML/build /home/rubisetcie/SFML/build/src/SFML/System /home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/DependInfo.cmake "--color="
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/MemoryInputStream.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/Unix/SleepImpl.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/Utils.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/Vector2.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Dependencies file "src/SFML/System/CMakeFiles/sfml-system.dir/Vector3.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/System/CMakeFiles/sfml-system.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target sfml-system
make[2] : on quitte le répertoire « /home/rubisetcie/SFML/build »
make  -f src/SFML/System/CMakeFiles/sfml-system.dir/build.make src/SFML/System/CMakeFiles/sfml-system.dir/build
make[2] : on entre dans le répertoire « /home/rubisetcie/SFML/build »
make[2]: rien à faire pour « src/SFML/System/CMakeFiles/sfml-system.dir/build ».
make[2] : on quitte le répertoire « /home/rubisetcie/SFML/build »
[ 10%] Built target sfml-system
make  -f src/SFML/Window/CMakeFiles/sfml-window.dir/build.make src/SFML/Window/CMakeFiles/sfml-window.dir/depend
make[2] : on entre dans le répertoire « /home/rubisetcie/SFML/build »
cd /home/rubisetcie/SFML/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/rubisetcie/SFML /home/rubisetcie/SFML/src/SFML/Window /home/rubisetcie/SFML/build /home/rubisetcie/SFML/build/src/SFML/Window /home/rubisetcie/SFML/build/src/SFML/Window/CMakeFiles/sfml-window.dir/DependInfo.cmake "--color="
Dependencies file "src/SFML/Window/CMakeFiles/sfml-window.dir/Clipboard.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/Window/CMakeFiles/sfml-window.dir/compiler_depend.internal".
Dependencies file "src/SFML/Window/CMakeFiles/sfml-window.dir/Context.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/Window/CMakeFiles/sfml-window.dir/compiler_depend.internal".
Dependencies file "src/SFML/Window/CMakeFiles/sfml-window.dir/Cursor.cpp.o.d" is newer than depends file "/home/rubisetcie/SFML/build/src/SFML/Window/CMakeFiles/sfml-window.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target sfml-window
make[2] : on quitte le répertoire « /home/rubisetcie/SFML/build »
make  -f src/SFML/Window/CMakeFiles/sfml-window.dir/build.make src/SFML/Window/CMakeFiles/sfml-window.dir/build
make[2] : on entre dans le répertoire « /home/rubisetcie/SFML/build »
[ 11%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o
cd /home/rubisetcie/SFML/build/src/SFML/Window && /usr/bin/c++ -DSFML_WINDOW_EXPORTS -I/home/rubisetcie/SFML/include -I/home/rubisetcie/SFML/src -isystem /home/rubisetcie/SFML/extlibs/headers/glad/include -isystem /home/rubisetcie/SFML/extlibs/headers/vulkan -fno-omit-frame-pointer -fno-sanitize-recover=all -fsanitize=undefined -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Wsuggest-override -Wnull-dereference -Wold-style-cast -Wpedantic -Wmisleading-indentation -Wduplicated-cond -Wlogical-op -Wduplicated-branches -MD -MT src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.o -MF CMakeFiles/sfml-window.dir/GlContext.cpp.o.d -o CMakeFiles/sfml-window.dir/GlContext.cpp.o -c /home/rubisetcie/SFML/src/SFML/Window/GlContext.cpp
 

I have tried to wait for four hours at best, while most of the other files took fraction of seconds to compile; so I'm confident it's stuck...

Sure, it may not be an SFML issue. However it only happens to me on SFML, and the same problem occurs when I try on different computers / distros / versions of GCC... it seems I'm the only one to encounter this issue, I don't understand...

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11145
    • View Profile
    • development blog
    • Email
Re: Building SFML, stuck at GlContext.cpp
« Reply #3 on: February 13, 2025, 02:40:30 pm »
I don't see anything special, so I'd just methodically try anything and everything you can think of, for example:

Make sure there aren't any odd file permissions that are preventing the reading/writing.
Check that there aren't processes that could interfere with it.
Make sure there's enough disk space.
Check the syslog for odd errors.
Check your dot files that you don't have some odd alias that is somehow triggered.
Switch your language to English.
Try rebooting your PC.
...
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

rubisetcie

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Building SFML, stuck at GlContext.cpp
« Reply #4 on: February 13, 2025, 04:31:41 pm »
Thank you.

I investigated, and this seem to be related to a known bug of GCC (that unfortunately remains unsolved for 7 years)...

By removing -Wduplicated-branches, it works fine.

Thrasher

  • SFML Team
  • Jr. Member
  • *****
  • Posts: 62
    • View Profile
Re: Building SFML, stuck at GlContext.cpp
« Reply #5 on: February 13, 2025, 05:30:28 pm »
Sorry about that. We ought to stop enabling warnings by default. That would thoroughly fix the problem.

rubisetcie

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Building SFML, stuck at GlContext.cpp
« Reply #6 on: February 13, 2025, 09:22:13 pm »
Thank you, however this time, it's not SFML's fault indeed. :)