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

Installation fails on OS X #12

Closed
Sajonara opened this issue Feb 10, 2015 · 34 comments
Closed

Installation fails on OS X #12

Sajonara opened this issue Feb 10, 2015 · 34 comments

Comments

@Sajonara
Copy link

Hello,

I would like to thank you for p2pvc but I cannot install it on OS X (10.10.3 Beta 1). I have Homebrew installed and did install the depending packages like so, because at least with one package I got an error notice when I first tried to "make" p2pvc:

brew install homebrew/science/opencv
brew install pulseaudio
brew install ncurses

When all those installs are finished I'm still confronted with error messages, when I try to "make" p2pvc:

src/p2plib.c:275:7: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
      ^
src/p2plib.c:275:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
                    ^
src/p2plib.c:278:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &currPacket);
                    ^
src/p2plib.c:280:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
                    ^

Any help would be appreciated.

Kind regards.

@emgram769
Copy link
Contributor

hey, try pulling from the portaudio branch. I've successfully been able to get it working on my OS X machine using that branch. You'll also need to install portaudio: brew install portaudio

git fetch; git checkout portaudio; git pull; make clean; make

@Sajonara
Copy link
Author

I'm sorry @emgram769 I tried as you said but it still outputs these errors.

@emgram769
Copy link
Contributor

what is the output of git branch?

@Sajonara
Copy link
Author

It is

fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
rm -rf objs audio video p2pvc
mkdir -p objs
gcc -Isrc/inc -O2 -Wall `pkg-config --cflags opencv` src/audio.c -c -o objs/audio.o
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
gcc -Isrc/inc -O2 -Wall `pkg-config --cflags opencv` src/display.c -c -o objs/display.o
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
gcc -Isrc/inc -O2 -Wall `pkg-config --cflags opencv` src/p2plib.c -c -o objs/p2plib.o
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
src/p2plib.c:275:7: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
      ^
src/p2plib.c:275:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &prevPacket);
                    ^
src/p2plib.c:278:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
      clock_gettime(CLOCK_MONOTONIC, &currPacket);
                    ^
src/p2plib.c:280: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

@mofarrell
Copy link
Owner

try this. it will directly clone the specified branch
git clone -b portaudio https://github.com/mofarrell/p2pvc.git
then
make
Also make sure you have opencv properly installed.

@hzwzw
Copy link

hzwzw commented Feb 10, 2015

clock_gettime() is not supprted by mac os , can i use gettimeofday() instead?
if (delta == -1) {
gettimeofday(&prevPacket, 0);
// clock_gettime(CLOCK_MONOTONIC, &prevPacket);
delta = 0;
} else {
gettimeofday(&currPacket, 0);
// clock_gettime(CLOCK_MONOTONIC, &currPacket);
delta = currPacket.tv_nsec - prevPacket.tv_nsec;
// clock_gettime(CLOCK_MONOTONIC, &prevPacket);
gettimeofday(&prevPacket, 0);
}

@mofarrell
Copy link
Owner

Probably better using http://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x
We will get to this once one of us can get our hands on a mac to test this with.

Alternatively you could try checking out a revision without the bandwidth information.

@mofarrell
Copy link
Owner

This has now been disabled for OSX on the portaudio branch until we get someone to look at it. If you pull the latest it should compile.

@hzwzw
Copy link

hzwzw commented Feb 10, 2015

i change the code by using http://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x
and compile is ok
and when i input the command "./p2pvc 127.0.0.1 -v" , nothing happened .
how can i help you test @mofarrell

@emgram769
Copy link
Contributor

what version of OS X are you running?

@hzwzw
Copy link

hzwzw commented Feb 10, 2015

os 10.10.1 @emgram769

@Sajonara
Copy link
Author

I downloaded the newest release and tried to "make" it. But the errors remain. I will be following this project and see what future releases will offer me. I'm on 10.10.3 Beta 1.

@emgram769
Copy link
Contributor

hopefully I'll be able to roll out some binaries for OS X soon, but there seem to be issues with 10.10's networking.

@jirutka
Copy link
Contributor

jirutka commented Feb 10, 2015

The same problem on OS X 10.9.5:

$ p2pvc git:(portaudio) make
uname: illegal option -- o
usage: uname [-amnprsv]
mkdir -p objs
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

ncurses 5.9, opencv 2.4.10.1, portaudio 19.20140130

@emgram769
Copy link
Contributor

looks like a bad #ifdef was the cause. it may compile now, but I will update this when I test on a mac.

@Pinwheeler
Copy link

using git clone -b portaudio https://github.com/mofarrell/p2pvc.git I am able to make the project without the clock errors. Execution as ./p2pvc 127.0.0.1 -v causes the application to hang with no error messages, however.

@jirutka
Copy link
Contributor

jirutka commented Feb 10, 2015

Same as @Pinwheeler.

@itsprdp
Copy link

itsprdp commented Feb 10, 2015

Same as @Pinwheeler

@damianesteban
Copy link

Same as @Pinwheeler unfortunately. :(

@emgram769
Copy link
Contributor

the thought is that yosemite is killing sockets with large UDP packets. I've just changed the way that the packets are sent to reduce the size of any individual one. can I confirm that most (if not all) of you are on yosemite? I'm not sure if the newest commit to portaudio will solve any of this, but it may help

@jirutka
Copy link
Contributor

jirutka commented Feb 10, 2015

I’m on Mavericks (I don’t like Yosemite 😼).

@itsprdp
Copy link

itsprdp commented Feb 10, 2015

@emgram769 I'm on Yosemite 10.10.2.
I pulled the latest from portaudio. Still the same. It's not working.

@Haroenv
Copy link
Contributor

Haroenv commented Feb 10, 2015

I get a lot of warnings when using portaudio (I installed all dependencies through brew) (10.10.2):

uname: illegal option -- o
usage: uname [-amnprsv]
mkdir -p objs
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:20:24: warning: unused variable 'prevPacket' [-Wunused-variable]
static struct timespec prevPacket, currPacket;
                       ^
src/p2plib.c:20:36: warning: unused variable 'currPacket' [-Wunused-variable]
static struct timespec prevPacket, currPacket;
                                   ^
2 warnings generated.
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`

I used to have the same issue as @jirtuka

@jirutka
Copy link
Contributor

jirutka commented Feb 10, 2015

I’ve just tried the last revision (5fb2904) of the portaudio branch. The same warnings as @Haroenv and…

$ p2pvc git:(portaudio) ./p2pvc 127.0.0.1 -v
An error occured while using the portaudio stream
Error number: -9998
Error message: Invalid number of channels

@RileyMills
Copy link

Also getting the same massive wall of warnings like @Haroenv (commit 4a34900). I don't ever get an error message, but noting happens when I try to run the program. I believe the audio system is working, as I'll start getting feedback if I leave my speakers on, but the camera never starts.

@damianesteban
Copy link

When I start it up on my Mac (OS X 10.10.2) I get the audio feedback from my mic, and no video. Going to test it out with a friend shortly.

@RileyMills
Copy link

I've done some debugging on my end, and as far as I can tell argv is getting passed in correctly, but the getopt() loop in p2pvc.c never actually finds any args. I have a print statement in the main while portion of the loop that never gets hit:

printf("argc: %d \n", argc);
  printf("argv:\n");

  int i;

  for (i = 0; i < argc; i++) {
    printf("%s\n", argv[i]);
  }

  printf("\n");

  while ((c = getopt (argc, argv, "bvd:A:V:")) != -1) {
    printf("HI\n");
    switch (c) {
      case 'v':
        spawn_video = 1;
        break;
      case 'A':
        audio_port = optarg;
        break;
      case 'V':
        video_port = optarg;
        break;
      case 'd':
        get_dimensions(optarg, &width, &height);
        vopt.width = width;
        vopt.height = height;
        break;
      case 'b':
        vopt.disp_bandwidth = 1;
        break;
      default:
        break;
    }
  }

  fprintf(stdout, "Checking Video.\n");

results in:

$ ./p2pvc 127.0.0.1 -v
Starting up.
argc: 3 
argv:
./p2pvc
127.0.0.1
-v

Checking Video.
Not starting Video.
^CUser defined signal 1: 30

Edit: I suppose I should clarify, I'm on OSX Yosemite 10.10.2

Update:

Just to test things I hardcoded the application to assume I requested video, and video output is working just fine. Of course, I cannot override the default dimensions (As all args are being ignored) but I can get the default video output working.

@jirutka
Copy link
Contributor

jirutka commented Feb 11, 2015

Whoo, the last revision (4bc708d) finally works! 😸

However, video doesn’t look well, but it’s too late, maybe just insufficient light. I’ll try it tomorrow, also with another webcam.

p2pv

iTerm 2

@mofarrell
Copy link
Owner

PortAudio branch has been moved to master. Any new bugs with OSX should create a new issue.

@jirutka
Copy link
Contributor

jirutka commented Feb 11, 2015

I’ve tried an external webcam with FullHD and it looks much better!

p2pvc

@Haroenv
Copy link
Contributor

Haroenv commented Feb 11, 2015

What font are you using? It looks fuller than mine mine. It's a bit dark now, but it didn't change that much when in daylight

@emgram769
Copy link
Contributor

you can now use custom ASCII with the -a flag, if you'd like to mess with different characters to better suit your font

@jirutka
Copy link
Contributor

jirutka commented Feb 11, 2015

@Haroenv It depends on the used font, its size, spacing etc. I’ve used Courier New in the screenshot, it looks “fuller” than Monaco which I usually use.

Picture from my MacBook webcam is also quite dark, this one is from an external webcam.

@dhoepp
Copy link

dhoepp commented Apr 12, 2016

Dustins-MacBook-Pro:p2pvc-master% make 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

this is my life 😭

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