#cant compile sfml on my project

62 messages · Page 1 of 1 (latest)

silent vault
#

i am trying to start a small humble project and i decided to start on sfml, i do have some knowledge and expereince on cpp but not much on cmake and any of build process (._. srr) anyways here are the error

$ cmake ../
[ 11%] Performing download step (git clone) for 'sfml-populate'
Cloning into 'sfml-src'...
fatal: invalid reference: 2.8.x
CMake Error at sfml-subbuild/sfml-populate-prefix/tmp/sfml-populate-gitclone.cmake:61 (message):
  Failed to checkout tag: '2.8.x'


gmake[2]: *** [CMakeFiles/sfml-populate.dir/build.make:102: sfml-populate-prefix/src/sfml-populate-stamp/sfml-populate-download] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:87: CMakeFiles/sfml-populate.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

CMake Error at /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:1918 (message):
  Build step for sfml failed: 2
Call Stack (most recent call first):
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:2145 (cmake_language)
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
  CMakeLists.txt:12 (FetchContent_MakeAvailable)


-- Configuring incomplete, errors occurred!
versed pathBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

hollow sky
#

2.8.x doesnt exist

#

You need 2.6.x

silent vault
#

hmmm

hollow sky
#

Or 3.x.x

silent vault
#

the tutorial i use, uses the version 2..... if posible lets make it work with 2.x.x

#

anyways new error

#
$ cmake ../
CMake Deprecation Warning at build/_deps/sfml-src/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The C compiler identification is GNU 13.3.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
CMake Error at /snap/cmake/1468/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
  Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
  /snap/cmake/1468/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
  /snap/cmake/1468/share/cmake-4.0/Modules/FindX11.cmake:684 (find_package_handle_standard_args)
  build/_deps/sfml-src/cmake/Macros.cmake:383 (find_package)
  build/_deps/sfml-src/src/SFML/Window/CMakeLists.txt:294 (sfml_find_package)


-- Configuring incomplete, errors occurred!
hollow sky
#

Youre on linux?

#

You need to install dependencies

silent vault
#

yes is that the issue??

thorny granite
#

I'm curious, why are you compiling SFML yourself? Could get it form the system package manager

#

Also cmake in snap is interesting for sure

silent vault
#

i want it to be local on my project....

hollow sky
thorny granite
#

You mean to control the exact version you have?

thorny granite
hollow sky
#

Its such a pain in the ass

silent vault
#

what should i do to fix it 😭

#

i have 0 idea what i should do 😭

thorny granite
#

You should install the dependencies of sfml

hollow sky
#

First one is libx11-dev

thorny granite
#

Probably better to get the full list from the docs and just install all of them

#

Also why are you using SFML 2.x when 3.x exists?

silent vault
#

idk, im following this AI orienred programming yt channel and he use 2.x

#

pezzza's work

thorny granite
#

He's not using it because 2.x is better

#

But either because the tutorial is outdated or just because skill issues

silent vault
#

his vid is created 3 months ago ._.

hollow sky
#

Skill issue it is then

thorny granite
silent vault
#

he mostly make a video about his Ai project what should i say?

thorny granite
#

Nah I mean I'm suspicious of AI stuff in general, it's not about how you said it

silent vault
#

huh??

#

elaborate

thorny granite
#

Okay, I googled this channel, and it's not the kind of AI I assumed

#

Not the "write my code for me" kind of AI, but game AI

silent vault
#

well he is joining the AI research focused on genetic mutation kind of AI

silent vault
#
$  cmake ../
CMake Error at /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject/shared_internal_commands.cmake:463 (configure_file):
  No such file or directory
Call Stack (most recent call first):
  /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject/shared_internal_commands.cmake:1002 (_ep_write_gitclone_script)
  /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject.cmake:3076 (_ep_add_download_command)
  CMakeLists.txt:29 (ExternalProject_Add)


CMake Error at /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject/shared_internal_commands.cmake:541 (configure_file):
  No such file or directory
Call Stack (most recent call first):
  /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject/shared_internal_commands.cmake:1571 (_ep_write_gitupdate_script)
  /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject.cmake:3077 (_ep_add_update_command)
  CMakeLists.txt:29 (ExternalProject_Add)


CMake Error at /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject/shared_internal_commands.cmake:1663 (configure_file):
  No such file or directory
Call Stack (most recent call first):
  /snap/cmake/1468/share/cmake-4.0/Modules/ExternalProject.cmake:3077 (_ep_add_update_command)
  CMakeLists.txt:29 (ExternalProject_Add)


-- Configuring incomplete, errors occurred!

CMake Error at /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:1906 (message):
  CMake step for sfml failed: 1
Call Stack (most recent call first):
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:2145 (cmake_language)
  /snap/cmake/1468/share/cmake-4.0/Modules/FetchContent.cmake:2384 (__FetchContent_Populate)
  CMakeLists.txt:14 (FetchContent_MakeAvailable)

-- Configuring incomplete, errors occurred!
thorny granite
#

Try installing cmake from your system package manager

#

Not from snap

timid bay
#

yes

silent vault
#

ill just show

thorny granite
#

Are you on ubuntu?

silent vault
#

yes

thorny granite
#

I'd install from here then

silent vault
#

anyways whats the issue with cmake from snap??

thorny granite
#

I dunno

#

Maybe it's not the issue at all. But it's the first time I'm seeing anybody install it from snap, and I know the version from the link above works, since we use it at work

#

If changing to that version doesn't help, we'll think of something else

silent vault
#

ey the one from apt works...

#

wow...

thorny granite
#

hehe

silent vault
#

thats wierd

#

welp

#

!solved

versed pathBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity