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

Author Topic: SFML 2.2 fails to compile.  (Read 4103 times)

0 Members and 1 Guest are viewing this topic.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
SFML 2.2 fails to compile.
« on: January 15, 2015, 10:54:14 am »
Hi!

I'm trying to compile SFML2.2 but I get this following error message when it tries to link the graphic module.

Code: [Select]
Linking CXX shared library ../../../lib/libsfml-graphics.so
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libglew.a(glew.o): réadressage de R_X86_64_32 en vertu de « .rodata » ne peut être utilisé lors de la création d'un objet partagé; recompilez avec -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/libglew.a: error adding symbols: Mauvaise valeur
collect2: erreur: ld a retourné 1 code d'état d'exécution
make[2]: *** [lib/libsfml-graphics.so.2.2.0] Erreur 1
make[1]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Erreur 2
make: *** [all] Erreur 2

What should I do ?

Thanks.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: SFML 2.2 fails to compile.
« Reply #1 on: January 15, 2015, 12:14:06 pm »
That is why I not use compiler translated to Russian.  It is very hard to search with localised error messages. =)

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: SFML 2.2 fails to compile.
« Reply #2 on: January 15, 2015, 03:08:33 pm »
I've tried to recompile with fPIC but it doesn't solve the problem. :/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.2 fails to compile.
« Reply #3 on: January 15, 2015, 03:17:45 pm »
It's probably not related to SFML, but rather to GLEW. Try to recompile an older release, such as SFML 2.1, you should get the same error.

Tell us also more about your environment: which OS (+ version), and which version or GLEW.

In the meantime you can compile the feature/gl_dev_new branch: it doesn't use GLEW anymore.
Laurent Gomila - SFML developer

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: SFML 2.2 fails to compile.
« Reply #4 on: January 15, 2015, 04:21:50 pm »
I've tried the version without glew but, I get this error.

Code: [Select]
#0 0x7ffff776dfe8 (anonymous namespace)::getInternalContext()() (/usr/local/lib/libsfml-window.so.2.2.0:??)
#1 0x7ffff776e425 sf::priv::GlContext::ensureContext() () (/usr/local/lib/libsfml-window.so.2.2.0:??)
#2 0x451d79 odfaeg::graphic::Shader::getShadingLanguageVersionMajor() () (??:??)
#3 0x4081a7 _GLOBAL__sub_I__ZN6odfaeg7graphic6Shader14CurrentTextureE () (??:??)
#4 0x4d870d __libc_csu_init () (??:??)
#5 ?? 0x00007ffff5f3be55 in __libc_start_main (main=0x44d3d6 <main(int, char**)>, argc=1, argv=0x7fffffffe468, init=0x4d86c0 <__libc_csu_init>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe458) (libc-start.c:246)
#6 0x408f29 _start () (??:??)


I think I should try SDL, I'll have to implement some interfaces (similar to the SFML ones) but I think this'll be faster than being blocked with non-sense errors.

SFML 2.1 compiles without any problem.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.2 fails to compile.
« Reply #5 on: January 15, 2015, 04:24:47 pm »
Quote
I think I should try SDL
Yes, please.
Laurent Gomila - SFML developer

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: SFML 2.2 fails to compile.
« Reply #6 on: January 16, 2015, 07:18:33 pm »
I've reinstalled my ubuntu and now the SFML version using xcb is compiling fine, and I've a rendering thread, with a rendering thread my FPS increase from 15 to 24!

But now, that's not all, now I've to rewrite the code of my lib with xcb. :/

And I've also to correct crash with multithreading when I update the game logic. :/

I had probably old gcc package which were still installed on my ubuntu. :/

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: SFML 2.2 fails to compile.
« Reply #7 on: January 16, 2015, 07:21:15 pm »
You should really learn to research the actual root cause of issues instead of just guessing.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: SFML 2.2 fails to compile.
« Reply #8 on: January 16, 2015, 08:14:18 pm »
Ok it works with threads now but the shaders are not applied anymore. :/

Even without threads.
« Last Edit: January 16, 2015, 08:17:06 pm by Lolilolight »

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: SFML 2.2 fails to compile.
« Reply #9 on: January 16, 2015, 09:28:32 pm »
Hmmm, the blendmode sorry, not the shaders.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML 2.2 fails to compile.
« Reply #10 on: January 16, 2015, 10:43:45 pm »
Please stop telling your whole life in every thread you create on this forum. You can now compile SFML 2.2? End of topic.

:/ :/ :/ :/ :/
Laurent Gomila - SFML developer

 

anything