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

Fix error printing during Ninja sub-build #3006

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

thomas-bc
Copy link
Collaborator

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

Fix #2994

Ninja pipes execute_process() stderr to stdout, so the errors were getting silenced by the build system at generate time.
This fixes it by printing stdout when Ninja is selected as the generator.

@LeStarch
Copy link
Collaborator

LeStarch commented Nov 4, 2024

Can you post the output of an FPP error so I can see what this looks like?

@thomas-bc
Copy link
Collaborator Author

@LeStarch see below:

Click to expand error log with Ninja:
-- [sub-build] Performing sub-build: info-cache
-- [sub-build] Generating: info-cache with target/fpp_locs;target/fpp_depend
-- [sub-build] Executing: info-cache with fpp_locs
CMake Error at /Users/chammard/Work/fp/fprime/cmake/utilities.cmake:595 (message):
[sub-build] Failed to execute: info-cache/fpp_locs:



[1/2] Generating locs.fpp

FAILED: locs.fpp
/Users/chammard/Work/fp/fprime/Ref/fprime-build-ninja/sub-build-info-cache/locs.fpp


cd
/Users/chammard/Work/fp/fprime/Ref/fprime-build-ninja/sub-build-info-cache
&& /Users/chammard/Work/fp/fprime/fprime-venv/bin/python3
/Users/chammard/Work/fp/fprime/cmake/target/tools/redirector.py
/Users/chammard/Work/fp/fprime/Ref/fprime-build-ninja/sub-build-info-cache/locs.fpp
/Users/chammard/Work/fp/fprime/fprime-venv/bin/fpp-locate-defs -d
/Users/chammard/Work/fp/fprime/Ref/fprime-build-ninja
/Users/chammard/Work/fp/fprime/Fpp/ToCpp.fpp
/Users/chammard/Work/fp/fprime/config/AcConstants.fpp
/Users/chammard/Work/fp/fprime/config/DpCfg.fpp
/Users/chammard/Work/fp/fprime/config/FpConfig.fpp
/Users/chammard/Work/fp/fprime/config/PolyDbCfg.fpp
/Users/chammard/Work/fp/fprime/config/VersionCfg.fpp
/Users/chammard/Work/fp/fprime/Fw/Buffer/Buffer.fpp
/Users/chammard/Work/fp/fprime/Fw/Cmd/Cmd.fpp
/Users/chammard/Work/fp/fprime/Fw/Com/Com.fpp
/Users/chammard/Work/fp/fprime/Fw/Dp/Dp.fpp
/Users/chammard/Work/fp/fprime/Fw/Log/Log.fpp
/Users/chammard/Work/fp/fprime/Fw/Prm/Prm.fpp
/Users/chammard/Work/fp/fprime/Fw/Time/Time.fpp
/Users/chammard/Work/fp/fprime/Fw/Tlm/Tlm.fpp
/Users/chammard/Work/fp/fprime/Fw/Ports/SuccessCondition/SuccessCondition.fpp
/Users/chammard/Work/fp/fprime/Fw/Types/Types.fpp
/Users/chammard/Work/fp/fprime/Svc/Cycle/Cycle.fpp
/Users/chammard/Work/fp/fprime/Svc/Fatal/Fatal.fpp
/Users/chammard/Work/fp/fprime/Svc/Ping/Ping.fpp
/Users/chammard/Work/fp/fprime/Svc/PolyIf/PolyIf.fpp
/Users/chammard/Work/fp/fprime/Svc/Sched/Sched.fpp
/Users/chammard/Work/fp/fprime/Svc/Seq/Seq.fpp
/Users/chammard/Work/fp/fprime/Svc/WatchDog/WatchDog.fpp
/Users/chammard/Work/fp/fprime/Svc/ActiveLogger/ActiveLogger.fpp
/Users/chammard/Work/fp/fprime/Svc/ActiveRateGroup/ActiveRateGroup.fpp
/Users/chammard/Work/fp/fprime/Svc/AssertFatalAdapter/AssertFatalAdapter.fpp
/Users/chammard/Work/fp/fprime/Svc/BufferAccumulator/BufferAccumulator.fpp
/Users/chammard/Work/fp/fprime/Svc/BufferManager/BufferManager.fpp
/Users/chammard/Work/fp/fprime/Svc/BufferLogger/BufferLogger.fpp
/Users/chammard/Work/fp/fprime/Svc/BufferRepeater/BufferRepeater.fpp
/Users/chammard/Work/fp/fprime/Svc/ComLogger/ComLogger.fpp
/Users/chammard/Work/fp/fprime/Svc/ComQueue/ComQueue.fpp
/Users/chammard/Work/fp/fprime/Svc/ComSplitter/ComSplitter.fpp
/Users/chammard/Work/fp/fprime/Svc/ComStub/ComStub.fpp
/Users/chammard/Work/fp/fprime/Svc/CmdDispatcher/CmdDispatcher.fpp
/Users/chammard/Work/fp/fprime/Svc/CmdSequencer/CmdSequencer.fpp
/Users/chammard/Work/fp/fprime/Svc/CmdSplitter/CmdSplitter.fpp
/Users/chammard/Work/fp/fprime/Svc/Deframer/Deframer.fpp
/Users/chammard/Work/fp/fprime/Svc/DpCatalog/DpCatalog.fpp
/Users/chammard/Work/fp/fprime/Svc/DpManager/DpManager.fpp
/Users/chammard/Work/fp/fprime/Svc/DpPorts/DpPorts.fpp
/Users/chammard/Work/fp/fprime/Svc/DpWriter/DpWriter.fpp
/Users/chammard/Work/fp/fprime/Svc/FatalHandler/FatalHandler.fpp
/Users/chammard/Work/fp/fprime/Svc/FileDownlinkPorts/FileDownlinkPorts.fpp
/Users/chammard/Work/fp/fprime/Svc/FileDownlink/FileDownlink.fpp
/Users/chammard/Work/fp/fprime/Svc/FileManager/FileManager.fpp
/Users/chammard/Work/fp/fprime/Svc/FileUplink/FileUplink.fpp
/Users/chammard/Work/fp/fprime/Svc/GenericHub/GenericHub.fpp
/Users/chammard/Work/fp/fprime/Svc/Framer/Framer.fpp
/Users/chammard/Work/fp/fprime/Svc/Health/Health.fpp
/Users/chammard/Work/fp/fprime/Svc/PassiveRateGroup/PassiveRateGroup.fpp
/Users/chammard/Work/fp/fprime/Svc/PolyDb/PolyDb.fpp
/Users/chammard/Work/fp/fprime/Svc/PrmDb/PrmDb.fpp
/Users/chammard/Work/fp/fprime/Svc/RateGroupDriver/RateGroupDriver.fpp
/Users/chammard/Work/fp/fprime/Svc/SeqDispatcher/SeqDispatcher.fpp
/Users/chammard/Work/fp/fprime/Svc/StaticMemory/StaticMemory.fpp
/Users/chammard/Work/fp/fprime/Svc/TlmChan/TlmChan.fpp
/Users/chammard/Work/fp/fprime/Svc/TlmPacketizer/TlmPacketizer.fpp
/Users/chammard/Work/fp/fprime/Svc/SystemResources/SystemResources.fpp
/Users/chammard/Work/fp/fprime/Svc/Ports/VersionPorts/VersionPorts.fpp
/Users/chammard/Work/fp/fprime/Svc/PassiveConsoleTextLogger/PassiveConsoleTextLogger.fpp
/Users/chammard/Work/fp/fprime/Svc/ActiveTextLogger/ActiveTextLogger.fpp
/Users/chammard/Work/fp/fprime/Svc/PosixTime/PosixTime.fpp
/Users/chammard/Work/fp/fprime/Svc/LinuxTimer/LinuxTimer.fpp
/Users/chammard/Work/fp/fprime/Svc/Version/Version.fpp
/Users/chammard/Work/fp/fprime/Os/Models/File.fpp
/Users/chammard/Work/fp/fprime/Os/Models/Task.fpp
/Users/chammard/Work/fp/fprime/Os/Models/Mutex.fpp
/Users/chammard/Work/fp/fprime/Os/Models/Directory.fpp
/Users/chammard/Work/fp/fprime/Os/Models/FileSystem.fpp
/Users/chammard/Work/fp/fprime/Os/Models/Generic.fpp
/Users/chammard/Work/fp/fprime/Os/Models/RawTime.fpp
/Users/chammard/Work/fp/fprime/Os/Models/Queue.fpp
/Users/chammard/Work/fp/fprime/Os/Types.fpp
/Users/chammard/Work/fp/fprime/Drv/DataTypes/DataTypes.fpp
/Users/chammard/Work/fp/fprime/Drv/GpioDriverPorts/GpioDriverPorts.fpp
/Users/chammard/Work/fp/fprime/Drv/SpiDriverPorts/SpiDriverPorts.fpp
/Users/chammard/Work/fp/fprime/Drv/I2cDriverPorts/I2cDriverPorts.fpp
/Users/chammard/Work/fp/fprime/Drv/BlockDriver/BlockDriver.fpp
/Users/chammard/Work/fp/fprime/Drv/ByteStreamDriverModel/ByteStreamDriverModel.fpp
/Users/chammard/Work/fp/fprime/Drv/LinuxGpioDriver/LinuxGpioDriver.fpp
/Users/chammard/Work/fp/fprime/Drv/LinuxUartDriver/LinuxUartDriver.fpp
/Users/chammard/Work/fp/fprime/Drv/LinuxSpiDriver/LinuxSpiDriver.fpp
/Users/chammard/Work/fp/fprime/Drv/LinuxI2cDriver/LinuxI2cDriver.fpp
/Users/chammard/Work/fp/fprime/Drv/StreamCrossover/StreamCrossover.fpp
/Users/chammard/Work/fp/fprime/Drv/TcpClient/TcpClient.fpp
/Users/chammard/Work/fp/fprime/Drv/TcpServer/TcpServer.fpp
-- Configuring incomplete, errors occurred!
/Users/chammard/Work/fp/fprime/Drv/Udp/Udp.fpp
/Users/chammard/Work/fp/fprime/Ref/PingReceiver/PingReceiver.fpp
/Users/chammard/Work/fp/fprime/Ref/RecvBuffApp/RecvBuffApp.fpp
/Users/chammard/Work/fp/fprime/Ref/SendBuffApp/SendBuffApp.fpp
/Users/chammard/Work/fp/fprime/Ref/SignalGen/SignalGen.fpp
/Users/chammard/Work/fp/fprime/Ref/TypeDemo/TypeDemo.fpp
/Users/chammard/Work/fp/fprime/Ref/Top/instances.fpp
/Users/chammard/Work/fp/fprime/Ref/Top/topology.fpp

fpp-locate-defs

/Users/chammard/Work/fp/fprime/Svc/Cycle/Cycle.fpp:8.2

 errooorrrr[]]]
 ^

error: } expected

ninja: build stopped: subcommand failed.
Call Stack (most recent call first):
/Users/chammard/Work/fp/fprime/cmake/sub-build/sub-build.cmake:66 (execute_process_or_fail)
/Users/chammard/Work/fp/fprime/cmake/FPrime.cmake:162 (run_sub_build)
/Users/chammard/Work/fp/fprime/cmake/FPrime.cmake:231 (fprime_initialize_build_system)
CMakeLists.txt:31 (include)


[ERROR] CMake erred with return code 1. Partial build cache remains. Run purge to clean-up.
Click to expand error log with Makefiles:
-- [sub-build] Performing sub-build: info-cache
-- [sub-build] Generating: info-cache with target/fpp_locs;target/fpp_depend
-- [sub-build] Executing: info-cache with fpp_locs
CMake Error at /Users/chammard/Work/fp/fprime/cmake/utilities.cmake:595 (message):
-- Configuring incomplete, errors occurred!
[sub-build] Failed to execute: info-cache/fpp_locs:

fpp-locate-defs

/Users/chammard/Work/fp/fprime/Svc/Cycle/Cycle.fpp:8.2

 errooorrrr[]]]
 ^

error: } expected

make[3]: *** [locs.fpp] Error 1

make[3]: *** Deleting file `locs.fpp'

make[2]: *** [CMakeFiles/fpp_locs.dir/all] Error 2

make[1]: *** [CMakeFiles/fpp_locs.dir/rule] Error 2

make: *** [fpp_locs] Error 2
Call Stack (most recent call first):
/Users/chammard/Work/fp/fprime/cmake/sub-build/sub-build.cmake:66 (execute_process_or_fail)
/Users/chammard/Work/fp/fprime/cmake/FPrime.cmake:162 (run_sub_build)
/Users/chammard/Work/fp/fprime/cmake/FPrime.cmake:231 (fprime_initialize_build_system)
CMakeLists.txt:31 (include)


[ERROR] CMake erred with return code 1. Partial build cache remains. Run purge to clean-up.

@LeStarch LeStarch merged commit f63b511 into nasa:devel Nov 5, 2024
35 checks passed
@thomas-bc thomas-bc deleted the fix/ninja-verbosity branch November 5, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fprime-util generate --ninja silences FPP error messages
2 participants