1. download library sources
$ ls ~/Downloads
opus-1.1.tar.gz libogg-1.3.2.tar.gz
opusfile-0.6.tar.gz openssl-1.0.2a.tar.gz
2. build libopus, libogg
# install libopus
$ tar xvzf opus-1.1.tar.gz
$ cd opus-1.1
$ ./configure CC=arm-linux-gnueabi-gcc --host=arm-none-linux-gnueabi
$ make
$ sudo make install
# install libogg
$ tar xvzf libogg-1.3.2.tar.gz
$ cd libogg-1.3.2
$ ./configure CC=arm-linux-gnueabi-gcc --host=arm-none-linux-gnueabi
$ make
$ sudo make install
# check installation
$ ll -R /usr/local/lib
/usr/local/lib:
-rw-r--r-- 1 root root 51038 Jun 7 17:40 libogg.a
-rwxr-xr-x 1 root root 910 Jun 7 17:40 libogg.la*
lrwxrwxrwx 1 root root 15 Jun 7 17:40 libogg.so -> libogg.so.0.8.2*
lrwxrwxrwx 1 root root 15 Jun 7 17:40 libogg.so.0 -> libogg.so.0.8.2*
-rwxr-xr-x 1 root root 46941 Jun 7 17:40 libogg.so.0.8.2*
-rw-r--r-- 1 root root 1634496 Jun 7 17:38 libopus.a
-rwxr-xr-x 1 root root 921 Jun 7 17:38 libopus.la*
lrwxrwxrwx 1 root root 16 Jun 7 17:38 libopus.so -> libopus.so.0.5.0*
lrwxrwxrwx 1 root root 16 Jun 7 17:38 libopus.so.0 -> libopus.so.0.5.0*
-rwxr-xr-x 1 root root 1044973 Jun 7 17:38 libopus.so.0.5.0*
drwxr-xr-x 2 root root 4096 Jun 7 17:40 pkgconfig/
/usr/local/lib/pkgconfig:
-rw-r--r-- 1 root root 275 Jun 7 17:40 ogg.pc
-rw-r--r-- 1 root root 354 Jun 7 17:38 opus.pc
3. libssl build
# refer to INSTALL guide
$ cat INSTALL | more
# set environment variables
$ export CROSS=arm-linux-gnueabi
$ export CC=${CROSS}-gcc
$ export LD=${CROSS}-ld
$ export AS=${CROSS}-as
$ export AR=${CROSS}-ar
$ tar xvzf openssl-1.0.2a.tar.gz
$ cd openssl-1.0.2a
$ ./Configure --prefix=/usr/local --openssldir=/usr/local shared os/compiler:arm-linux-gnueabi-
$ make
$ sudo make install
# check installation
$ ll -R /usr/local/lib
/usr/local/lib:
drwxr-xr-x 2 root root 4096 Jun 7 18:08 engines/
-rw-r--r-- 1 root root 3545760 Jun 7 18:08 libcrypto.a
-rw-r--r-- 1 root root 677272 Jun 7 18:08 libssl.a
drwxr-xr-x 2 root root 4096 Jun 7 18:08 pkgconfig/
/usr/local/lib/pkgconfig:
-rw-r--r-- 1 root root 256 Jun 7 18:08 libcrypto.pc
-rw-r--r-- 1 root root 286 Jun 7 18:08 libssl.pc
-rw-r--r-- 1 root root 224 Jun 7 18:08 openssl.pc
# libssl, libcrypto convert *.a to *.so
Refer to https://how-to-build-for-arm.wikispaces.com/openssl$ $AR -x libcrypto.a
$ $CC -shared *.o -o libcrypto.so
$ rm *.o
$ $AR -x libssl.a
$ $CC -shared *.o -o libssl.so
$ rm *.o
$ file libcrypto.so libssl.so
libcrypto.so: ELF 32-bit LSB shared object, ARM, EABI4 version 1 (SYSV), dynamically linked, not stripped
libssl.so: ELF 32-bit LSB shared object, ARM, EABI4 version 1 (SYSV), dynamically linked, not stripped
4. libopusfile build
# install opusfile
$ tar xvzf opusfile-0.6.tar.gz
$ cd opusfile-0.6
$ ./configure CC=arm-linux-gnueabi-gcc --host=arm-none-linux-gnueabi
$ make
$ sudo make install
# check installation
$ ll -R /usr/local/lib
/usr/local/lib:
-rw-r--r-- 1 root root 153914 Jun 7 18:45 libopusfile.a
-rwxr-xr-x 1 root root 1017 Jun 7 18:45 libopusfile.la*
lrwxrwxrwx 1 root root 20 Jun 7 18:45 libopusfile.so -> libopusfile.so.0.3.1*
lrwxrwxrwx 1 root root 20 Jun 7 18:45 libopusfile.so.0 -> libopusfile.so.0.3.1*
-rwxr-xr-x 1 root root 156827 Jun 7 18:45 libopusfile.so.0.3.1*
-rw-r--r-- 1 root root 147670 Jun 7 18:45 libopusurl.a
-rwxr-xr-x 1 root root 1055 Jun 7 18:45 libopusurl.la*
lrwxrwxrwx 1 root root 19 Jun 7 18:45 libopusurl.so -> libopusurl.so.0.3.1*
lrwxrwxrwx 1 root root 19 Jun 7 18:45 libopusurl.so.0 -> libopusurl.so.0.3.1*
-rwxr-xr-x 1 root root 150275 Jun 7 18:45 libopusurl.so.0.3.1*
drwxr-xr-x 2 root root 4096 Jun 7 18:45 pkgconfig/
/usr/local/lib/pkgconfig:
-rw-r--r-- 1 root root 338 Jun 7 18:45 opusfile.pc
-rw-r--r-- 1 root root 303 Jun 7 18:45 opusurl.pc
No comments:
Post a Comment