Undefined reference to `_binary_src_certs_pem_start'
See original GitHub issueI want to use SSL, so I have put " certs.pem " in /src folder. In the main.c, I have put " extern const char cert_start[] asm("_binary_src_certs_pem_start");
". and in platformio.ini, I have put " board_build.embed_txtfiles = src/certs.pem
".
I have tried to build the code and clean before the build and the same error:
…
Linking .pio/build/esp32dev/firmware.elf
/home/walidamriou/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.2.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/esp-idf/src/update.c.o:(.literal.update+0x4): undefined reference to `_binary_src_certs_pem_start'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1
…
I can fix the problem by using the certificate direct in the main.c but I want to use it as a file, this how I have used it in main.c:
const char* cert = \
"-----BEGIN CERTIFICATE-----\n" \
"MIIEkjCCA3qgAwIBAgIQCgFBQgAAAVOFc2oLheynCDANBgkqhkiG9w0BAQsFADA/\n" \
"MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\n" \
"DkRTVCBSb290IENBIFgzMB4XDTE2MDMxNzE2NDA0NloXDTIxMDMxNzE2NDA0Nlow\n" \
...
"wApIvJSwtmVi4MFU5aMqrSDE6ea73Mj2tcMyo5jMd6jmeWUHK8so/joWUoHOUgwu\n" \
"X4Po1QYz+3dszkDqMp4fklxBwXRsW10KXzPMTZ+sOPAveyxindmjkW8lGy+QsRlG\n" \
"PfZ+G6Z6h7mjem0Y+iWlkYcV4PIWL1iwBi8saCbGS5jN2p8M+X+Q7UNKEkROb3N6\n" \
"KOqkqm57TH2H3eDJAkSnh6/DNFu0Qg==\n" \
"-----END CERTIFICATE-----\n";
Any solutions or ideas to fix this problem?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
undefined reference to (function) c++ [duplicate] - Stack Overflow
This is true in general case, but first thing you think about when somebody asks about undefined reference in C++ should be "does...
Read more >Undefined reference to stacktrace standard library - GNU.org
cpp ``` And I get the next output: ``` /usr/bin/ld: a-cpp_file.o: in function `std::stacktrace_entry::_S_init()': cpp_file.cpp:(.text.
Read more >C compilation Error: undefined reference to - YouTube
C compilation Error: undefined reference to. Watch later. Share. Copy link. Info. Shopping. Tap to unmute. If playback doesn't begin shortly ...
Read more >undefined reference to espeak function - compiling - Ask Ubuntu
I just edited this part ############ Find ESPEAK TTS ############ find_path(LIBESPEAK_INCLUDE_DIRS NAMES speak_lib.h HINTS ...
Read more >Undefined references when compiling - Forum Open Cascade ...
I built OCC as static libraries, and now I want to build a static binary for portability. My code is: // STEP Read...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi guys, sorry for the late reply. I pushed some changes together with updates for ESP-IDF v4.1 that could possibly fix this issue.
It would be great if you could retest your projects with the upstream version:
Symbol names should be without additional paths, e.g.
_binary_coap_ca_pem_start
forcoap_ca.pem
https://github.com/platformio/platform-espressif32/issues/480#issuecomment-771187787