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

OS X Runtime Issue #3

Closed
jamescun opened this issue Feb 9, 2015 · 22 comments
Closed

OS X Runtime Issue #3

jamescun opened this issue Feb 9, 2015 · 22 comments
Assignees

Comments

@jamescun
Copy link

jamescun commented Feb 9, 2015

Running on OS X (10.10.1) results in the following error when built with homebrew pulseaudio and openvc:

W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
@AndreiBarsan
Copy link

I'm getting the same issue on 10.9.4, also on Homebrew. It seems that the first message is because OSX doesn't have the sys/capabilities.h header file. I'm not sure about why the second issue is happening. I guess an option would be to just have a compile-time flag to disable audio until a better solution is available.

@mreynolds0404
Copy link

I get the following errors on 10.10.2:
Home directory not accessible: Permission denied
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

@bkvirendra
Copy link

+1

@bkvirendra
Copy link

Screenshot

Screenshot

@Pinwheeler
Copy link

Also running from Homebrew

I don't know if this is helpful or not but when I run the command

./p2pvc 127.0.0.1 -v

I get the same issue as above and my terminal window freezes, however, if I enter the command

./p2pvc 127.0.0.1

without the -v I get a much more succinct message and the application terminates itself

W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
Connection failure: Connection refused
<my-prompt>$

@hitownz
Copy link

hitownz commented Feb 9, 2015

OS X Yosemite 10.10.2

When I run as admin user i get:

W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
Connection failure: Connection refused

when i run as root i get:
Home directory not accessible: Permission denied
Connection failure: Connection refused
pa_context_connect() failed: Connection refusedCamera dropped frame!

@Pinwheeler
Copy link

did some investigating:

  1. pa_contxt_connect() is a PulseAudio function. Basic recommendations for encountering this error are to rebuild pulse audio (http://askubuntu.com/questions/70560/why-am-i-getting-this-connection-to-pulseaudio-failed-error) Edit: this has not worked for me yet
  2. strange prompt repeating sometimes occurs when -v modifier is not specified in run command
    My prompt is pb-adreesse-osx and here is the string that sometimes occurs
pa_context_connect() failed: Connection refusedpb-adreesse-osx:p2pvc anthony.dreespbpbpb-pb-pb-pb-pb-apppppb-pb-adrepb-apb-adrpb-apbpbppppb-pbpb-apb-adpb-apb-pbpppppb-apb-apbpb-pbpbpbppppbpbpb-pb-apb-pbppbppppppbppppppbppbpbpb-pbpbpbpppp```

there are probably variations of the string, but I haven't run a diff on them or anything. 

@jirutka
Copy link
Contributor

jirutka commented Feb 9, 2015

The same problem on 10.9.5.

@mofarrell
Copy link
Owner

It seems that pulse audio may not be the way to go with OSX. I going to try to switch the audio system to Port Audio.

@emgram769
Copy link
Contributor

if anyone is willing, could you try pulling and testing the portaudio branch? regardless of OS.

@jirutka
Copy link
Contributor

jirutka commented Feb 9, 2015

Yeah, I’m gonna try it.

@jirutka
Copy link
Contributor

jirutka commented Feb 9, 2015

Well, it compiles fine (but with warnings), microphone works, camera turns on, but it doesn’t show any picture.

@emgram769
Copy link
Contributor

did you test ./p2pvc 127.0.0.1 -v?

@jirutka
Copy link
Contributor

jirutka commented Feb 9, 2015

Yeah, of course.

@emgram769
Copy link
Contributor

hmmm. good the mic works but it is surprising that the video doesn't...

@RichHatch
Copy link

I get the same thing. Here is my bash history if these warnings/errors mean anything to you (1 was me not installing portaudio before trying to make).

rhatch: ~/tmp/p2pvc $ git checkout portaudio
Branch portaudio set up to track remote branch portaudio from origin.
Switched to a new branch 'portaudio'
rhatch: ~/tmp/p2pvc $ git pull
Already up-to-date.
rhatch: ~/tmp/p2pvc $ make
uname: illegal option -- o
usage: uname [-amnprsv]
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/audio.c -c -o objs/audio.o
src/audio.c:34:10: fatal error: 'portaudio.h' file not found
#include <portaudio.h>
         ^
1 error generated.
make: *** [objs/audio.o] Error 1
rhatch: ~/tmp/p2pvc $ brew install portaudio
==> Downloading http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/portaudio/19.20140130 --enable-mac-universal=no
==> make install
🍺  /usr/local/Cellar/portaudio/19.20140130: 8 files, 312K, built in 19 seconds
rhatch: ~/tmp/p2pvc $ make
uname: illegal option -- o
usage: uname [-amnprsv]
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/audio.c -c -o objs/audio.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/display.c -c -o objs/display.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/p2plib.c -c -o objs/p2plib.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/p2pvc.c -c -o objs/p2pvc.o
src/p2pvc.c:38:25: warning: sizeof on array function parameter will return size of 'char *' instead of 'char []' [-Wsizeof-array-argument]
  for (i = 0; i < sizeof(dim); i++) {
                        ^
src/p2pvc.c:35:26: note: declared here
void get_dimensions(char dim[], int *width, int *height) {
                         ^
src/p2pvc.c:39:60: warning: sizeof on array function parameter will return size of 'char *' instead of 'char []' [-Wsizeof-array-argument]
    if ((dim[i] == 'x' || dim[i] == ':') && (i + 1 < sizeof(dim))) {
                                                           ^
src/p2pvc.c:35:26: note: declared here
void get_dimensions(char dim[], int *width, int *height) {
                         ^
2 warnings generated.
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_allocation.c -c -o objs/pa_allocation.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_converters.c -c -o objs/pa_converters.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_cpuload.c -c -o objs/pa_cpuload.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_debugprint.c -c -o objs/pa_debugprint.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_dither.c -c -o objs/pa_dither.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_front.c -c -o objs/pa_front.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_process.c -c -o objs/pa_process.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_ringbuffer.c -c -o objs/pa_ringbuffer.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_stream.c -c -o objs/pa_stream.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_trace.c -c -o objs/pa_trace.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_unix_hostapis.c -c -o objs/pa_unix_hostapis.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/pa_unix_util.c -c -o objs/pa_unix_util.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/video.c -c -o objs/video.o
In file included from src/video.c:1:
In file included from /usr/local/Cellar/opencv/2.4.10.1/include/opencv/cv.h:63:
In file included from /usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:47:
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:343:17: warning: unused function 'cvFloor' [-Wunused-function]
CV_INLINE  int  cvFloor( double value )
                ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:360:17: warning: unused function 'cvCeil' [-Wunused-function]
CV_INLINE  int  cvCeil( double value )
                ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:379:15: warning: unused function 'cvIsNaN' [-Wunused-function]
CV_INLINE int cvIsNaN( double value )
              ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:388:15: warning: unused function 'cvIsInf' [-Wunused-function]
CV_INLINE int cvIsInf( double value )
              ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:403:17: warning: unused function 'cvRNG' [-Wunused-function]
CV_INLINE CvRNG cvRNG( int64 seed CV_DEFAULT(-1))
                ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:419:18: warning: unused function 'cvRandReal' [-Wunused-function]
CV_INLINE double cvRandReal( CvRNG* rng )
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:733:17: warning: unused function 'cvMat' [-Wunused-function]
CV_INLINE CvMat cvMat( int rows, int cols, int type, void* data CV_DEFAULT(NULL))
                ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:763:20: warning: unused function 'cvmGet' [-Wunused-function]
CV_INLINE  double  cvmGet( const CvMat* mat, int row, int col )
                   ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:781:18: warning: unused function 'cvmSet' [-Wunused-function]
CV_INLINE  void  cvmSet( CvMat* mat, int row, int col, double value )
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:798:15: warning: unused function 'cvIplDepth' [-Wunused-function]
CV_INLINE int cvIplDepth( int type )
              ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:973:20: warning: unused function 'cvRectToROI' [-Wunused-function]
CV_INLINE  IplROI  cvRectToROI( CvRect rect, int coi )
                   ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:986:20: warning: unused function 'cvROIToRect' [-Wunused-function]
CV_INLINE  CvRect  cvROIToRect( IplROI roi )
                   ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1007:28: warning: unused function 'cvTermCriteria' [-Wunused-function]
CV_INLINE  CvTermCriteria  cvTermCriteria( int type, int max_iter, double epsilon )
                           ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1029:21: warning: unused function 'cvPoint' [-Wunused-function]
CV_INLINE  CvPoint  cvPoint( int x, int y )
                    ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1059:26: warning: unused function 'cvPointTo32f' [-Wunused-function]
CV_INLINE  CvPoint2D32f  cvPointTo32f( CvPoint point )
                         ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1084:26: warning: unused function 'cvPoint3D32f' [-Wunused-function]
CV_INLINE  CvPoint3D32f  cvPoint3D32f( double x, double y, double z )
                         ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1104:26: warning: unused function 'cvPoint2D64f' [-Wunused-function]
CV_INLINE  CvPoint2D64f  cvPoint2D64f( double x, double y )
                         ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1124:26: warning: unused function 'cvPoint3D64f' [-Wunused-function]
CV_INLINE  CvPoint3D64f  cvPoint3D64f( double x, double y, double z )
                         ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1163:25: warning: unused function 'cvSize2D32f' [-Wunused-function]
CV_INLINE  CvSize2D32f  cvSize2D32f( double width, double height )
                        ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1239:22: warning: unused function 'cvRealScalar' [-Wunused-function]
CV_INLINE  CvScalar  cvRealScalar( double val0 )
                     ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1247:22: warning: unused function 'cvScalarAll' [-Wunused-function]
CV_INLINE  CvScalar  cvScalarAll( double val0123 )
                     ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/types_c.h:1762:22: warning: unused function 'cvAttrList' [-Wunused-function]
CV_INLINE CvAttrList cvAttrList( const char** attr CV_DEFAULT(NULL),
                     ^
In file included from src/video.c:1:
In file included from /usr/local/Cellar/opencv/2.4.10.1/include/opencv/cv.h:63:
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:127:18: warning: unused function 'cvDecRefData' [-Wunused-function]
CV_INLINE  void  cvDecRefData( CvArr* arr )
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:148:17: warning: unused function 'cvIncRefData' [-Wunused-function]
CV_INLINE  int  cvIncRefData( CvArr* arr )
                ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:182:20: warning: unused function 'cvGetRow' [-Wunused-function]
CV_INLINE  CvMat*  cvGetRow( const CvArr* arr, CvMat* submat, int row )
                   ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:193:20: warning: unused function 'cvGetCol' [-Wunused-function]
CV_INLINE  CvMat*  cvGetCol( const CvArr* arr, CvMat* submat, int col )
                   ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:222:18: warning: unused function 'cvReleaseMatND' [-Wunused-function]
CV_INLINE  void  cvReleaseMatND( CvMatND** mat )
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:245:25: warning: unused function 'cvGetNextSparseNode' [-Wunused-function]
CV_INLINE CvSparseNode* cvGetNextSparseNode( CvSparseMatIterator* mat_iterator )
                        ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:495:18: warning: unused function 'cvSubS' [-Wunused-function]
CV_INLINE  void  cvSubS( const CvArr* src, CvScalar value, CvArr* dst,
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1057:18: warning: unused function 'cvCloneSeq' [-Wunused-function]
CV_INLINE CvSeq* cvCloneSeq( const CvSeq* seq, CvMemStorage* storage CV_DEFAULT(NULL))
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1100:23: warning: unused function 'cvSetNew' [-Wunused-function]
CV_INLINE  CvSetElem* cvSetNew( CvSet* set_header )
                      ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1115:17: warning: unused function 'cvSetRemoveByPtr' [-Wunused-function]
CV_INLINE  void cvSetRemoveByPtr( CvSet* set_header, void* elem )
                ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1130:22: warning: unused function 'cvGetSetElem' [-Wunused-function]
CV_INLINE CvSetElem* cvGetSetElem( const CvSet* set_header, int idx )
                     ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1302:18: warning: unused function 'cvEllipseBox' [-Wunused-function]
CV_INLINE  void  cvEllipseBox( CvArr* img, CvBox2D box, CvScalar color,
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1398:18: warning: unused function 'cvFont' [-Wunused-function]
CV_INLINE CvFont cvFont( double scale, int thickness CV_DEFAULT(1) )
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1601:15: warning: unused function 'cvReadIntByName' [-Wunused-function]
CV_INLINE int cvReadIntByName( const CvFileStorage* fs, const CvFileNode* map,
              ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1616:18: warning: unused function 'cvReadRealByName' [-Wunused-function]
CV_INLINE double cvReadRealByName( const CvFileStorage* fs, const CvFileNode* map,
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1630:23: warning: unused function 'cvReadStringByName' [-Wunused-function]
CV_INLINE const char* cvReadStringByName( const CvFileStorage* fs, const CvFileNode* map,
                      ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/core/core_c.h:1642:17: warning: unused function 'cvReadByName' [-Wunused-function]
CV_INLINE void* cvReadByName( CvFileStorage* fs, const CvFileNode* map,
                ^
In file included from src/video.c:1:
In file included from /usr/local/Cellar/opencv/2.4.10.1/include/opencv/cv.h:65:
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/imgproc/imgproc_c.h:362:18: warning: unused function 'cvContourPerimeter' [-Wunused-function]
CV_INLINE double cvContourPerimeter( const void* contour )
                 ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/imgproc/imgproc_c.h:486:18: warning: unused function 'cvCalcHist' [-Wunused-function]
CV_INLINE  void  cvCalcHist( IplImage** image, CvHistogram* hist,
                 ^
In file included from src/video.c:1:
In file included from /usr/local/Cellar/opencv/2.4.10.1/include/opencv/cv.h:72:
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/legacy/compat.hpp:617:23: warning: unused function 'cvSURFPoint' [-Wunused-function]
CV_INLINE CvSURFPoint cvSURFPoint( CvPoint2D32f pt, int laplacian,
                      ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/legacy/compat.hpp:698:26: warning: unused function 'cvStarKeypoint' [-Wunused-function]
CV_INLINE CvStarKeypoint cvStarKeypoint(CvPoint pt, int size, float response)
                         ^
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/legacy/compat.hpp:716:32: warning: unused function 'cvStarDetectorParams' [-Wunused-function]
CV_INLINE CvStarDetectorParams cvStarDetectorParams(
                               ^
In file included from src/video.c:2:
In file included from /usr/local/Cellar/opencv/2.4.10.1/include/opencv/highgui.h:47:
/usr/local/Cellar/opencv/2.4.10.1/include/opencv2/highgui/highgui_c.h:589:15: warning: unused function 'CV_FOURCC' [-Wunused-function]
CV_INLINE int CV_FOURCC(char c1, char c2, char c3, char c4)
              ^
45 warnings generated.
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` objs/audio.o objs/display.o objs/p2plib.o objs/p2pvc.o objs/pa_allocation.o objs/pa_converters.o objs/pa_cpuload.o objs/pa_debugprint.o objs/pa_dither.o objs/pa_front.o objs/pa_process.o objs/pa_ringbuffer.o objs/pa_stream.o objs/pa_trace.o objs/pa_unix_hostapis.o objs/pa_unix_util.o objs/video.o -o p2pvc -lpthread -lncurses -lportaudio `pkg-config --libs opencv`

@emgram769
Copy link
Contributor

try pulling the latest from portaudio, it should work now

@AndreiBarsan
Copy link

The build now fails complaining about CLOCK_MONOTONIC not existing (it's not available on OSX):

☁  p2pvc [portaudio] make                  
uname: illegal option -- o
usage: uname [-amnprsv]
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/audio.c -c -o objs/audio.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/display.c -c -o objs/display.o
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/p2plib.c -c -o objs/p2plib.o
src/p2plib.c:276:7: warning: implicit declaration of function 'clock_gettime' is invalid in C99
      [-Wimplicit-function-declaration]
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
      ^
src/p2plib.c:276:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
                    ^
src/p2plib.c:279:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &currPacket);
                    ^
src/p2plib.c:281:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
                    ^
1 warning and 3 errors generated.
make: *** [objs/p2plib.o] Error 1

@Pinwheeler
Copy link

@AndreiBarsan +1

@emgram769
Copy link
Contributor

that may be fixed as of now, I #ifdef'd it away.

@Pinwheeler
Copy link

I think the runtime error has been resolved. The make error appears to be adequately covered in #12. I think you guys can close this one if you want and redirect the remaining conversation on this error to #12

@mofarrell
Copy link
Owner

Resolved. New bugs should open a new issue.

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

10 participants