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

Renamed or added types are not correctly resolved when rebuilding #2999

Open
celskeggs opened this issue Oct 30, 2024 · 1 comment
Open

Renamed or added types are not correctly resolved when rebuilding #2999

celskeggs opened this issue Oct 30, 2024 · 1 comment
Labels
bug cmake Issues pertaining to the CMake build system. Medium Priority

Comments

@celskeggs
Copy link
Contributor

F´ Version v3.4.3-117-g65b9e4d9d
Affected Component build system

Problem Description

When I add or rename a type, the locs.fpp files in the build directory do not get regenerated on the next build. This results in undefined symbol errors when I try to rebuild:

[1/22] Generating MyComponentComponentAi.xml
FAILED: MyComponent/MyComponentComponentAi.xml [...]/MyComponent/MyComponentComponentAi.xml
cd [...] && /usr/local/bin/fpp-to-xml -d [...]/MyComponent -i [... list of fpp files ...] -p [...]
fpp-to-xml
[...]/MyComponent/MyComponent.fpp:6.63
        sync input port example: Components.MyComponent.ExamplePort
                                                        ^
error: undefined symbol ExamplePort

The problem can be solved by purging and regenerating the build directory, but I should not have to do that every time I add a new type. Note that the problem CANNOT be solved by simply deleting either of the locs.fpp files. I encounter this problem both with the ninja-based build system and the regular make-based build system.

Context / Environment

Execute fprime-util version-check and share the output.

Operating System: Linux
CPU Architecture: x86_64
Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.34
Python version: 3.9.18
CMake version: 3.26.5
Pip version: 21.2.3
Pip packages:
    fprime-tools==3.4.5a1
    fprime-gds==3.4.4a3
    fprime-fpp-*==2.2.0a5

How to Reproduce

  1. Generate a build directory with fprime-util generate --ninja or fprime-util generate
  2. Add a new port type and reference it from another .fpp file
  3. Attempt to run the build with fprime-util build
  4. Observe that the build fails.
  5. Run fprime-util purge (enter yes)
  6. Regenerate with fprime-util generate --ninja or fprime-util generate
  7. Rebuild with fprime-util build
  8. Observe that the build succeeds.

Expected Behavior

I should never need to purge the build directory to fix the build.

@celskeggs celskeggs added the bug label Oct 30, 2024
@LeStarch LeStarch added Medium Priority cmake Issues pertaining to the CMake build system. labels Nov 22, 2024
@LeStarch
Copy link
Collaborator

100% agree. This is an issue with CMake rebuild triggering. Will need to look into it. Given the work around, I've marked this as "Medium Priority", but am happy to escalate if there is a lot of desire for this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cmake Issues pertaining to the CMake build system. Medium Priority
Projects
None yet
Development

No branches or pull requests

2 participants