dickontoo / omxmotion

Raspberry Pi motion detector
GNU General Public License v2.0
29 stars 2 forks source link

Build issue #5

Open Hengjie opened 8 years ago

Hengjie commented 8 years ago
pi@pi ~/omxmotion $ sudo apt-get install libavformat-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libavcodec-dev libavresample-dev libavutil-dev
Suggested packages:
  libdc1394-22-dev libgsm1-dev libogg-dev libraw1394-dev libschroedinger-dev libspeex-dev libtheora-dev libvorbis-dev libx11-dev libxext-dev
The following NEW packages will be installed:
  libavcodec-dev libavformat-dev libavresample-dev libavutil-dev
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,084 kB of archives.
After this operation, 11.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavutil-dev armhf 6:11.4-1~deb8u1+rpi1 [179 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavresample-dev armhf 6:11.4-1~deb8u1+rpi1 [90.1 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavcodec-dev armhf 6:11.4-1~deb8u1+rpi1 [3,189 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavformat-dev armhf 6:11.4-1~deb8u1+rpi1 [626 kB]
Fetched 4,084 kB in 5s (706 kB/s)
Selecting previously unselected package libavutil-dev.
(Reading database ... 103747 files and directories currently installed.)
Preparing to unpack .../libavutil-dev_6%3a11.4-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavutil-dev (6:11.4-1~deb8u1+rpi1) ...
Selecting previously unselected package libavresample-dev.
Preparing to unpack .../libavresample-dev_6%3a11.4-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavresample-dev (6:11.4-1~deb8u1+rpi1) ...
Selecting previously unselected package libavcodec-dev.
Preparing to unpack .../libavcodec-dev_6%3a11.4-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavcodec-dev (6:11.4-1~deb8u1+rpi1) ...
Selecting previously unselected package libavformat-dev.
Preparing to unpack .../libavformat-dev_6%3a11.4-1~deb8u1+rpi1_armhf.deb ...
Unpacking libavformat-dev (6:11.4-1~deb8u1+rpi1) ...
Setting up libavutil-dev (6:11.4-1~deb8u1+rpi1) ...
Setting up libavresample-dev (6:11.4-1~deb8u1+rpi1) ...
Setting up libavcodec-dev (6:11.4-1~deb8u1+rpi1) ...
Setting up libavformat-dev (6:11.4-1~deb8u1+rpi1) ...
pi@pi ~/omxmotion $ make
gcc -Wall -Wno-format -g -I/opt/vc/include/IL -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -L/usr/local/lib -I/usr/local/include -O3 -c omxmotion.c
omxmotion.c: In function ‘openoutput’:
omxmotion.c:315:2: warning: implicit declaration of function ‘avformat_alloc_output_context2’ [-Wimplicit-function-declaration]
  r = avformat_alloc_output_context2(&oc, fmt, NULL, url);
  ^
omxmotion.c:360:4: error: ‘AVStream’ has no member named ‘r_frame_rate’
  st->r_frame_rate = framerate;
    ^
Makefile:14: recipe for target 'omxmotion.o' failed
make: *** [omxmotion.o] Error 1
Hengjie commented 8 years ago

I followed readme instructions with ffmpeg but received:

pi@pi ~/ffmpeg $ sudo make install
INSTALL libavdevice/libavdevice.a
/bin/sh: 1: /home/dickon/src/rpi/toolchain/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-ranlib: not found
library.mak:106: recipe for target 'install-libavdevice-static' failed
make: *** [install-libavdevice-static] Error 127

Somehow path for toolchain is hardcoded