Skip to content

cpu/esp32: fix esp_wifi_enterprise compilation problem#17306

Merged
aabadie merged 1 commit intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/esp_wifi/fix_enterprise_compilation
Dec 1, 2021
Merged

cpu/esp32: fix esp_wifi_enterprise compilation problem#17306
aabadie merged 1 commit intoRIOT-OS:masterfrom
gschorcht:cpu/esp32/esp_wifi/fix_enterprise_compilation

Conversation

@gschorcht
Copy link
Contributor

Contribution description

This PR fixes the compilation problem for module esp_wifi_enterprise reported in issue #17305.

With the change from using archive files to using object files in PR #14754, the module esp_wifi_enterprise was no longer compilable. The reason for this was that the file bignum.c was present in two different vendor sub-directories and created two identical object files, which then led to a symbol conflict when linking. This PR removes one of these identical files. The one that is used in all esp_wifi variants is kept, the one that is only used in esp_wifi_enterprise is dropped.

Testing procedure

Compile

CFLAGS='-DESP_WIFI_EAP_USER=\"riot\" -DESP_WIFI_EAP_PASS=\"riot\"' USEMODULE=esp_wifi_enterprise make BOARD=esp32-wroom-32 -C examples/gnrc_networking

Without this error it should show multiple definition errors like

examples/gnrc_networking/bin/esp32-wroom-32/esp_idf_wpa_supplicant_wpa2_tls/bignum.o: In function `bignum_init':
cpu/esp32/vendor/esp-idf/wpa_supplicant/src/wpa2/tls/bignum.c:40: multiple definition of `bignum_init'
examples/gnrc_networking/bin/esp32-wroom-32/esp_idf_wpa_supplicant_crypto/bignum.ocpu/esp32/vendor/esp-idf/wpa_supplicant/src/crypto/bignum.c:40: first defined here

With this PR the compilation should be successful. Since there is no code change successful compilation should be enough.

Issues/PRs references

Fixes #17305

With the change from using archive files to using object files in PR RIOT-OS#14754, the module `esp_wifi_enterprise` was no longer compilable. The reason for this was that the file `bignum.c` was present in two different vendor sub-directories and created two identical object files, which then led to a symbol conflict when linking. This commit removes one of these identical files. The one that is used in all `esp_wifi` variants is kept, the one that is only used in `esp_wifi_enterprise` is dropped.
@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Platform: ESP Platform: This PR/issue effects ESP-based platforms labels Dec 1, 2021
@gschorcht gschorcht added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Dec 1, 2021
@aabadie aabadie merged commit 52ce34a into RIOT-OS:master Dec 1, 2021
@gschorcht
Copy link
Contributor Author

Thanks for reviewing and merging.

@gschorcht gschorcht deleted the cpu/esp32/esp_wifi/fix_enterprise_compilation branch December 1, 2021 14:36
@fjmolinas fjmolinas added this to the Release 2022.01 milestone Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cpu/esp32: esp_wifi_enterprise compilation error

4 participants