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

Author Topic: Linux segmentation fault on app start  (Read 5633 times)

0 Members and 1 Guest are viewing this topic.

ritave

  • Newbie
  • *
  • Posts: 26
    • View Profile
Linux segmentation fault on app start
« on: January 24, 2010, 10:28:05 pm »
I've compiled sfml and samples smoothly on ubuntu 9/fedora 12 on MSI Wind u120, but when I try to run any app containing something from sfml it quits and "Segmentation Fault (Core Dumped)" gets written on stdout. Is it something with sfml, or my bad on linux side, since I'm new to compiling on linux?

Tank

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1486
    • View Profile
    • Blog
    • Email
Linux segmentation fault on app start
« Reply #1 on: February 02, 2010, 08:22:22 am »
Can you give a minimal example please?

Are your drivers properly setup? GLX enabled? Also you can try to feed a debugger to get the point where it crashes.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linux segmentation fault on app start
« Reply #2 on: February 02, 2010, 08:56:51 am »
To check your OpenGL and drivers setup, you can try to run the glxgears standard program.
Laurent Gomila - SFML developer

ritave

  • Newbie
  • *
  • Posts: 26
    • View Profile
Linux segmentation fault on app start
« Reply #3 on: February 04, 2010, 11:18:50 am »
Glgears work fine, opengl, X, drivers etc. all work fine. Minimal example is quite basic:
Code: [Select]
#include <SFML/System.hpp>
int main()
{
}

And compiling with:
Code: [Select]
g++ -Wall -o sfml sfmlcheck.cpp -lsfml-system

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linux segmentation fault on app start
« Reply #4 on: February 04, 2010, 11:27:26 am »
Is your OS 32-bits or 64-bits? Which version of SFML do you use? Where did you get it?
Laurent Gomila - SFML developer

ritave

  • Newbie
  • *
  • Posts: 26
    • View Profile
Linux segmentation fault on app start
« Reply #5 on: February 04, 2010, 05:33:02 pm »
32bit, and as always it's sfml2. Got it from download page (from sourceforge to be more exact)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linux segmentation fault on app start
« Reply #6 on: February 04, 2010, 06:54:54 pm »
Are you sure? SFML 2 is not available from sourceforge (unless you browse the repository online, go to the sfml2 branch and click "download GNU tarball").
Laurent Gomila - SFML developer

ritave

  • Newbie
  • *
  • Posts: 26
    • View Profile
Linux segmentation fault on app start
« Reply #7 on: February 05, 2010, 04:53:55 pm »
Sorry, I didn't word it right. I got it from sourceforge svn,

ritave

  • Newbie
  • *
  • Posts: 26
    • View Profile
Linux segmentation fault on app start
« Reply #8 on: February 07, 2010, 10:57:04 pm »
Bump as a really needed cry for help!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linux segmentation fault on app start
« Reply #9 on: February 07, 2010, 11:17:59 pm »
I have no idea, sorry. What you can do is to run gdb and show me the callstack when the crash occurs.
Laurent Gomila - SFML developer

ritave

  • Newbie
  • *
  • Posts: 26
    • View Profile
Linux segmentation fault on app start
« Reply #10 on: February 07, 2010, 11:32:41 pm »
Now for something totally unexpected! After removing ANYTHING containting sfml keyword from my computer, then downloading newest sfml2, after that making, and sudo making instal DESTDIR=/usr/, it works! Yay!
Also I think you may have an unrelated bug in your make install file, you have DESTDIR=/usr/local, which works when compiling. But when trying to start the compiled app (at least on Fedora), the terminal says it can't find sfml-system.so.2.0, it may be better if you changed DESTDIR to /usr/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Linux segmentation fault on app start
« Reply #11 on: February 08, 2010, 08:19:12 am »
Quote
Also I think you may have an unrelated bug in your make install file, you have DESTDIR=/usr/local, which works when compiling. But when trying to start the compiled app (at least on Fedora), the terminal says it can't find sfml-system.so.2.0, it may be better if you changed DESTDIR to /usr/

/usr is usually reserved for apps and libs installed by the system, /usr/local is a better place for user installations. But it shouldn't make any difference, are you sure that you properly removed SFML 1.5 (which was installed in /usr and may conflict with SFML 2)?
Laurent Gomila - SFML developer

ritave

  • Newbie
  • *
  • Posts: 26
    • View Profile
Linux segmentation fault on app start
« Reply #12 on: February 08, 2010, 03:35:23 pm »
Didn't have Sfml 1.5 at all, so that's out of question.

 

anything