Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't cmake on macOS 12.6 #64

Open
SebDominguez opened this issue Jul 19, 2023 · 8 comments
Open

Can't cmake on macOS 12.6 #64

SebDominguez opened this issue Jul 19, 2023 · 8 comments

Comments

@SebDominguez
Copy link

I've play around with this repo using my mac on macOS 13 without any trouble a month ago.

And now I wanted to give it another go using my older Mac stuck on macOS 12.6 and I can't cmake . anymore. Didn't tried on my most recent Mac running Ventura to see if it still can compile the lib but it would be strange if that would be the case. I didn't see any version limitation of this lib for macOS versions.

cmake mbedtls and openssl are installed

➜  ~ brew install cmake mbedtls openssl

Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake
Warning: cmake 3.27.0 is already installed and up-to-date.
To reinstall 3.27.0, run:
  brew reinstall cmake
Warning: mbedtls 3.4.0 is already installed and up-to-date.
To reinstall 3.4.0, run:
  brew reinstall mbedtls
Warning: openssl@3 3.1.1_1 is already installed and up-to-date.
To reinstall 3.1.1_1, run:
  brew reinstall openssl@3

cmake output:

➜  Anjay git:(master) cmake .
-- Looking for dlsym() in library:
-- Looking for dlsym
-- Looking for dlsym - found
-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- DTLS backend: mbedtls
CMake Warning (dev) at deps/avs_commons/CMakeLists.txt:167 (set):
  implicitly converting 'INTEGER' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- Could NOT find MbedTLS (missing: MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDTLS_CRYPTO_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_LIBRARIES MBEDTLS_VERSION)
-- Could NOT find TinyDTLS (missing: TINYDTLS_INCLUDE_DIR TINYDTLS_LIBRARIES TINYDTLS_VERSION)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done
CMake Error in CMakeLists.txt:
  Target "avs_coap" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "avs_coap" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/net/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/net/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/stream/md5/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/stream/md5/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/crypto/CMakeLists.txt:
  Imported target "mbedtls" includes non-existent path

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in deps/avs_commons/src/crypto/CMakeLists.txt:
  Imported target "mbedtls" includes non-existent path

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in deps/avs_coap/CMakeLists.txt:
  Target "avs_net_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_coap/CMakeLists.txt:
  Target "avs_net_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in demo/CMakeLists.txt:
  Target "anjay" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in demo/CMakeLists.txt:
  Target "anjay" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
@kFYatek
Copy link
Contributor

kFYatek commented Jul 19, 2023

Hi,

It seems that CMake cannot find the Mbed TLS library. There may be various reasons for that:

  • You may have leftover CMakeCache.txt from a previous build that refers to directories that no longer exist. You may try removing it (or even cleaning the repository directory completely with something like git clean -ffdx).
  • The mbedtls Homebrew package may not be linked. You may try running brew link mbedtls
  • If none of that helps, you can try passing the Mbed TLS root directory explicitly, e.g. cmake -DMBEDTLS_ROOT_DIR=$(brew --prefix mbedtls) .
  • You can also compile your own copy of Mbed TLS and point the CMake script to wherever you install it using -DMBEDTLS_ROOT_DIR=. You can also use the alternative OpenSSL backend (-DDTLS_BACKEND=openssl; you may need to set -DOPENSSL_ROOT_DIR=... as well) or, for testing purposes, disable the (D)TLS support altogether (-DDTLS_BACKEND=).

I hope that one of these solutions works for you.

@SebDominguez
Copy link
Author

Unfortunately mbedtls was correctly linked.

➜  Anjay git:(master) brew link mbedtls
Warning: Already linked: /usr/local/Cellar/mbedtls/3.4.0
To relink, run:
  brew unlink mbedtls && brew link mbedtls
➜  Anjay git:(master)  brew unlink mbedtls && brew link mbedtls
Unlinking /usr/local/Cellar/mbedtls/3.4.0... 71 symlinks removed.
Linking /usr/local/Cellar/mbedtls/3.4.0... 71 symlinks created.

Trying to cmake again:

➜  Anjay git:(master) cmake .
-- Looking for dlsym() in library:
-- Looking for dlsym
-- Looking for dlsym - found
-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- DTLS backend: mbedtls
CMake Warning (dev) at deps/avs_commons/CMakeLists.txt:167 (set):
  implicitly converting 'INTEGER' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- Could NOT find MbedTLS (missing: MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDTLS_CRYPTO_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_LIBRARIES MBEDTLS_VERSION)
-- Could NOT find TinyDTLS (missing: TINYDTLS_INCLUDE_DIR TINYDTLS_LIBRARIES TINYDTLS_VERSION)
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.7") found components: doxygen
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.7") found components: doxygen missing components: dot
-- Configuring done
CMake Error in CMakeLists.txt:
  Target "avs_coap" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "avs_coap" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/net/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/net/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/stream/md5/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/stream/md5/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/crypto/CMakeLists.txt:
  Imported target "mbedtls" includes non-existent path

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in deps/avs_commons/src/crypto/CMakeLists.txt:
  Imported target "mbedtls" includes non-existent path

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in deps/avs_coap/CMakeLists.txt:
  Target "avs_net_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_coap/CMakeLists.txt:
  Target "avs_net_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in demo/CMakeLists.txt:
  Target "anjay" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in demo/CMakeLists.txt:
  Target "anjay" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
➜  Anjay git:(master)

I've also tried to completely remove the repo directory and downloading it again after tried git clean -ffdx without any success.

➜  ~ rm -rf Anjay
➜  ~ git clone https://github.com/AVSystem/Anjay.git \
    && cd Anjay \
    && git submodule update --init \
    && cmake . \
    && make -j \
    && ./output/bin/demo --endpoint-name $(hostname) --server-uri coap://eu.iot.avsystem.cloud:5683

Cloning into 'Anjay'...
remote: Enumerating objects: 13621, done.
remote: Counting objects: 100% (5585/5585), done.
remote: Compressing objects: 100% (1578/1578), done.
remote: Total 13621 (delta 3745), reused 5567 (delta 3740), pack-reused 8036
Receiving objects: 100% (13621/13621), 6.53 MiB | 18.33 MiB/s, done.
Resolving deltas: 100% (9151/9151), done.
Submodule 'deps/avs_commons' (https://github.com/AVSystem/avs_commons.git) registered for path 'deps/avs_commons'
Submodule 'tests/integration/framework/nsh-lwm2m/powercmd' (https://github.com/dextero/powercmd) registered for path 'tests/integration/framework/nsh-lwm2m/powercmd'
Submodule 'tests/integration/framework/nsh-lwm2m/pymbedtls/src/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'tests/integration/framework/nsh-lwm2m/pymbedtls/src/pybind11'
Cloning into '/Users/sebastien/Anjay/deps/avs_commons'...
Cloning into '/Users/sebastien/Anjay/tests/integration/framework/nsh-lwm2m/powercmd'...
Cloning into '/Users/sebastien/Anjay/tests/integration/framework/nsh-lwm2m/pymbedtls/src/pybind11'...
Submodule path 'deps/avs_commons': checked out 'a227958d88cd9fc689a90d2c336ee0eaa1daf17f'
Submodule path 'tests/integration/framework/nsh-lwm2m/powercmd': checked out '6d3652e9d1a60d7227e95ce943a9d3a6ec6a25bf'
Submodule path 'tests/integration/framework/nsh-lwm2m/pymbedtls/src/pybind11': checked out '80dc998efced8ceb2be59756668a7e90e8bef917'
-- The C compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for dlsym() in library:
-- Looking for dlsym
-- Looking for dlsym - found
-- Looking for include file net/if.h
-- Looking for include file net/if.h - found
-- Looking for getifaddrs
-- Looking for getifaddrs - found
-- Looking for gai_strerror
-- Looking for gai_strerror - found
-- Looking for getnameinfo
-- Looking for getnameinfo - found
-- Looking for inet_ntop
-- Looking for inet_ntop - found
-- Looking for poll
-- Looking for poll - found
-- Looking for recvmsg
-- Looking for recvmsg - found
-- Checking if IN6_IS_ADDR_V4MAPPED is usable
-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- DTLS backend: mbedtls
CMake Warning (dev) at deps/avs_commons/CMakeLists.txt:167 (set):
  implicitly converting 'INTEGER' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for dlsym() in library:
-- Looking for dlsym
-- Looking for dlsym - found
-- Found OpenSSL: /usr/local/Cellar/openssl@3/3.1.1_1/lib/libcrypto.dylib (found version "3.1.1")
-- Could NOT find MbedTLS (missing: MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDTLS_CRYPTO_LIBRARY MBEDTLS_X509_LIBRARY MBEDTLS_LIBRARIES MBEDTLS_VERSION)
-- Could NOT find TinyDTLS (missing: TINYDTLS_INCLUDE_DIR TINYDTLS_LIBRARIES TINYDTLS_VERSION)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Looking for pthread_condattr_setclock
-- Looking for pthread_condattr_setclock - not found
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.7") found components: doxygen
-- Found Git: /opt/nordic/ncs/toolchains/4ef6631da0/bin/git (found version "2.37.3")
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.7") found components: doxygen missing components: dot
* generating self signed certs
* generating self signed certs - done
* generating root cert
* generating root cert - done
* generating client cert
Certificate request self-signature ok
subject=CN = localhost
* generating client cert - done
* generating client2_ca cert
Certificate request self-signature ok
subject=CN = intermediate
* generating client2_ca cert - done
* generating client2 cert
Certificate request self-signature ok
subject=CN = client2
* generating client2 cert - done
* generating server_ca cert
Certificate request self-signature ok
subject=CN = localhost
* generating server_ca cert - done
* generating server cert
Certificate request self-signature ok
subject=CN = 127.0.0.1
* generating server cert - done

NOTE: keytool not found, not generating keystores for Java/Californium

-- Configuring done
CMake Error in CMakeLists.txt:
  Target "avs_coap" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in CMakeLists.txt:
  Target "avs_coap" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/net/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/net/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/stream/md5/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/stream/md5/CMakeLists.txt:
  Target "avs_crypto_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_commons/src/crypto/CMakeLists.txt:
  Imported target "mbedtls" includes non-existent path

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in deps/avs_commons/src/crypto/CMakeLists.txt:
  Imported target "mbedtls" includes non-existent path

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



CMake Error in deps/avs_coap/CMakeLists.txt:
  Target "avs_net_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in deps/avs_coap/CMakeLists.txt:
  Target "avs_net_mbedtls" contains relative path in its
  INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in demo/CMakeLists.txt:
  Target "anjay" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


CMake Error in demo/CMakeLists.txt:
  Target "anjay" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES:

    "MBEDTLS_INCLUDE_DIR-NOTFOUND"


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

using cmake -DMBEDTLS_ROOT_DIR=$(brew --prefix mbedtls) . && make -j on the root directory seems to have successfully compiled the /output/bin/demo binary.

Don't know if the warnings are relevant:

➜  Anjay git:(master) cmake -DMBEDTLS_ROOT_DIR=$(brew --prefix mbedtls) . && make -j
-- Looking for dlsym() in library:
-- Looking for dlsym
-- Looking for dlsym - found
-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- DTLS backend: mbedtls
CMake Warning (dev) at deps/avs_commons/CMakeLists.txt:167 (set):
  implicitly converting 'INTEGER' to 'STRING' type.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Checking if IN6_IS_ADDR_V4MAPPED is usable - yes
-- Could NOT find TinyDTLS (missing: TINYDTLS_INCLUDE_DIR TINYDTLS_LIBRARIES TINYDTLS_VERSION)
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.7") found components: doxygen
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.9.7") found components: doxygen missing components: dot
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sebastien/Anjay
[  1%] Building C object deps/avs_commons/src/compat/threading/pthread/CMakeFiles/avs_compat_threading_pthread.dir/avs_pthread_init_once.c.o
[  2%] Building C object deps/avs_commons/src/compat/threading/pthread/CMakeFiles/avs_compat_threading_pthread.dir/avs_pthread_condvar.c.o
[  2%] Building C object deps/avs_commons/src/algorithm/CMakeFiles/avs_algorithm.dir/avs_base64.c.o
[  3%] Building C object deps/avs_commons/src/compat/threading/pthread/CMakeFiles/avs_compat_threading_pthread.dir/avs_pthread_mutex.c.o
[  3%] Linking C static library ../../output/lib/libavs_algorithm.a
[  3%] Linking C static library ../../../../output/lib/libavs_compat_threading_pthread.a
[  3%] Built target avs_algorithm
[  3%] Built target avs_compat_threading_pthread
[  3%] Building C object deps/avs_commons/src/log/CMakeFiles/avs_log.dir/avs_log.c.o
[  4%] Linking C static library ../../output/lib/libavs_log.a
[  4%] Built target avs_log
[  4%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_cleanup.c.o
[  5%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_hexlify.c.o
[  5%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_numbers.c.o
[  6%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_shared_buffer.c.o
[  6%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_strings.c.o
[  6%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_time.c.o
[  7%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_strerror.c.o
[  8%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/avs_token.c.o
[  9%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/compat/stdlib/avs_memory.c.o
[  9%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/compat/posix/avs_compat_time.c.o
[  9%] Building C object deps/avs_commons/src/utils/CMakeFiles/avs_utils.dir/compat/stdlib/avs_memory_alignfix.c.o
/Users/sebastien/Anjay/deps/avs_commons/src/utils/avs_time.c:69:16: warning: unknown attribute 'optimize' ignored [-Wunknown-attributes]
__attribute__((optimize("-fno-trapv"))) static inline int
               ^~~~~~~~~~~~~~~~~~~~~~
/Users/sebastien/Anjay/deps/avs_commons/src/utils/avs_time.c:109:16: warning: unknown attribute 'optimize' ignored [-Wunknown-attributes]
__attribute__((optimize("-fno-trapv"))) static inline int
               ^~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[ 10%] Linking C static library ../../output/lib/libavs_utils.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_utils.a(avs_memory_alignfix.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_utils.a(avs_memory_alignfix.c.o) has no symbols
[ 10%] Built target avs_utils
[ 10%] Building C object deps/avs_commons/src/list/CMakeFiles/avs_list.dir/avs_list.c.o
[ 11%] Linking C static library ../../output/lib/libavs_list.a
[ 11%] Built target avs_list
[ 12%] Building C object deps/avs_commons/src/sched/CMakeFiles/avs_sched.dir/avs_sched.c.o
[ 12%] Building C object deps/avs_commons/src/buffer/CMakeFiles/avs_buffer.dir/avs_buffer.c.o
[ 12%] Building C object deps/avs_commons/src/compat/threading/atomic_spinlock/CMakeFiles/avs_compat_threading_atomic_spinlock.dir/avs_atomic_spinlock_init_once.c.o
[ 12%] Building C object deps/avs_commons/src/rbtree/CMakeFiles/avs_rbtree.dir/avs_rbtree.c.o
[ 13%] Building C object deps/avs_commons/src/compat/threading/atomic_spinlock/CMakeFiles/avs_compat_threading_atomic_spinlock.dir/avs_atomic_spinlock_mutex.c.o
[ 14%] Building C object deps/avs_commons/src/compat/threading/atomic_spinlock/CMakeFiles/avs_compat_threading_atomic_spinlock.dir/avs_atomic_spinlock_condvar.c.o
[ 14%] Linking C static library ../../output/lib/libavs_buffer.a
[ 14%] Linking C static library ../../../../output/lib/libavs_compat_threading_atomic_spinlock.a
[ 15%] Linking C static library ../../output/lib/libavs_sched.a
[ 16%] Linking C static library ../../output/lib/libavs_rbtree.a
[ 16%] Built target avs_buffer
[ 16%] Built target avs_compat_threading_atomic_spinlock
[ 16%] Built target avs_sched
[ 16%] Built target avs_rbtree
[ 16%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream.c.o
[ 17%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream_buffered.c.o
[ 17%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream_common.c.o
[ 18%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream_file.c.o
[ 18%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream_inbuf.c.o
[ 19%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream_membuf.c.o
[ 20%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream_simple_io.c.o
[ 20%] Building C object deps/avs_commons/src/stream/CMakeFiles/avs_stream.dir/avs_stream_outbuf.c.o
[ 20%] Linking C static library ../../output/lib/libavs_stream.a
[ 20%] Built target avs_stream
[ 20%] Building C object deps/avs_commons/src/stream/net/CMakeFiles/avs_stream_net.dir/avs_netbuf.c.o
[ 20%] Building C object deps/avs_commons/src/url/CMakeFiles/avs_url.dir/avs_url.c.o
[ 20%] Building C object deps/avs_commons/src/persistence/CMakeFiles/avs_persistence.dir/avs_persistence.c.o
[ 21%] Building C object deps/avs_commons/src/stream/net/CMakeFiles/avs_stream_net.dir/avs_stream_net.c.o
[ 23%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_nosec.dir/compat/posix/avs_inet_ntop.c.o
[ 23%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_nosec.dir/avs_net_global.c.o
[ 24%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_nosec.dir/avs_api.c.o
[ 24%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_nosec.dir/avs_addrinfo.c.o
[ 24%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_nosec.dir/compat/posix/avs_compat_addrinfo.c.o
[ 24%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_nosec.dir/compat/posix/avs_net_impl.c.o
[ 25%] Linking C static library ../../../output/lib/libavs_stream_net.a
[ 26%] Linking C static library ../../output/lib/libavs_url.a
[ 27%] Linking C static library ../../output/lib/libavs_persistence.a
[ 28%] Linking C static library ../../output/lib/libavs_net_nosec.a
[ 28%] Built target avs_stream_net
[ 28%] Built target avs_url
[ 28%] Built target avs_persistence
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_net_nosec.a(avs_inet_ntop.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_net_nosec.a(avs_inet_ntop.c.o) has no symbols
[ 28%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/avs_crypto_utils.c.o
[ 29%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_generic.dir/avs_crypto_persistence.c.o
[ 29%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/avs_crypto_persistence.c.o
[ 28%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/avs_crypto_global.c.o
[ 30%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_generic.dir/avs_crypto_global.c.o
[ 31%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/mbedtls/avs_mbedtls_aead.c.o
[ 32%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_generic.dir/avs_crypto_utils.c.o
[ 32%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/mbedtls/avs_mbedtls_data_loader.c.o
[ 32%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_generic.dir/generic/avs_generic_prng.c.o
[ 32%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/mbedtls/avs_mbedtls_hkdf.c.o
[ 33%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/mbedtls/avs_mbedtls_pki.c.o
[ 33%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/mbedtls/avs_mbedtls_global.c.o
[ 34%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/mbedtls/avs_mbedtls_private.c.o
[ 34%] Building C object deps/avs_commons/src/crypto/CMakeFiles/avs_crypto_mbedtls.dir/mbedtls/avs_mbedtls_prng.c.o
[ 34%] Built target avs_net_nosec
[ 35%] Linking C static library ../../output/lib/libavs_crypto_generic.a
[ 36%] Linking C static library ../../output/lib/libavs_crypto_mbedtls.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_aead.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_hkdf.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_pki.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_private.c.o) has no symbols
[ 36%] Built target avs_crypto_generic
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_aead.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_hkdf.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_pki.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_crypto_mbedtls.a(avs_mbedtls_private.c.o) has no symbols
[ 36%] Built target avs_crypto_mbedtls
[ 36%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/avs_addrinfo.c.o
[ 36%] Building C object deps/avs_commons/src/stream/md5/CMakeFiles/avs_stream_md5.dir/avs_stream_mbedtls.c.o
[ 37%] Building C object deps/avs_commons/src/stream/md5/CMakeFiles/avs_stream_md5.dir/avs_md5_common.c.o
[ 37%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/avs_net_global.c.o
[ 38%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/avs_api.c.o
[ 38%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/compat/posix/avs_inet_ntop.c.o
[ 39%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/compat/posix/avs_compat_addrinfo.c.o
[ 40%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/compat/posix/avs_net_impl.c.o
[ 40%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/mbedtls/avs_mbedtls_persistence.c.o
[ 41%] Building C object deps/avs_commons/src/net/CMakeFiles/avs_net_mbedtls.dir/mbedtls/avs_mbedtls_socket.c.o
[ 41%] Linking C static library ../../../output/lib/libavs_stream_md5.a
[ 41%] Built target avs_stream_md5
[ 41%] Linking C static library ../../output/lib/libavs_net_mbedtls.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_net_mbedtls.a(avs_inet_ntop.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: ../../output/lib/libavs_net_mbedtls.a(avs_inet_ntop.c.o) has no symbols
[ 41%] Built target avs_net_mbedtls
[ 41%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/async/avs_coap_async_server.c.o
[ 41%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/async/avs_coap_exchange.c.o
[ 42%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/avs_coap_code_utils.c.o
[ 43%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/async/avs_coap_async_client.c.o
[ 44%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/avs_coap_common_utils.c.o
[ 44%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/avs_coap_ctx.c.o
[ 44%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/options/avs_coap_iterator.c.o
[ 44%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/options/avs_coap_options.c.o
[ 45%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/options/avs_coap_option.c.o
[ 46%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/udp/avs_coap_udp_ctx.c.o
[ 46%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/udp/avs_coap_udp_msg.c.o
[ 47%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/udp/avs_coap_udp_msg_cache.c.o
[ 47%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/udp/avs_coap_udp_tx_params.c.o
[ 48%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/tcp/avs_coap_tcp_ctx.c.o
[ 49%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/streaming/avs_coap_streaming_client.c.o
[ 49%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/tcp/avs_coap_tcp_utils.c.o
[ 49%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/tcp/avs_coap_tcp_pending_requests.c.o
[ 50%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/tcp/avs_coap_tcp_msg.c.o
[ 50%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/streaming/avs_coap_streaming_server.c.o
[ 51%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/tcp/avs_coap_tcp_signaling.c.o
[ 52%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/avs_coap_observe.c.o
[ 52%] Building C object deps/avs_coap/CMakeFiles/avs_coap.dir/src/tcp/avs_coap_tcp_header.c.o
[ 52%] Linking C static library ../../output/lib/libavs_coap.a
[ 52%] Built target avs_coap
[ 52%] Building C object CMakeFiles/anjay.dir/src/core/anjay_bootstrap_core.c.o
[ 53%] Building C object CMakeFiles/anjay.dir/src/core/anjay_core.c.o
[ 55%] Building C object CMakeFiles/anjay.dir/src/core/anjay_event_loop.c.o
[ 55%] Building C object CMakeFiles/anjay.dir/src/core/anjay_io_utils.c.o
[ 55%] Building C object CMakeFiles/anjay.dir/src/core/anjay_lwm2m_send.c.o
[ 55%] Building C object CMakeFiles/anjay.dir/src/core/anjay_dm_core.c.o
[ 55%] Building C object CMakeFiles/anjay.dir/src/core/anjay_access_utils.c.o
[ 55%] Building C object CMakeFiles/anjay.dir/src/core/anjay_io_core.c.o
[ 57%] Building C object CMakeFiles/anjay.dir/src/core/anjay_servers_utils.c.o
[ 57%] Building C object CMakeFiles/anjay.dir/src/core/anjay_notify.c.o
[ 57%] Building C object CMakeFiles/anjay.dir/src/core/anjay_raw_buffer.c.o
[ 57%] Building C object CMakeFiles/anjay.dir/src/core/anjay_stats.c.o
[ 58%] Building C object CMakeFiles/anjay.dir/src/core/anjay_utils_core.c.o
[ 58%] Building C object CMakeFiles/anjay.dir/src/core/attr_storage/anjay_attr_storage_persistence.c.o
[ 59%] Building C object CMakeFiles/anjay.dir/src/core/attr_storage/anjay_attr_storage.c.o
[ 59%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_discover.c.o
[ 59%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_dm_create.c.o
[ 60%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_query.c.o
[ 60%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_json_encoder.c.o
[ 61%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_json_like_decoder.c.o
[ 62%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_dm_read.c.o
[ 62%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_modules.c.o
[ 63%] Building C object CMakeFiles/anjay.dir/src/core/downloader/anjay_downloader.c.o
[ 63%] Building C object CMakeFiles/anjay.dir/src/core/downloader/anjay_http.c.o
[ 63%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_batch_builder.c.o
[ 64%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_cbor_in.c.o
[ 65%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_base64_out.c.o
[ 65%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_dm_write_attrs.c.o
[ 65%] Building C object CMakeFiles/anjay.dir/src/core/downloader/anjay_coap.c.o
[ 66%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_cbor_out.c.o
[ 66%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_dynamic.c.o
[ 66%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_opaque.c.o
[ 67%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_output_buf.c.o
[ 66%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_dm_execute.c.o
[ 69%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_tlv_in.c.o
[ 69%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_senml_like_encoder.c.o
[ 69%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_senml_in.c.o
[ 69%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_text.c.o
[ 70%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_dm_handlers.c.o
[ 71%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_dm_attributes.c.o
[ 71%] Building C object CMakeFiles/anjay.dir/src/core/dm/anjay_dm_write.c.o
[ 71%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_senml_like_out.c.o
[ 73%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_input_buf.c.o
[ 73%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_common.c.o
[ 74%] Building C object CMakeFiles/anjay.dir/src/core/io/json/anjay_json_decoder.c.o
[ 74%] Building C object CMakeFiles/anjay.dir/src/core/io/cbor/anjay_cbor_encoder_ll.c.o
[ 74%] Building C object CMakeFiles/anjay.dir/src/core/observe/anjay_observe_planning.c.o
[ 75%] Building C object CMakeFiles/anjay.dir/src/core/io/anjay_tlv_out.c.o
[ 75%] Building C object CMakeFiles/anjay.dir/src/core/observe/anjay_observe_core.c.o
[ 76%] Building C object CMakeFiles/anjay.dir/src/core/io/cbor/anjay_senml_cbor_encoder.c.o
[ 76%] Building C object CMakeFiles/anjay.dir/src/core/io/cbor/anjay_json_like_cbor_decoder.c.o
[ 77%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_activate.c.o
[ 77%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_connection_ip.c.o
[ 77%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_security_generic.c.o
[ 77%] Building C object CMakeFiles/anjay.dir/src/modules/fw_update/anjay_fw_update.c.o
[ 78%] Building C object CMakeFiles/anjay.dir/src/modules/ipso/anjay_ipso_button.c.o
[ 79%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_connections.c.o
[ 80%] Building C object CMakeFiles/anjay.dir/src/modules/access_control/anjay_access_control_handlers.c.o
[ 80%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_servers_internal.c.o
[ 80%] Building C object CMakeFiles/anjay.dir/src/modules/advanced_fw_update/anjay_advanced_fw_update.c.o
[ 80%] Building C object CMakeFiles/anjay.dir/src/modules/access_control/anjay_access_control_persistence.c.o
[ 81%] Building C object CMakeFiles/anjay.dir/src/modules/access_control/anjay_mod_access_control.c.o
[ 82%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_server_connections.c.o
[ 82%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_register.c.o
[ 83%] Building C object CMakeFiles/anjay.dir/src/core/servers/anjay_reload.c.o
[ 84%] Building C object CMakeFiles/anjay.dir/src/modules/factory_provisioning/anjay_provisioning.c.o
[ 85%] Building C object CMakeFiles/anjay.dir/src/modules/ipso/anjay_ipso_3d_sensor.c.o
[ 85%] Building C object CMakeFiles/anjay.dir/src/modules/ipso/anjay_ipso_basic_sensor.c.o
[ 85%] Building C object CMakeFiles/anjay.dir/src/modules/security/anjay_mod_security.c.o
[ 86%] Building C object CMakeFiles/anjay.dir/src/modules/server/anjay_server_utils.c.o
[ 86%] Building C object CMakeFiles/anjay.dir/src/modules/server/anjay_server_transaction.c.o
[ 87%] Building C object CMakeFiles/anjay.dir/src/modules/server/anjay_mod_server.c.o
/Users/sebastien/Anjay/src/core/anjay_utils_core.c:552:19: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                  ANJAY_DM_OID_SECURITY, security_iid);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/sebastien/Anjay/src/anjay_modules/anjay_dm_utils.h:790:31: note: expanded from macro 'ANJAY_DM_OID_SECURITY'
#define ANJAY_DM_OID_SECURITY 0
                              ^
/Users/sebastien/Anjay/src/core/anjay_utils_private.h:31:42: note: expanded from macro 'anjay_log'
#define anjay_log(...) _anjay_log(anjay, __VA_ARGS__)
                       ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/src/anjay_modules/anjay_utils_core.h:45:37: note: expanded from macro '_anjay_log'
#    define _anjay_log(...) avs_log(__VA_ARGS__)
                            ~~~~~~~~^~~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log.h:307:50: note: expanded from macro 'AVS_LOG_NOT_EMPTY'
    AVS_LOG__##Level(l, AVS_QUOTE_MACRO(Module), __VA_ARGS__)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log_impl.h:82:67: note: expanded from macro 'AVS_LOG__WARNING'
#    define AVS_LOG__WARNING(...) AVS_LOG_IMPL__(AVS_LOG_WARNING, __VA_ARGS__)
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log_impl.h:66:40: note: expanded from macro 'AVS_LOG_IMPL__'
                                       __VA_ARGS__)
                                       ^~~~~~~~~~~
/Users/sebastien/Anjay/src/core/anjay_utils_core.c:559:19: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                  ANJAY_DM_OID_SECURITY, security_iid);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/sebastien/Anjay/src/anjay_modules/anjay_dm_utils.h:790:31: note: expanded from macro 'ANJAY_DM_OID_SECURITY'
#define ANJAY_DM_OID_SECURITY 0
                              ^
/Users/sebastien/Anjay/src/core/anjay_utils_private.h:31:42: note: expanded from macro 'anjay_log'
#define anjay_log(...) _anjay_log(anjay, __VA_ARGS__)
                       ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/src/anjay_modules/anjay_utils_core.h:45:37: note: expanded from macro '_anjay_log'
#    define _anjay_log(...) avs_log(__VA_ARGS__)
                            ~~~~~~~~^~~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log.h:307:50: note: expanded from macro 'AVS_LOG_NOT_EMPTY'
    AVS_LOG__##Level(l, AVS_QUOTE_MACRO(Module), __VA_ARGS__)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log_impl.h:80:63: note: expanded from macro 'AVS_LOG__DEBUG'
#    define AVS_LOG__DEBUG(...) AVS_LOG_IMPL__(AVS_LOG_DEBUG, __VA_ARGS__)
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log_impl.h:66:40: note: expanded from macro 'AVS_LOG_IMPL__'
                                       __VA_ARGS__)
                                       ^~~~~~~~~~~
[ 87%] Building C object CMakeFiles/anjay.dir/src/modules/security/anjay_security_utils.c.o
[ 88%] Building C object CMakeFiles/anjay.dir/src/modules/server/anjay_server_persistence.c.o
[ 88%] Building C object CMakeFiles/anjay.dir/src/modules/security/anjay_security_transaction.c.o
[ 89%] Building C object CMakeFiles/anjay.dir/src/modules/security/anjay_security_persistence.c.o
/Users/sebastien/Anjay/src/core/servers/anjay_security_generic.c:396:51: warning: format specifies type 'unsigned short' but the argument has type 'int' [-Wformat]
                      (*out_u32_ciphersuites)[i], UINT16_MAX);
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/stdint.h:108:27: note: expanded from macro 'UINT16_MAX'
#define UINT16_MAX        65535
                          ^~~~~
/Users/sebastien/Anjay/src/core/servers/../anjay_utils_private.h:31:42: note: expanded from macro 'anjay_log'
#define anjay_log(...) _anjay_log(anjay, __VA_ARGS__)
                       ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/src/anjay_modules/anjay_utils_core.h:45:37: note: expanded from macro '_anjay_log'
#    define _anjay_log(...) avs_log(__VA_ARGS__)
                            ~~~~~~~~^~~~~~~~~~~~
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log.h:307:50: note: expanded from macro 'AVS_LOG_NOT_EMPTY'
    AVS_LOG__##Level(l, AVS_QUOTE_MACRO(Module), __VA_ARGS__)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log_impl.h:83:63: note: expanded from macro 'AVS_LOG__ERROR'
#    define AVS_LOG__ERROR(...) AVS_LOG_IMPL__(AVS_LOG_ERROR, __VA_ARGS__)
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/Users/sebastien/Anjay/deps/avs_commons/include_public/avsystem/commons/avs_log_impl.h:66:40: note: expanded from macro 'AVS_LOG_IMPL__'
                                       __VA_ARGS__)
                                       ^~~~~~~~~~~
2 warnings generated.
1 warning generated.
[ 89%] Linking C static library output/lib/libanjay.a
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: output/lib/libanjay.a(anjay_http.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: output/lib/libanjay.a(anjay_advanced_fw_update.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: output/lib/libanjay.a(anjay_http.c.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: output/lib/libanjay.a(anjay_advanced_fw_update.c.o) has no symbols
[ 89%] Built target anjay
[ 89%] Building C object demo/CMakeFiles/demo.dir/demo.c.o
[ 90%] Building C object demo/CMakeFiles/demo.dir/demo_args.c.o
[ 90%] Building C object demo/CMakeFiles/demo.dir/demo_cmds.c.o
[ 90%] Building C object demo/CMakeFiles/demo.dir/demo_time.c.o
[ 91%] Building C object demo/CMakeFiles/demo.dir/demo_utils.c.o
[ 92%] Building C object demo/CMakeFiles/demo.dir/objects/apn_conn_profile.c.o
[ 92%] Building C object demo/CMakeFiles/demo.dir/objects/binary_app_data_container.c.o
[ 93%] Building C object demo/CMakeFiles/demo.dir/objects/cell_connectivity.c.o
[ 94%] Building C object demo/CMakeFiles/demo.dir/objects/ext_dev_info.c.o
[ 94%] Building C object demo/CMakeFiles/demo.dir/objects/geopoints.c.o
[ 95%] Building C object demo/CMakeFiles/demo.dir/objects/portfolio.c.o
[ 95%] Building C object demo/CMakeFiles/demo.dir/objects/conn_monitoring.c.o
[ 95%] Building C object demo/CMakeFiles/demo.dir/objects/location.c.o
[ 96%] Building C object demo/CMakeFiles/demo.dir/objects/device.c.o
[ 96%] Building C object demo/CMakeFiles/demo.dir/objects/conn_statistics.c.o
[ 96%] Building C object demo/CMakeFiles/demo.dir/objects/event_log.c.o
[ 97%] Building C object demo/CMakeFiles/demo.dir/objects/download_diagnostics.c.o
[ 98%] Building C object demo/CMakeFiles/demo.dir/objects/ip_ping.c.o
[ 99%] Building C object demo/CMakeFiles/demo.dir/firmware_update.c.o
[ 99%] Building C object demo/CMakeFiles/demo.dir/objects/ipso_objects.c.o
[ 99%] Building C object demo/CMakeFiles/demo.dir/objects/test.c.o
/Users/sebastien/Anjay/demo/objects/ip_ping.c:344:34: warning: passing 'unsigned int *' to parameter of type 'int *' converts between pointers to integer types with different sign [-Wpointer-sign]
            &ping->stats.state_, &(unsigned int) { IP_PING_STATE_IN_PROGRESS },
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/stdatomic.h:130:112: note: expanded from macro 'atomic_compare_exchange_strong'
#define atomic_compare_exchange_strong(object, expected, desired) __c11_atomic_compare_exchange_strong(object, expected, desired, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
                                                                                                               ^~~~~~~~
1 warning generated.
[100%] Linking C executable ../output/bin/demo
[100%] Built target demo

How do I compile the example project now?

➜  BC-ObjectImplementation git:(master) cmake .
CMake Error at CMakeLists.txt:9 (find_package):
  By not providing "Findanjay.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "anjay", but
  CMake did not find one.

  Could not find a package configuration file provided by "anjay" with any of
  the following names:

    anjayConfig.cmake
    anjay-config.cmake

  Add the installation prefix of "anjay" to CMAKE_PREFIX_PATH or set
  "anjay_DIR" to a directory containing one of the above files.  If "anjay"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/Users/sebastien/Anjay/examples/tutorial/BC-ObjectImplementation/CMakeFiles/CMakeOutput.log".
See also "/Users/sebastien/Anjay/examples/tutorial/BC-ObjectImplementation/CMakeFiles/CMakeError.log".

If that's help:
CMakeOutput.log
CMakeError.log

@kFYatek
Copy link
Contributor

kFYatek commented Jul 19, 2023

How do I compile the example project now?

If you just want to get the example projects compiled, you can run make examples.

If you want to follow the tutorials completely, then you would need to run make install (you may need to use superuser privileges for that, i.e., sudo make install) to install the library, so that CMake will be able to find it when compiling application projects.

@SebDominguez
Copy link
Author

Ok after running sudo make install I can successfully run cmake -DMBEDTLS_ROOT_DIR=$(brew --prefix mbedtls) . && make:

➜  BC-ObjectImplementation git:(master) cmake -DMBEDTLS_ROOT_DIR=$(brew --prefix mbedtls) . && make
-- The C compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found MbedTLS: /usr/local/opt/mbedtls/include (found version "3.4.0")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sebastien/Anjay/examples/tutorial/BC-ObjectImplementation
[ 33%] Building C object CMakeFiles/anjay-bc-object-implementation.dir/src/main.c.o
[ 66%] Building C object CMakeFiles/anjay-bc-object-implementation.dir/src/time_object.c.o
[100%] Linking C executable anjay-bc-object-implementation
[100%] Built target anjay-bc-object-implementation

Did I missed out on the Readme.md the sudo make install part?
Also any idea on why MBEDTLS_ROOT_DIR isn't defined?

@kFYatek
Copy link
Contributor

kFYatek commented Jul 20, 2023

Did I missed out on the Readme.md the sudo make install part?

The README file doesn't really describe how to build applications using Anjay. This topic is covered by the Compiling client applications chapter in the documentation.

Also any idea on why MBEDTLS_ROOT_DIR isn't defined?

Homebrew uses non-standard paths when installing libraries. I believe that CMake, if installed also from Homebrew, should be aware of those, but maybe your system lacks some appropriate configuration, or maybe you're using a different version of CMake (e.g. installed manually, or from pip). It's hard to decisively point out a specific reason without access to your system.

@eabase
Copy link

eabase commented Aug 3, 2023

@SebDominguez
You need to also install the mbedtls-dev (development libraries), that's why it failed in the first place.
Please note that different linux distros have different naming conventions for the libraries. It could also be called xxxx-devel etc...

Similary, on some distros, openssl is not using openssl-dev, but libssl-dev.

@kFYatek
Copy link
Contributor

kFYatek commented Aug 4, 2023

@eabase
This is true on a lot of distributions, the suffix is usually -dev on distros from the Debian family and -devel on those from the Red Hat lineage.

However, packages in other distributions are not as granular and include both binaries and headers in the same package - this is true on Arch Linux, for example, and also on Homebrew (third-party, but de facto standard package manager on macOS), which is what the OP was asking about.

@Kucmasz
Copy link
Contributor

Kucmasz commented Jun 19, 2024

@SebDominguez it's been a while, we made some changes in Anjay dependencies regarding compilation on MacOS, brew libraries changes as well of course. Could you comment whether there are still any issues in this matter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants