mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-05 17:32:54 +03:00
When building tinydtls version, Travis fails with the following error tests/testdriver: error while loading shared libraries: libtinydtls.so: cannot open shared object file: No such file or directory The new version of TinyDTLS now builds a libtinydtls.so file which is linked against in preference to libtinydtls.a when using -ltinydtls, but Travis does not have an installed version libtinydtls.so to load during execution of tests/testbriver - hence failure. scripts/build.sh: Add in LD_LIBRARY_PATH=ext/tinydtls if building tinydtls. BUILDING: configure.ac: With libtinydtls.so being available, there is no need to enforce --disable-shared for tinydtls. Remove this requirement. If --disable-shared is set, link in with libtinydtls.a.
87 lines
2.3 KiB
Plaintext
87 lines
2.3 KiB
Plaintext
To build the libcoap libraries, you need to do the following
|
|
|
|
Unpack the distribution package file
|
|
Change into the top level directory of the unpackaged files
|
|
|
|
TinyDTLS Only
|
|
=============
|
|
|
|
It is possible that you may need to execute the following two commands once to
|
|
get the TinyDTLS code into your project, so the TinyDTLS library can be used.
|
|
|
|
git submodule init
|
|
git submodule update
|
|
|
|
General Building (not for LwIP or Contiki - see below)
|
|
================
|
|
|
|
./autogen.sh
|
|
./configure
|
|
make
|
|
sudo make install
|
|
|
|
./autogen.sh will fail if there is a required package for buildling libcoap
|
|
that is missing. Install the missing package and try ./autogen.sh again.
|
|
|
|
It is possible that you may need to provide some options to ./configure
|
|
to customize your installation.
|
|
|
|
In particular you may need to define which (D)TLS ligrary to use as well as
|
|
disable some building of documentation.
|
|
|
|
General configure instructions can be found in INSTALL, which is built
|
|
by ./autogen.sh
|
|
|
|
./configure --help
|
|
gives the specific options available to libcoap.
|
|
|
|
Some examples are:-
|
|
|
|
# No DTLS
|
|
./configure --enable-tests --disable-documentation --enable-examples --disable-dtls --enable-shared
|
|
|
|
# With TinyDTLS
|
|
./configure --enable-tests --disable-documentation --enable-examples --with-tinydtls --enable-shared
|
|
|
|
Note: FreeBSD requires gmake instead of make when building TinyDTLS - i.e.
|
|
gmake
|
|
sudo gmake install
|
|
|
|
# With OpenSSL
|
|
./configure --with-openssl --enable-tests --enable-shared
|
|
|
|
# With GnuTLS
|
|
./configure --with-gnutls --enable-tests --enable-shared
|
|
|
|
Note: --disable-documentation disables the building of doxygen and man page
|
|
files. If you want to only disable one of them, use --disable-doxygen or
|
|
--disable-manpages. Doxygen requires the program doxygen and man pages require
|
|
the program a2x to build the appropriate files.
|
|
|
|
If you need to rebuild the libcoap-*.{map,sym} files to update any exposed
|
|
function changes, run
|
|
|
|
make update-map-file
|
|
|
|
prior to running 'make'.
|
|
|
|
LwIP
|
|
====
|
|
|
|
./autogen.sh
|
|
./configure --disable-tests --disable-documentation --disable-examples --disable-dtls
|
|
cd examples/lwip
|
|
make
|
|
|
|
Executable is ./server. See examples/lwip/README for further information
|
|
|
|
Contiki
|
|
=======
|
|
|
|
./autogen.sh
|
|
./configure --disable-tests --disable-documentation --disable-examples --disable-dtls
|
|
cd examples/contiki
|
|
make
|
|
|
|
Executable is ./server.minimal-net. See examples/contiki/README for further information
|