RT-Thread / RT-Thread/rt-thread

[Bug] command:"scons --target=cmake -s " makes error in Ubuntu 24.04.1 LTS x86_64

Open
#10,113 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
12.2k
Forks
5.4k
Avg merge
4d 12h
Merged PRs (30d)
40

Description

RT-Thread Version

master

Hardware Type/Architectures

at32f403a-start

Develop Toolchain

GCC

Describe the bug
  1. scons --target=cmake -s after got a

Image

entire program
2. $ scons --target=cmake -s Newlib version: 4.4.0 Update setting files for CMakeLists.txt... AttributeError: 'CLVar' object has no attribute 'replace': File "/home/starry/mcu/at32f403a_example/SConstruct", line 65: DoBuilding(TARGET, objs) File "/home/starry/mcu/at32f403a_example/rt-thread/tools/building.py", line 874: EndBuilding(target, program) File "/home/starry/mcu/at32f403a_example/rt-thread/tools/building.py", line 983: GenTargetProject(program) File "/home/starry/mcu/at32f403a_example/rt-thread/tools/building.py", line 947: CMakeProject(Env, Projects, GetOption('project-name')) File "/home/starry/mcu/at32f403a_example/rt-thread/tools/cmake.py", line 343: GenerateCFiles(env, project, project_name) File "/home/starry/mcu/at32f403a_example/rt-thread/tools/cmake.py", line 67: CXXFLAGS = env['CXXFLAGS'].replace('\\', "/").replace('\"', "\\\"")
3.

Image

  1. it works after make it

Image

Other additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce scons --target=cmake -s on the reported Ubuntu setup, then inspect rt-thread/tools/cmake.py at line 67 and the callers in tools/building.py. Confirm the expected CXXFLAGS value and verify that CMake project generation completes without the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.