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

Link error: Symbol __user_perthread_libspace multiply defined #7422

Closed
toyowata opened this issue Jul 5, 2018 · 23 comments
Closed

Link error: Symbol __user_perthread_libspace multiply defined #7422

toyowata opened this issue Jul 5, 2018 · 23 comments

Comments

@toyowata
Copy link
Contributor

toyowata commented Jul 5, 2018

Description

I got link error below when I build mbed-os-example-blinky project for any target.

Error: Symbol __user_perthread_libspace multiply defined (by /build/mbed-os.lib/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.GR_LYCHEE.o and /build/mbed-os.lib/rtos/TARGET_CORTEX/mbed_boot.GR_LYCHEE.o).
Error: Not enough information to list the image map.
Info: Unable to download. Fix the reported errors...

[Steps to reproduce]

  • Import mbed-os-example-blinky program
  • Set target to Mbed OS 5 support platform (e.g. Renesas GR-LYCHEE, NXP K64F etc)
  • Compile the program

[Other notes]

  • This link error cannot be shown in command line build by Mbed-CLI

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

@ciarmcom
Copy link
Member

ciarmcom commented Jul 5, 2018

ARM Internal Ref: MBOTRIAGE-1075

@bxc237
Copy link

bxc237 commented Jul 5, 2018

I got same issue for L476RG....
Error: Symbol __user_perthread_libspace multiply defined (by /build/mbed-os.lib/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.NUCLEO_L476RG.o and /build/mbed-os.lib/rtos/TARGET_CORTEX/mbed_boot.NUCLEO_L476RG.o).

@jeromecoutant
Copy link
Collaborator

I confirmed the error with NUCLEO_F746ZG and only ARM toolchain with 5.9.2 label.

[DEBUG] Errors: Error: L6200E: Symbol __user_perthread_libspace multiply defined (by BUILD/tests/NUCLEO_F746ZG/ARM/rtos/TARGET_CORTEX/rtx5/RTX/Source/rtx_lib.o and BUILD/tests/NUCLEO_F746ZG/ARM/rtos/TARGET_CORTEX/mbed_boot.o).

@jeromecoutant
Copy link
Collaborator

Hi again
I have compared my local profile with the one in tools/profiles,
and it seems that -D_RTE_ was missing.
I can't explain what it is, but it solves my compilation issue...

@theotherjimmy
Copy link
Contributor

Thanks @jeromecoutant I'll look into it.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 9, 2018

@jeromecoutant RTE is defined for 5.9.2 . is that causing a problem?

cc @ARMmbed/mbed-os-core

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 9, 2018

I suspect this is the one that is causing a problem #6973. I'll check why rtx lib does not see the no multithreaded macro and why this was not seen in our CI previously

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 9, 2018

@theotherjimmy I referenced 7447 but that one is about own profile. This issue is in the online compiler. Can you check that profiles were updated there? RTE symbol defined? (until 5.9.3 contains proper fix for this)

@theotherjimmy
Copy link
Contributor

See #7449

@theotherjimmy
Copy link
Contributor

We need to backport that patch into 5.9.2 to fix the problem in the online compiler.

@mharmouche
Copy link

I'm blocked since one week due to this error.
Any solution?

@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

@mharmouche The PR (#7474) has just been merged and is now on master. Would you mind retesting?

@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

@toyowata Would you mind confirming that the issue has been fixed?

@mharmouche
Copy link

Issue not fixed!

@mharmouche
Copy link

image

@mecwerks
Copy link

mecwerks commented Jul 11, 2018

@cmonr I can confirm the newest commit works. Although I couldn't find a way to update the official library to the newest commit (would only let me select release tags). So I resorted to forking it, and pushing my own release tag to make sure it was using the newest. Compiled and ran for me.

@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

@mecwerks Correct. This is by design with mbed-cli.

Whenever I need to test changes that haven't hit a release, I go into the mbed-os directory and do a manual git checkout.

@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

I'm blocked since one week due to this error.

@mharmouche This is the first time that I've read that you're having an issue. Did you open one elsewhere?
Cna you provide output of the mbed-os version that you're running?

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 12, 2018

The master branch contains the fix. The next release 5.9.3 will include it.

Meanwhile, to fix this issue - all we need is to have _RTE_ macro defined in the online compiler for 5.9.2 release. Please add mbed_lib.json file with the following (if you already have the config, just add macro):

{
    "name": "rtos_fix",
    "macros": ["_RTE_"]
}

Tested, works 👍

@toyowata
Copy link
Contributor Author

@0xc0170 Thank you very much for your testing.
I also confirmed that adding compiler macros fixes the problem.

  • Add _RTE_ macros from [Compile] - [Compile macros]

pre-defined

  • Then, [Compile] - [Compile All]

@cmonr
Copy link
Contributor

cmonr commented Jul 13, 2018

Closing since issue appears resolved.

@diegomhamilton
Copy link

I'm getting this error now and adding the RTE macro didn't solve it.

@cmonr
Copy link
Contributor

cmonr commented Dec 16, 2018

@diegomhamilton Please open a new issue referencing this issue. We prefer to see new issues come in instead of reviving old ones.

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

No branches or pull requests

10 participants