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

new mbedtls/timing.cpp creates double timing.o module #14759

Closed
JojoS62 opened this issue Jun 10, 2021 · 4 comments · Fixed by #14760
Closed

new mbedtls/timing.cpp creates double timing.o module #14759

JojoS62 opened this issue Jun 10, 2021 · 4 comments · Fixed by #14760

Comments

@JojoS62
Copy link
Contributor

JojoS62 commented Jun 10, 2021

Description of defect

#14756 produces a linker warning because there exists already a timing.c:

Object file timing.o is not unique! It could be made from: mbed-os/connectivity/mbedtls/source/timing.c mbed-os/connectivity/mbedtls/platform/src/timing.cpp

Target(s) affected by this defect ?

Toolchain(s) (name and version) displaying this defect ?

arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)

What version of Mbed-os are you using (tag or sha) ?

b8781e5

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli v1

How is this defect reproduced ?

compile with mbed-cli v1

@mbedmain
Copy link

@JojoS62 thank you for raising this issue.Please take a look at the following comments:

Could you add some more detail to the description? A good description should be at least 25 words.
What target(s) are you using?
What toolchain(s) are you using?

NOTE: If there are fields which are not applicable then please just add 'n/a' or 'None'. This indicates to us that at least all the fields have been considered.
Please update the issue header with the missing information.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 10, 2021

Thanks for the report, what toolchain are you testing with?

Although this comes from mbed tools :( I see there method detect_duplicates in tools/resources/init.py. I recall there were problems in some IDE that might have a problem with that, otherwise it should not be.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 10, 2021

Is this just a linker warning? From the code, it looks like it should be tool error (I wonder why CI did not catch this error).

@Patater Patater self-assigned this Jun 10, 2021
@JojoS62
Copy link
Contributor Author

JojoS62 commented Jun 10, 2021

the binary image was created, and the target is running. But I'm not using the mbedtls, so the problem may have no effect.

compiled with gcc9, using 'mbed compile' in a shell in ubuntu linux.

Patater added a commit to Patater/mbed-os that referenced this issue Jun 10, 2021
We get a linker warning with the recently added timing module
implementation for Mbed. This is because there is Mbed TLS also ships a
file called timing.c, which we are including in Mbed OS also. With CLI
1, we get an error about unique object files because of the similarly
named implementation files.

    Object file timing.o is not unique! It could be made from: mbed-os/connectivity/mbedtls/source/timing.c mbed-os/connectivity/mbedtls/platform/src/timing.cpp

Rename the Mbed timing module implementation to timing_alt.cpp to avoid
this naming conflict.

Fixes: b8781e5 ("mbedtls: Add an alt implementation of timing")

Fixes ARMmbed#14759
Patater added a commit to Patater/mbed-os that referenced this issue Jun 10, 2021
We get a linker warning with the recently added timing module
implementation for Mbed. This is because there is Mbed TLS also ships a
file called timing.c, which we are including in Mbed OS also. With CLI
1, we get an error about unique object files because of the similarly
named implementation files.

    Object file timing.o is not unique! It could be made from: mbed-os/connectivity/mbedtls/source/timing.c mbed-os/connectivity/mbedtls/platform/src/timing.cpp

Rename the Mbed timing module implementation to timing_mbed.cpp to avoid
this naming conflict.

Fixes: b8781e5 ("mbedtls: Add an alt implementation of timing")

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

Successfully merging a pull request may close this issue.

4 participants