Beaglebone Black(BBB) に Janus WebRTC をインストールしています。janus_config.sh
以下のスクリプト ファイルを実行して、環境変数を設定します。
#!/bin/bash
if [ $# -gt 1 ] || [ $# -eq 0 ]; then
echo "Usage: source /path/to/this/build_script.sh path/where/dependencies/built"
fi
JANUS_PATH=$1
if ! [ -d $JANUS_PATH ]; then
mkdir -v $JANUS_PATH
fi
BUILD==$(./config.guess)
unset JANUS_CFLAGS
JANUS_CFLAGS+="-I$1/include/glib-2.0 "
JANUS_CFLAGS+="-I$1/lib/glib-2.0/include "
JANUS_CFLAGS+="-I$1/include "
JANUS_CFLAGS+="-I$1/include/gio-unix-2.0/gio "
JANUS_CFLAGS+="-I$1/include/nice "
JANUS_CFLAGS+="-I/home/debian/usr/local/include/openssl "
JANUS_CFLAGS+="-I$1/include/opus "
JANUS_CFLAGS+="-I$1/include/sofia-sip-1.12/sofia-resolv "
JANUS_CFLAGS+="-I$1/include/srtp "
JANUS_CFLAGS+="-I$1/include/stun "
JANUS_CFLAGS+="-I$1/include/stun/usages "
JANUS_CFLAGS+="-I$1/lib/libffi-3.2.1/include "
export JANUS_CFLAGS
unset JANUS_LIBS
JANUS_LIBS+="-L$1/lib -lglib-2.0 "
JANUS_LIBS+="-L/home/debian/usr/local/lib -lssl -lcrypto "
JANUS_LIBS+="-L$1/lib -lsrtp -lcrypto "
JANUS_LIBS+="-L$1/lib -lusrsctp"
export JANUS_LIBS
unset LDFLAGS
LDFLAGS+="-L$1/lib "
LDFLAGS+="-L/home/debian/usr/local/lib"
export LDFLAGS
unset LIBS
LIBS+="-lsrtp -lcrypto -lusrsctp -lglib-2.0 -lnice -lgio-2.0 -lgobject-2.0 -lsofia-sip-ua -ljansson -lssl -lgmodule-2.0 "
LIBS+="-lffi -lgthread-2.0 -lz "
export LIBS
unset CPPFLAGS
CPPFLAGS+="-I$1/include "
CPPFLAGS+="-I$1/include/glib-2.0 "
CPPFLAGS+="-I$1/lib/glib-2.0/include "
CPPFLAGS+="-pthread -I$1/include/nice "
CPPFLAGS+="-I$1/include/sofia-sip-1.12"
export CPPFLAGS
unset TRANSPORTS_CFLAGS
TRANSPORTS_CFLAGS+="-I$1/include/glib-2.0 "
TRANSPORTS_CFLAGS+="-I$1/lib/glib-2.0/include "
TRANSPORTS_CFLAGS+="-I$1/include"
export TRANSPORTS_CFLAGS
unset TRANSPORTS_LIBS
TRANSPORTS_LIBS+="-L$1/lib -lglib-2.0 "
TRANSPORTS_LIBS+="-L/home/debian/usr/local/lib -lssl -lcrypto "
TRANSPORTS_LIBS+="-L$1/lib -lsrtp -lcrypto "
TRANSPORTS_LIBS+="-L$1/lib -lusrsctp"
export TRANSPORTS_LIBS
unset PLUGINS_CFLAGS
unset PLUGINS_LIBS
PLUGINS_CFLAGS=$JANUS_CFLAGS
PLUGINS_LIBS=$JANUS_LIBS
export PLUGINS_CFLAGS
export PLUGINS_LIBS
./configure --build=$BUILD --disable-plugin-voicemail --disable-plugin-videoroom --disable-plugin-videocall --disable-plugin-recordplay --disable-plugin-echotest --disable-plugin-audiobridge --disable-websockets --disable-rabbitmq --disable-plugin-sip --disable-docs --prefix=$JANUS_PATH
コマンドsource janus_config.sh $PREFIX
を実行するとエラーが発生します。詳細については、以下の config.log を参照してください。
/*
$ ./configure --build==armv7l-unknown-linux-gnueabihf --disable-plugin-voicemail --disable-plugin-videoroom --disable-plugin-videocall --disable-plugin-recordplay --disable-plugin-echotest --disable-plugin-audiobridge --disable-websockets --disable-rabbitmq --disable-plugin-sip --disable-docs --prefix=/home/debian/Janus/usr
## --------- ##
## Platform. ##
## --------- ##
hostname = beaglebone
uname -m = armv7l
uname -r = 3.8.13-bone70
uname -s = Linux
uname -v = #1 SMP Fri Jan 23 02:15:42 UTC 2015
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/debian/bin
PATH: /home/debian/.linuxbrew/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2466: checking for a BSD-compatible install
configure:2534: result: /usr/bin/install -c
configure:2545: checking whether build environment is sane
configure:2600: result: yes
configure:2751: checking for a thread-safe mkdir -p
configure:2790: result: /bin/mkdir -p
configure:2797: checking for gawk
configure:2827: result: no
configure:2797: checking for mawk
configure:2813: found /usr/bin/mawk
configure:2824: result: mawk
configure:2835: checking whether make sets $(MAKE)
configure:2857: result: yes
configure:2886: checking whether make supports nested variables
configure:2903: result: yes
configure:3040: checking whether make supports nested variables
configure:3057: result: yes
configure:3081: checking for style of include used by make
configure:3109: result: GNU
configure:3180: checking for gcc
configure:3196: found /usr/bin/gcc
configure:3207: result: gcc
configure:3436: checking for C compiler version
configure:3445: gcc --version >&5
gcc (Debian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3456: $? = 0
configure:3445: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10)
configure:3456: $? = 0
configure:3445: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3456: $? = 4
configure:3445: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:3456: $? = 4
configure:3476: checking whether the C compiler works
configure:3498: gcc -I/home/debian/Janus/usr/include -I/home/debian/Janus/usr/include/glib-2.0 -I/home/debian/Janus/usr/lib/glib-2.0/include -pthread -I/home/debian/Janus/usr/include/nice -I/home/debian/Janus/usr/include/sofia-sip-1.12 -L/home/debian/Janus/usr/lib -L/home/debian/usr/local/lib conftest.c -lsrtp -lcrypto -lusrsctp -lglib-2.0 -lnice -lgio-2.0 -lgobject-2.0 -lsofia-sip-ua -ljansson -lssl -lgmodule-2.0 -lffi -lgthread-2.0 -lz >&5
openssl ディレクトリが janus_config.sh で設定したとおりではないため、ここに問題があると思います。openssl を /home/debian/usr/local にインストールします
/home/debian/Janus/usr/lib/libcrypto.a(mem_clr.o): In function `OPENSSL_cleanse':
mem_clr.c:(.text+0x0): multiple definition of `OPENSSL_cleanse'
/home/debian/Janus/usr/lib/libcrypto.a(armv4cpuid.o):(.text+0x1c): first defined here
/home/debian/Janus/usr/lib/libcrypto.a(armcap.o): In function `OPENSSL_cpuid_setup':
armcap.c:(.text.startup+0x0): multiple definition of `OPENSSL_cpuid_setup'
/home/debian/Janus/usr/lib/libcrypto.a(cryptlib.o):cryptlib.c:(.text+0x8d8): first defined here
collect2: error: ld returned 1 exit status
configure:3502: $? = 1
configure:3540: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Janus Gateway"
| #define PACKAGE_TARNAME "janus-gateway"
| #define PACKAGE_VERSION "0.1.0"
| #define PACKAGE_STRING "Janus Gateway 0.1.0"
| #define PACKAGE_BUGREPORT "https://github.com/meetecho/janus-gateway"
| #define PACKAGE_URL "https://janus.conf.meetecho.com"
| #define PACKAGE "janus-gateway"
| #define VERSION "0.1.0"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3545: error: in `/home/debian/Janus/Dependencies/janus-gateway-master':
configure:3547: error: C compiler cannot create executables
See `config.log' for more details;
*/
ここで問題を見つけるのを手伝ってくれませんか?