Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Error #54

Open
christophergeek opened this issue Mar 4, 2019 · 3 comments
Open

Segmentation Error #54

christophergeek opened this issue Mar 4, 2019 · 3 comments

Comments

@christophergeek
Copy link

christophergeek commented Mar 4, 2019

I know this is only officially supported on Mac and Windows. But I'm trying to get it to work on Ubuntu 18.04 and I'm running into this issue.

These are the steps I took after downloading the source code:

cd sdl
sudo make

I then got the following error:

g++ -I../src -I. -std=c++11 -O3 -I/usr/local/include/libusb-1.0 -I/usr/include/SDL2 -D_REENTRANT -c -o main.o main.cpp
g++ -I../src -I. -std=c++11 -O3 -I/usr/local/include/libusb-1.0 -I/usr/include/SDL2 -D_REENTRANT -c -o ../src/ps3eye_capi.o ../src/ps3eye_capi.cpp
g++ -I../src -I. -std=c++11 -O3 -I/usr/local/include/libusb-1.0 -I/usr/include/SDL2 -D_REENTRANT -c -o ../src/ps3eye.o ../src/ps3eye.cpp
g++ -o ps3eye_sdl main.o ../src/ps3eye_capi.o ../src/ps3eye.o -L/usr/local/lib -lusb-1.0 -lSDL2
/usr/bin/ld: ../src/ps3eye.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
makefile:34: recipe for target 'ps3eye_sdl' failed
make: *** [ps3eye_sdl] Error 1

After digging around, I added the -pthread flag to the makefile like so:

# Also SDL 2.0, e.g. via MacPorts or Homebrew
CXXFLAGS += $(shell sdl2-config --cflags)
LIBS += $(shell sdl2-config --libs) -pthread
endif

Now it compiles fine. However, if I try to then run the example, I get the following error:

$ sudo ./ps3eye_sdl
Segmentation fault

I looked in the source code and it seems to be falling over writing to the sccb_reg, but I'm out of my depth here and don't really know what that is. Any help would be appreciated! Is there a fundamental reason why it won't work on linux?

PS. Both my PSEye cameras are definitely plugged in and recognized by the system (I can view them using vokoscreen for example). And if I unplug them, it will throw the No PS3 Eye camera connected
error.

@akouminov
Copy link

I am getting a similar issue

mine breaks on one of the function PS3EYECam::ov534_reg_write

currently trying to find a solution

@akouminov
Copy link

hi, I have resolved this issue, not sure how if it will break the windows so I'm not sure if I should create a PR. But please let me know if you still want the fix!

@jelle284
Copy link

Hi i have also been having this issue, i am interested in the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants