Open DurandA opened 7 years ago
Hi @DurandA , this is how to do it manually:
Install latest openssl
, libnice
and usrsctp
, you can find them here:
Make sure pkg-config works well. If not, add $OPENSSL_INSTALLED_DIR/lib/pkgconfig
and $LIBNICE_INSTALLED_DIR/lib/pkgconfig
to PKG_CONFIG_PATH
.
$ PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libnice/lib/pkgconfig pkg-config --cflags openssl nice
-D_REENTRANT -I/usr/local/Cellar/openssl/1.0.2j/include -I/usr/local/opt/libnice/include/nice -I/usr/local/opt/libnice/0.1.13/include -I/usr/local/Cellar/glib/2.48.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.48.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include
$ PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libnice/lib/pkgconfig pkg-config --libs openssl nice
-L/usr/local/Cellar/openssl/1.0.2j/lib -L/usr/local/opt/libnice/lib -L/usr/local/Cellar/glib/2.48.2/lib -L/usr/local/opt/gettext/lib -lssl -lcrypto -lnice -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl
If usrsctp
is installed in /usr/local
and you get errors like these,
./sctp.h:12:10: fatal error: 'usrsctp.h' file not found
and
ld: library not found for -lusrsctp
specify CPATH
and LIBRARY_PATH
:
CPATH=/usr/local/include
LIBRARY_PATH=/usr/local/lib
Run make
in src
:
PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libnice/lib/pkgconfig CPATH=/usr/local/include LIBRARY_PATH=/usr/local/lib make
Make sure librtcdc[.so|.dylib]
and its dependences can be found in LD_LIBRARY_PATH
.
Use otool
or ldd
to check that:
otool -L librtcdc.dylib
librtcdc.dylib:
librtcdc.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/local/opt/libnice/lib/libnice.10.dylib (compatibility version 15.0.0, current version 15.1.0)
/usr/local/opt/glib/lib/libgthread-2.0.0.dylib (compatibility version 4801.0.0, current version 4801.2.0)
/usr/local/opt/glib/lib/libgio-2.0.0.dylib (compatibility version 4801.0.0, current version 4801.2.0)
/usr/local/opt/glib/lib/libgobject-2.0.0.dylib (compatibility version 4801.0.0, current version 4801.2.0)
/usr/local/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 4801.0.0, current version 4801.2.0)
/usr/local/opt/gettext/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
/usr/local/lib/libusrsctp.1.dylib (compatibility version 2.0.0, current version 2.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)
or
ldd -r librtcdc.so
Good luck. 😃
After compiling librtcdc.so using
CFLAGS="-std=gnu11" make
using gcc-4.8 (copied to /usr/lib/librtcdc.so) and pyrtcdc.so usingsh compile.sh
, I get _undefined symbol: nice_candidatefree when I try the python example.This is probably due to my own incompetence in build systems. I tried adding -Wl,--no-undefined after CFLAGS in the Makefile but I'm getting a bunch of undefined references to various libraries:
Do you compile with the vanilla Makefile? What am I missing there?