ARMmbed / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things
https://mbed.com
Other
4.67k stars 2.98k forks source link

mbed-os/features/frameworks/TARGET_PSA/ compiled with error #10035

Closed TaniaMirzin closed 5 years ago

TaniaMirzin commented 5 years ago

https://github.com/ARMmbed/mbed-os/#525d46378e8ebe5a9f71e79ced203adb1f162a65

compiles TARGET_PSA framework and causes compilation errors

Steps to reproduce

  1. Git clone https://github.com/ARMmbed/mbed-client-testapp
  2. Switch to branch 5.12.0-RC1
  3. Update mbed-os.lib to https://github.com/ARMmbed/mbed-os/#525d46378e8ebe5a9f71e79ced203adb1f162a65
  4. Copy attached mbed_app.json [] mbed_app.txt
  5. mbed deploy
  6. mbed compile -m K64F -t GCC_ARM

compilation log:

Error] pal_crypto_config_check.h@81,2: #error "ARCH_TEST_CIPER_MODE_CTR defined, but not all prerequisites"
[Error] pal_crypto_config_check.h@196,2: #error "ARCH_TEST_CMAC defined, but not all prerequisites"
[Error] pal_crypto_config_check.h@204,2: #error "ARCH_TEST_HMAC defined, but not all prerequisites"
[Warning] pal_client_api_intf.h@35,0: "PSA_SUCCESS" redefined
[ERROR] In file included from ./mbed-os/features/frameworks/TARGET_PSA/pal/pal_crypto_config.h:409:0,
                from ./mbed-os/features/frameworks/TARGET_PSA/pal/pal_common.h:32,
                from ./mbed-os/features/frameworks/TARGET_PSA/pal/pal_client_api_empty_intf.c:20:
./mbed-os/features/frameworks/TARGET_PSA/pal/pal_crypto_config_check.h:81:2: error: #error "ARCH_TEST_CIPER_MODE_CTR defined, but not all prerequisites"
#error "ARCH_TEST_CIPER_MODE_CTR defined, but not all prerequisites"
 ^~~~~
./mbed-os/features/frameworks/TARGET_PSA/pal/pal_crypto_config_check.h:196:2: error: #error "ARCH_TEST_CMAC defined, but not all prerequisites"
#error "ARCH_TEST_CMAC defined, but not all prerequisites"
 ^~~~~
./mbed-os/features/frameworks/TARGET_PSA/pal/pal_crypto_config_check.h:204:2: error: #error "ARCH_TEST_HMAC defined, but not all prerequisites"
#error "ARCH_TEST_HMAC defined, but not all prerequisites"
 ^~~~~
In file included from ./mbed-os/features/frameworks/TARGET_PSA/pal/pal_client_api_empty_intf.c:21:0:
./mbed-os/features/frameworks/TARGET_PSA/pal/pal_client_api_intf.h:35:0: warning: "PSA_SUCCESS" redefined
#define PSA_SUCCESS                 (0)

In file included from ./mbed-os/components/TARGET_PSA/services/storage/its/psa_prot_internal_storage.h:26:0,
                from ./mbed-os/components/TARGET_PSA/inc/psa/internal_trusted_storage.h:21,
                from ./mbed-os/features/frameworks/TARGET_PSA/pal/pal_common.h:33,
                from ./mbed-os/features/frameworks/TARGET_PSA/pal/pal_client_api_empty_intf.c:20:
./mbed-os/components/TARGET_PSA/inc/psa/error.h:32:0: note: this is the location of the previous definition
#define PSA_SUCCESS                     ((psa_status_t)0)

[mbed] ERROR: "/usr/bin/python" returned error.
[ ] Question
[ ] Enhancement
[x] Bug
jenia81 commented 5 years ago

@0xc0170 Pelion Client isn't compiled with Mbed OS master. This is blocker for us

0xc0170 commented 5 years ago

@ARMmbed/mbed-os-psa please review

alzix commented 5 years ago

Seems like crypto misconfiguration. @Patater , please advise.

Patater commented 5 years ago

The issue appears to be arising from pal_crypto_config_check.h, but that's not an Mbed Crypto nor Mbed TLS file. For example, it's complaining about ARCH_TEST_HMAC missing dependencies, but ARCH_TEST_HMAC is not present in Mbed Crypto nor Mbed TLS.

Is anyone from the PAL/Client team available to advise? I'm happy to help if I can be of any assistance.

adbridge commented 5 years ago

@JanneKiiskila @jenia81 Looks like PAL/client issue from Jaeden's comment above ?

orenc17 commented 5 years ago

a fix is on the way from @netanelgonen

netanelgonen commented 5 years ago

@TaniaMirzin can you please a look?

ciarmcom commented 5 years ago

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-985

TaniaMirzin commented 5 years ago

@netanelgonen It's ok now. Thanks