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

Nested makefile compile cannot be parsed correctly using windows build #7

Closed
lsq opened this issue Mar 11, 2025 · 4 comments
Closed

Comments

@lsq
Copy link

lsq commented Mar 11, 2025

When I compile gtags on windows 10 Mingw, using make > build.log to generate logs, but there is no comcompile_commands.json generated with compiledb -p build.log.
global sources tree:

├── htags
│   ├── icons
│   ├── jquery
│   └── Makefile
├── htags-refkit
│   └── Makefile
├── htags-server
│   └── Makefile
├── libdb
│   └── Makefile
├── libglibc
│   └── Makefile
├── libltdl
│   ├── libltdl
│   ├── loaders
│   └── Makefile
├── libparser
│   └── Makefile
├── libutil
│   └── Makefile
├── m4
├── Makefile
├── plugin-factory
│   └── Makefile
└── script
    └── Makefile

and compiledb -p build.log output:

time="2025-03-11T18:25:59+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/regex.c not exist"
time="2025-03-11T18:25:59+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/getopt.c not exist"
time="2025-03-11T18:25:59+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/getopt1.c not exist"
time="2025-03-11T18:25:59+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/snprintf.c not exist"

build.log

@fcying
Copy link
Owner

fcying commented Mar 11, 2025

It looks like make enter wasn't parsed correctly. I've made a test version, pease help test it.

compiledb.zip

@lsq
Copy link
Author

lsq commented Mar 11, 2025

With test version, the above build log pared correctly. But this is new issue when using mingw32-make builded with libgettext to support locale language. The parsed warning is the same:

time="2025-03-11T19:24:03+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/regex.c not exist"
time="2025-03-11T19:24:03+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/getopt.c not exist"
time="2025-03-11T19:24:03+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/getopt1.c not exist"

new-build.log

@fcying
Copy link
Owner

fcying commented Mar 11, 2025

With test version, the above build log pared correctly. But this is new issue when using mingw32-make builded with libgettext to support locale language. The parsed warning is the same:

time="2025-03-11T19:24:03+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/regex.c not exist"
time="2025-03-11T19:24:03+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/getopt.c not exist"
time="2025-03-11T19:24:03+08:00" level=warning msg="file D:/tmp/vim/mingw-w64-global/src/global-6.6.14/getopt1.c not exist"

new-build.log

make[1]: 进入目录“/d/tmp/vim/mingw-w64-global/src/global-6.6.14”

Currently, parse cmd only supports English and does not support Chinese. You can change the environment to en_US and recompile.

@lsq
Copy link
Author

lsq commented Mar 11, 2025

Thanks. Close the issue.

@lsq lsq closed this as completed Mar 11, 2025
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

No branches or pull requests

2 participants