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

Author Topic: Problem with Release build on Linux  (Read 2894 times)

0 Members and 2 Guests are viewing this topic.

marmal102

  • Newbie
  • *
  • Posts: 9
    • View Profile
Problem with Release build on Linux
« on: March 26, 2017, 10:52:30 am »
Hello everyone,

I've had some problem with my SFML on Linux for some time.
I used SFML installed from my distro repository so far and everything worked well, but now I had to download the latest version of SFML so I downloaded source code and compiled it with CMake(since the already compiled didn't suit for me).

Now when I try to build my project using CLion in Debug mode - compilation goes successfully but when I try to build it in Release mode I get following error:
No rule to make target '/usr/lib/x86_64-linux-gnu/libsfml-system.so'.

My FindSFML.cmake is okay I guess, I used that one from source code, and it works in Debug Mode.

I would be grateful for any help.
« Last Edit: March 26, 2017, 11:14:10 am by marmal102 »

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Problem with Release build on Linux
« Reply #1 on: March 26, 2017, 02:37:44 pm »
Any chance you forgot installing the release build?

marmal102

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem with Release build on Linux
« Reply #2 on: March 27, 2017, 08:54:34 am »
Unfortunately not, there are both Debug and Release.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problem with Release build on Linux
« Reply #3 on: March 27, 2017, 09:12:36 am »
Can you show us your project file (don't know if it's pure CMake or if CLion has its own format)?
Laurent Gomila - SFML developer

marmal102

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem with Release build on Linux
« Reply #4 on: March 28, 2017, 12:50:37 pm »
cmake_minimum_required(VERSION 3.6)
project(Enyo)

set(CMAKE_CXX_STANDARD 14)
include_directories(include)

set(SOURCE_FILES main.cpp)
add_executable(Test ${SOURCE_FILES})

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_modules")
find_package(SFML REQUIRED system window graphics network audio)
if (SFML_FOUND)
    include_directories(${SFML_INCLUDE_DIR})
    target_link_libraries(Enyo ${SFML_LIBRARIES})
endif ()

In directory cmake_modules there is file FindSFML.cmake that is included to source code of SFML.

marmal102

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem with Release build on Linux
« Reply #5 on: March 30, 2017, 12:38:03 pm »
No idea? :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Problem with Release build on Linux
« Reply #6 on: March 30, 2017, 12:46:43 pm »
No, sorry. Everything looks ok.
Laurent Gomila - SFML developer

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Problem with Release build on Linux
« Reply #7 on: March 30, 2017, 10:59:45 pm »
Could you check whether the actual file exists? And how about the others (like sfml-graphics)? Or maybe there are the debug copies only? And are the files accessible by your user?

marmal102

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem with Release build on Linux
« Reply #8 on: April 01, 2017, 01:19:12 pm »
After myself compilation and installation SFML library I have both the same files for debug and release in: /usr/local/include and lib.

But... There is no such file like: '/usr/lib/x86_64-linux-gnu/libsfml-system.so' whatever it is.