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

Compilation database is empty with recursive make pattern #593

Closed
suzukajiang opened this issue May 15, 2024 · 10 comments
Closed

Compilation database is empty with recursive make pattern #593

suzukajiang opened this issue May 15, 2024 · 10 comments
Labels
more info needed More info is needed from the community for us to properly triage and investigate stale

Comments

@suzukajiang
Copy link

I'm seeing empty compilation databases from facebook/zstd makefile. It has a pattern of:

Foo:
$(MAKE) -C lib
Meaning if we:

compiledb make Foo
There are lots of invocations of gcc but the resulting compile_commands.json is empty ([]).

@Yingzi1234 Yingzi1234 added more info needed More info is needed from the community for us to properly triage and investigate and removed triage labels May 17, 2024
@Yingzi1234
Copy link
Collaborator

Thank you for your GitHub issue! In order to better solve your problem, could you provide us with the specific problem Project and specific steps to reproduce it? This will be very helpful for us to solve your problem. Thank you in advance!

@suzukajiang
Copy link
Author

FIFO.zip

This Example can reproduce it.

@Yingzi1234
Copy link
Collaborator

@suzukajiang Thank you for your reply! Based on your description, we cannot reproduced your issue, could you provide us with some more detailed information?

  1. What is your Compiler database tool version?
  2. What is your Compilation environment and toolchain?
  3. Could you provide us with your reproduction steps? It would be more beneficial to us if you could reproduce your problem.

@suzukajiang
Copy link
Author

FIFO.zip
There were some issues with the original project,You can reproduce the issue with the makefile in root directory。

toolchain:
MinGW64
gcc 13.2.0
GNU make 4.4.1
cpptools v1.20.5
vscode v1.89.1

@Yingzi1234
Copy link
Collaborator

@suzukajiang We apologize for getting back to you so late. Based on the information you provided we are still unable to reproduce your problem, can you try to upgrade the ‘Compiledb’ tool and try again to see if the problem is still reproduced?
Please feel free if you have any concern!

@suzukajiang
Copy link
Author

It has the same problem with compiledb. You can find the issue in nickdiego/compiledb#111

@Yingzi1234
Copy link
Collaborator

Could you try the following to solve your problem?

  1. Removing the .exe after my compiler path.
  2. Manually re-add it to the generated compile_commands.json again.

Your makefile would become:

clang:
	@echo 'clangg'
	clang -IC:\tools\MinGW\i686-w64-mingw32\include hello.c -v -o hello.exe

mingw:
	C:\tools\MinGW\bin\gcc -IC:\tools\MinGW\i686-w64-mingw32\include hello.c -v -o hello.exe

@gcampbell-msft
Copy link
Collaborator

@suzukajiang Also, could you provide some information about what machine and OS this is behaving on?

Copy link

This issue is now marked as 'stale' due to there being no activity on it for the past 30 days and being labeled 'more info needed'. Unless the 'stale' label is removed or the issue is commented on, this will be closed in 14 days. If you would like to make this issue exempt from getting stale, please provide the information needed for the maintainers to understand the issue better.

@github-actions github-actions bot added the stale label Jan 10, 2025
Copy link

This issue is now closed due to there being no activity on it for the past 14 days since being marked as 'stale'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed More info is needed from the community for us to properly triage and investigate stale
Projects
None yet
Development

No branches or pull requests

3 participants