inspirit / PS3EYEDriver

PS3EYE Camera Driver for OSX and Windows
Other
316 stars 92 forks source link

Segmentation Error #54

Open christophergeek opened 5 years ago

christophergeek commented 5 years ago

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 commented 5 years ago

I am getting a similar issue

mine breaks on one of the function PS3EYECam::ov534_reg_write

currently trying to find a solution

akouminov commented 5 years ago

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 commented 4 years ago

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