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

Author Topic: Build SFML (and SFGUI) WITHOUT ROOT privileges  (Read 2565 times)

0 Members and 3 Guests are viewing this topic.

fedor.birjukov

  • Newbie
  • *
  • Posts: 1
    • View Profile
Build SFML (and SFGUI) WITHOUT ROOT privileges
« on: April 27, 2012, 10:43:51 am »
Hi!

I'm using SFML + SFGUI in C++. Everything is fine.
The only problem is: I should be able to build my project on every ubuntu linux pc.
SFML depends on some libraries like -lXmu -lXi -lGLU -lGL -lXext -lX11
And I have no idea how to satisfy all that dependencies without installing some packages(libxmuu-dev, libxmuu-headers, ...).

Another problem is: I run 32 bit linux, My program should be able to build on 64 machines as well.

So, I suppose, I should build all that libs, too?
So, I suppose, I should have the source of all the libraries sfml depends on.
But is it realistic? Should I build X11?

Can anybody give me a piece of advice?

Thanks in advance,
Ted Biryukov.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
« Reply #1 on: April 27, 2012, 01:26:06 pm »
Best you read more about compiling of C++ code.
I've never needed root rights to compile anything. SFML should bring all it's dependencies with it.

As for your problem, you only need to download SFML's sourcecode and the newst CMake binary. Then execute CMake which creates a makefile. Aftwards you only need to enter make install and everything gets compiled. Next download SFGUI's sourcecode and repeate. Done.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
« Reply #2 on: April 27, 2012, 01:32:19 pm »
Quote
I've never needed root rights to compile anything
He needs them to install the dependencies, not to compile anything.

Quote
SFML should bring all it's dependencies with it.
Not on Linux!

Quote
As for your problem, you only need to download SFML's sourcecode and the newst CMake binary. Then execute CMake which creates a makefile. Aftwards you only need to enter make install and everything gets compiled. Next download SFGUI's sourcecode and repeate. Done.
Not without the dev packages of all the SFML dependencies :P
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
« Reply #3 on: April 27, 2012, 11:52:21 pm »
He needs them to install the dependencies, not to compile anything.
Not on Linux!
Not without the dev packages of all the SFML dependencies :P

Yeah I kind of realized that too after posting it... ;D
So the only way would be to get root priviliges and install the dev libs? Or is there a way where you'd be able to download the libs speratly and then compile against those?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Re: Build SFML (and SFGUI) WITHOUT ROOT privileges
« Reply #4 on: April 29, 2012, 04:36:36 pm »
The ideal solution would be to use a system's package manager. But at least SFGUI isn't maintained in any, so you have to either include SFGUI sources with your project or, if you're distributing in binary form, link statically so that the required SFGUI code is directly linked in.

One advantage of using CMake for your own project is that you can specify where to look for libraries. Makes it relatively easy to include dependencies in your project, build them separately and then direct CMake to look for the libs in your project's dependency directory.