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

-.d file created with Core Build Makefiles #70

Open
jonahgraham opened this issue Sep 13, 2022 · 2 comments
Open

-.d file created with Core Build Makefiles #70

jonahgraham opened this issue Sep 13, 2022 · 2 comments
Labels
build Build components of CDT, anything to do with running the compiler, using Make, CMake, or any builder

Comments

@jonahgraham
Copy link
Member

  1. Create a Makefile Core Build project

image

  1. Add CFLAGS += -MP -MMD to the Makefile created:

image

  1. do a build and a "phantom" -.d file is created:

image

@jonahgraham
Copy link
Member Author

This appears to be a result of running the scanner with the collected command line arguments in the output of the build. i.e. CDT sees g++ -c -g -MP -MMD -o example24.o /scratch/eclipse/src/cdt/runtime-CDT/example24/example24.cpp and uses that to construct a command line to pass to g++ that contains the -MP -MMD which has the side effect of leaving the errant -.d file around.

This is an example of the command line:

/usr/bin/g++ -E -P -v -dD -c -g -MP -MMD -o - /scratch/eclipse/src/cdt/runtime-CDT/example24/.sc2298146184504750215.cpp

This is the relevant stacktrace that creates the above g++ process.

Daemon Thread [OutputReader] (Suspended (entry into method <init> in Process))	
	owns: ConsoleOutputSniffer  (id=17990)	
	ProcessImpl(Process).<init>() line: 96	
	ProcessImpl.<init>(byte[], byte[], int, byte[], int, byte[], int[], boolean, boolean) line: 338	
	ProcessImpl.start(String[], Map<String,String>, String, Redirect[], boolean) line: 271	
	ProcessBuilder.start(ProcessBuilder$Redirect[]) line: 1107	
	ProcessBuilder.start() line: 1071	
	GCCToolChain.getScannerInfo(IBuildConfiguration, List<String>, Path, Path) line: 465	
	GCCToolChain.getScannerInfo(IBuildConfiguration, List<String>, IExtendedScannerInfo, IResource, URI) line: 384	
	StandardBuildConfiguration(CBuildConfiguration).processLine(String) line: 834	
	ConsoleOutputSniffer.processLine(String) line: 180	
	ConsoleOutputSniffer$ConsoleOutputStream.checkLine(boolean) line: 101	
	ConsoleOutputSniffer$ConsoleOutputStream.write(byte[], int, int) line: 60	
	ConsoleOutputSniffer$ConsoleOutputStream(OutputStream).write(byte[]) line: 122	
	ProcessClosure$ReaderThread.run() line: 60	

@jonahgraham
Copy link
Member Author

Thanks to @EonDigital for helping identify this issue.

@jonahgraham jonahgraham added the build Build components of CDT, anything to do with running the compiler, using Make, CMake, or any builder label Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build components of CDT, anything to do with running the compiler, using Make, CMake, or any builder
Projects
None yet
Development

No branches or pull requests

1 participant