This is the link command:
Code: Select all
[ 98%] Linking CXX executable main
cd /home/permal/electronics/IO-Card-G3/software/externals/smooth/build/test/main && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/main.dir/link.txt --verbose=1
/home/permal/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-g++ -mlongcalls -nostdlib CMakeFiles/main.dir/generated_test.cpp.obj -o main ../../lib/smooth/libsmooth.a ../hello_world/libhello_world.a ../../lib/smooth/libsmooth.a -Wl,--start-group ../../lib/smooth/esp-idf/vfs/libvfs.a ../../lib/smooth/esp-idf/esp_ringbuf/libesp_ringbuf.a ../../lib/smooth/esp-idf/driver/libdriver.a ../../lib/smooth/esp-idf/esp_event/libesp_event.a ../../lib/smooth/esp-idf/ethernet/libethernet.a ../../lib/smooth/esp-idf/lwip/liblwip.a ../../lib/smooth/esp-idf/tcpip_adapter/libtcpip_adapter.a ../../lib/smooth/esp-idf/app_update/libapp_update.a ../../lib/smooth/esp-idf/spi_flash/libspi_flash.a ../../lib/smooth/esp-idf/mbedtls/libmbedtls.a ../../lib/smooth/esp-idf/mbedtls/mbedtls/library/libmbedtls.a ../../lib/smooth/esp-idf/mbedtls/mbedtls/library/libmbedx509.a ../../lib/smooth/esp-idf/mbedtls/mbedtls/library/libmbedcrypto.a ../../lib/smooth/esp-idf/soc/libsoc.a ../../lib/smooth/esp-idf/log/liblog.a ../../lib/smooth/esp-idf/heap/libheap.a ../../lib/smooth/esp-idf/freertos/libfreertos.a -Wl,--undefined=uxTopUsedPriority ../../lib/smooth/esp-idf/newlib/libnewlib.a -L /home/permal/esp/esp-idf/components/newlib/lib -lc -lm ../../lib/smooth/esp-idf/micro-ecc/libmicro-ecc.a ../../lib/smooth/esp-idf/bootloader_support/libbootloader_support.a ../../lib/smooth/esp-idf/nvs_flash/libnvs_flash.a ../../lib/smooth/esp-idf/pthread/libpthread.a ../../lib/smooth/esp-idf/smartconfig_ack/libsmartconfig_ack.a ../../lib/smooth/esp-idf/wpa_supplicant/libwpa_supplicant.a ../../lib/smooth/esp-idf/xtensa-debug-module/libxtensa-debug-module.a ../../lib/smooth/esp-idf/esp32/libesp32.a -L /home/permal/esp/esp-idf/components/esp32/lib -lcoexist -lcore -lespnow -lmesh -lnet80211 -lphy -lpp -lrtc -lsmartconfig -lwpa2 -lwpa -lwps -L /home/permal/electronics/IO-Card-G3/software/externals/smooth/build/lib/smooth/esp-idf/esp32 -T esp32_out.ld -T /home/permal/electronics/IO-Card-G3/software/externals/smooth/build/lib/smooth/esp-idf/esp32/esp32.common.ld -L /home/permal/esp/esp-idf/components/esp32/ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld /home/permal/esp/esp-idf/components/esp32/libhal.a -lgcc -u call_user_start_cpu0 -u ld_include_panic_highint_hdl ../../lib/smooth/esp-idf/cxx/libcxx.a -lstdc++ -u __cxa_guard_dummy ../../lib/smooth/esp-idf/app_trace/libapp_trace.a -lgcov ../../lib/smooth/esp-idf/asio/libasio.a ../../lib/smooth/esp-idf/jsmn/libjsmn.a ../../lib/smooth/esp-idf/coap/libcoap.a ../../lib/smooth/esp-idf/console/libconsole.a ../../lib/smooth/esp-idf/nghttp/libnghttp.a ../../lib/smooth/esp-idf/esp-tls/libesp-tls.a ../../lib/smooth/esp-idf/esp_adc_cal/libesp_adc_cal.a ../../lib/smooth/esp-idf/tcp_transport/libtcp_transport.a ../../lib/smooth/esp-idf/esp_http_client/libesp_http_client.a ../../lib/smooth/esp-idf/esp_http_server/libesp_http_server.a ../../lib/smooth/esp-idf/esp_https_ota/libesp_https_ota.a ../../lib/smooth/esp-idf/openssl/libopenssl.a ../../lib/smooth/esp-idf/esp_https_server/libesp_https_server.a ../../lib/smooth/esp-idf/expat/libexpat.a ../../lib/smooth/esp-idf/wear_levelling/libwear_levelling.a ../../lib/smooth/esp-idf/sdmmc/libsdmmc.a ../../lib/smooth/esp-idf/fatfs/libfatfs.a ../../lib/smooth/esp-idf/freemodbus/libfreemodbus.a ../../lib/smooth/esp-idf/json/libjson.a ../../lib/smooth/esp-idf/libsodium/liblibsodium.a ../../lib/smooth/esp-idf/mdns/libmdns.a ../../lib/smooth/esp-idf/mqtt/libmqtt.a ../../lib/smooth/esp-idf/protobuf-c/libprotobuf-c.a ../../lib/smooth/esp-idf/protocomm/libprotocomm.a ../../lib/smooth/esp-idf/spiffs/libspiffs.a ../../lib/smooth/esp-idf/ulp/libulp.a ../../lib/smooth/esp-idf/unity/libunity.a ../../lib/smooth/esp-idf/wifi_provisioning/libwifi_provisioning.a
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(pm.o): In function `pm_set_sleep_cycles':
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/pm.c:60: undefined reference to `rtc_slowck_cali'
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(pm.o): In function `pm_rtc_clock_cali':
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/pm.c:68: undefined reference to `rtc_slowck_cali'
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(pm.o):(.text.pm_set_sleep_mode_full+0x10): undefined reference to `rtc_slp_prep'
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(pm.o): In function `pm_set_sleep_mode_full':
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/pm.c:237: undefined reference to `rtc_slp_prep'
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/pm.c:265: undefined reference to `rtc_slp_prep'
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/pm.c:308: undefined reference to `rtc_slp_prep'
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/pm.c:358: undefined reference to `rtc_slp_prep'
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(pm.o):/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/pm.c:370: more undefined references to `rtc_slp_prep' follow
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(rtc.o): In function `rtc_soc_clk_ck12m':
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/rtc.c:230: undefined reference to `rtc_init_clk'
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(rtc.o): In function `rtc_init_full':
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/rtc.c:333: undefined reference to `rtc_init_clk'
/home/permal/esp/esp-idf/components/esp32/lib/librtc.a(rtc.o): In function `rtc_slp_prep_lite_12M':
/home/qgu/git_tree/chip7.1_rtc/board_code/app_test/pp/rtc/rtc.c:448: undefined reference to `rtc_slp_prep'
/home/permal/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/lib/libstdc++.a(thread.o):(.literal._ZNSt6thread20hardware_concurrencyEv+0x0): undefined reference to `sysconf'
/home/permal/esp/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/lib/libstdc++.a(thread.o): In function `std::thread::hardware_concurrency()':
/builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/src/c++11/thread.cc:160: undefined reference to `sysconf'
collect2: error: ld returned 1 exit status
test/main/CMakeFiles/main.dir/build.make:143: recipe for target 'test/main/main' failed
make[2]: *** [test/main/main] Error 1
make[2]: Leaving directory '/home/permal/electronics/IO-Card-G3/software/externals/smooth/build'
CMakeFiles/Makefile2:258: recipe for target 'test/main/CMakeFiles/main.dir/all' failed
make[1]: *** [test/main/CMakeFiles/main.dir/all] Error 2
make[1]: Leaving directory '/home/permal/electronics/IO-Card-G3/software/externals/smooth/build'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I'm using today's master branch, 7fa98593bc179ea50a1bc8244d5b94bac59c9a10 of IDF, with all submodules updated
The code I'm compiling is this branch of my C++ framework: https://github.com/PerMalmberg/Smooth/t ... -new-cmake
simply do these steps to reproduce.
Code: Select all
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-esp32.cmake -DIDF_TARGET=esp32
make