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

makefile entrypoint not found with makefile.configuration[] #259

Closed
d-chris opened this issue Dec 20, 2021 · 14 comments
Closed

makefile entrypoint not found with makefile.configuration[] #259

d-chris opened this issue Dec 20, 2021 · 14 comments
Labels
more info needed More info is needed from the community for us to properly triage and investigate

Comments

@d-chris
Copy link

d-chris commented Dec 20, 2021

when i use two different (but kinda the same) projects i have a wired issue. i narrowed it down to get it working, if i move the makeDirectory out of the makefile.configurations[]

for me it seems that the makeDirectory within the makefile.configurations[] is somehow cached?

  • even deleting the .vscode/*.log files wasn't bringing any improvements

to get rid of the error-message: Makefile entry point not found.

  • move makedirectory out of the configuration

project I

{
    "makefile.extensionOutputFolder": "./.vscode",
    "makefile.preConfigureScript": "./.vscode/winavr346.bat", // load path to make.exe into PATH
    "makefile.alwaysPreConfigure": true,
    "makefile.clearOutputBeforeBuild": true,
    "makefile.makeDirectory": "./cavr/PeugeotTS", // working
    "makefile.configurations": [
        {
            "name": "PeugeotTS",
            //"makeDirectory": "./cavr/PeugeotTS", // not working - Makefile entry point not found.
            "problemMatchers": ["$gcc"]
        },
    ],
    "files.exclude": {
        "**/{CVS,.dep}": true, // hide directories
        "**/*.{pn*,ppg}":true, // hide programmers notepad
        "**/*.{[ch]~,bak}": true, // hide temp backup files
        "**/.#*": true, // hide cvs backup files
        "**/*.{o,d,lst}": true, // hide object files
        "**/*.{map,lss,sym}": true, // hide compiler files
        "**/*.{elf,eep}": true, // hide binary files
        "**/*.hex": true // hide firmware
    },
    "C_Cpp.default.includePath": [
        "${workspaceFolder}/**",
        "${env:WINAVR}/avr/include/" // include path for standard-header
    ],
    "C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools"
}

project II

{
    "makefile.extensionOutputFolder": "./.vscode",
    "makefile.preConfigureScript": "./.vscode/winavr346.bat", // load path to make.exe into PATH
    "makefile.alwaysPreConfigure": true,
    "makefile.clearOutputBeforeBuild": true,
    "makefile.makeDirectory": "./cavr/2011_030", // working
    "makefile.configurations": [
        {
            "name": "2011_030",
            //"makeDirectory": "./cavr/2011_030", // not working
            "problemMatchers": [
                "$gcc"
            ]
        },
    ],
    "files.exclude": {
        "**/{CVS,.dep}": true, // hide directories
        "**/*.{pn*,ppg}": true, // hide programmers notepad
        "**/*.{[ch]~,bak}": true, // hide temp backup files
        "**/.#*": true, // hide cvs backup files
        "**/*.{o,d,lst}": true, // hide object files
        "**/*.{map,lss,sym}": true, // hide compiler files
        "**/*.{elf,eep}": true, // hide binary files
        "**/*.hex": true // hide firmware
    },
    "C_Cpp.default.includePath": [
        "${workspaceFolder}/**",
        "${env:WINAVR}/avr/include/" // include path for standard-header
    ],
    "C_Cpp.default.configurationProvider": "ms-vscode.makefile-tools"
}
@andreeis
Copy link
Contributor

@d-chris, we are sorry to hear that you have this problem. This scenario normally works. Can you set "makefile.loggingLevel": "Debug" and "makefile.extensionLog": ".vscode/extension.log" in your .vscode/settings.json and share with us .vscode\extension.log?

@d-chris
Copy link
Author

d-chris commented Jan 21, 2022

@andreeis
attached you'll find the .vscode/*.log files with the corresponding settings.json

before each run i deleted all *.log files to start with a clean slate

1_noentrypoint.zip
2_working.zip

// my vscode version
Version: 1.63.2 (user setup)
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:40:02.816Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

Output of the Makefile tools, when a edit the settings.json

  1. not working
Logging level: Debug
Dropping various extension output files at c:\Temp\issue259\.vscode
Writing extension log at c:\Temp\issue259\.vscode\extension.log
Configurations cached at c:\Temp\issue259\.vscode\configurationCache.log
No path to the makefile is defined in the settings file.
No folder path to the makefile is defined in the settings file.
Found pre-configure script defined as c:\Temp\issue259\.vscode\winavr346.bat
Always pre-configure: true
Dry-run switches: --always-make,--keep-going,--print-directory
Additional compiler names: 
Exclude compiler names: 
No current configuration is defined in the workspace state. Assuming 'Default'.
Found the following configurations defined in makefile.configurations setting: PeugeotTS
No target defined in the workspace state. Assuming 'Default'.
No current launch configuration is set in the workspace state.
Default launch configuration: MIMode = undefined,
                    miDebuggerPath = undefined,
                    stopAtEntry = undefined,
                    symbolSearchPath = undefined
Configure on open: true
Configure on edit: true
Configure after command: true
Only .PHONY targets: false
Save before build or configure: true
Build before launch: true
Clear output before build: true
Ignore directory commands: true
compile_commands.json path: null
Deduced command 'make.exe ' for configuration "Default"
Make was not given any path in settings and is also not found on the environment path.
Sending telemetry: eventName = makeNotFound
properties: reason = "not found in environment path"
The makefile entry point was not found. Make sure it exists at the location defined by makefile.makefilePath, makefile.configurations[].makefilePath, makefile.makeDirectory, makefile.configurations[].makeDirectoryor in the root of the workspace.
Sending telemetry: eventName = makefileNotFound
properties: reason = "not found at path given in settings"
Saving opened files before build.
Pre-configuring...
Script: "c:\Temp\issue259\.vscode\winavr346.bat"

c:\Temp\issue259>call "c:\Temp\issue259\.vscode\winavr346.bat" 
WINAVR 3.4.6

C:\WinAVR\20060421\utils\bin\make.exe
The pre-configure succeeded.
Sending telemetry: eventName = preConfigure
properties: exitCode = "0",triggeredBy = "settings (alwaysPreConfigure)"
measures: preConfigureElapsedTime = "0.438"
Exception thrown during the configure process: Cannot read property 'ActiveClient' of undefined
Preconfigure elapsed time: 0.44
Sending telemetry: eventName = configure
properties: firstTime = "false",makeDryRun = "true",readCache = "true",isClean = "true",processTargetsSeparately = "false",resetBuildTarget = "false",triggeredBy = "configure dirty (on open), settings (configureOnOpen)",preConfigureExitCode = "0",buildTarget = "(unset)"
measures: numberBuildTargets = "0",numberLaunchTargets = "0",numberIndexedSourceFiles = "0",numberMakefileConfigurations = "1",totalElapsedTime = "0.575",exitCode = "-5",preConfigureElapsedTime = "0.44"
Configure elapsed time: 0.575
Sending telemetry: eventName = settings
properties: makefile.loggingLevel = "Debug",makefile.makeDirectory = "undefined",makefile.makefilePath = "undefined",makefile.extensionLog = "...",makefile.preConfigureScript = "...",makefile.alwaysPreConfigure = "true"
  1. working
Found the following configurations defined in makefile.configurations setting: PeugeotTS
Deduced command 'make.exe -C c:\Temp\issue259\cavr\PeugeotTS\' for configuration "Default"
makefile.makeDirectory setting changed.
makefile.configurations setting changed.
Sending telemetry: eventName = settingsChanged
properties: makefile.makeDirectory = "..."
  1. notworking
No folder path to the makefile is defined in the settings file.
Found the following configurations defined in makefile.configurations setting: PeugeotTS
Deduced command 'make.exe ' for configuration "Default"
The makefile entry point was not found. Make sure it exists at the location defined by makefile.makefilePath, makefile.configurations[].makefilePath, makefile.makeDirectory, makefile.configurations[].makeDirectoryor in the root of the workspace.
Sending telemetry: eventName = makefileNotFound
properties: reason = "not found at path given in settings"
makefile.makeDirectory setting changed.
makefile.configurations setting changed.
Sending telemetry: eventName = settingsChanged
properties: makefile.makeDirectory = "undefined"

@andreeis
Copy link
Contributor

@d-chris, from reading the logs that you shared (the ones from the broken scenario):

No current configuration is defined in the workspace state. Assuming 'Default'.

It seems that you didn't select the PeugeotTS configuration which seems defined in .vscode/settings.json. The extension thinks that you still want "Default". Go to the left side UI panel of Makefile Tools, click on the "Configuration" node and select "PeugeotTS" from the quickPick that will open in the upper area of VSCode.

image

@d-chris
Copy link
Author

d-chris commented Jan 27, 2022

@andreeis problem is that the makefile-tools icon on the left side bar is NOT showing up to do this selection.

image


Workaround

for a workaround i could rename it to "Default" and then the icon shows up

image


Question

  1. is there a json-setting to specify a name for the default-configuration?
  2. where does the makefile-tool caches the name for the default configuration? in any of the makefile.extensionOutputFolder *.log files

@andreeis
Copy link
Contributor

andreeis commented Feb 2, 2022

@d-chris, we have a fix for the problem of not having the UI panel show up. It will be included in the soon upcoming 0.4 release.
There is no json setting for the default configuration and the string "Default" that you see there doesn't come from any cache, is just hard coded in the typescript source.
But, you won't need to worry about any of this once we release 0.4. You should be able to see the UI, set the PeugeotTS configuration and see no makefile entrypoint error.
Even now, another workaround you can do instead renaming your PeugeotTS to Default, is to just invoke the configure command from the palette. This should make the UI show up. Let us know if it doesn't happen this way.

@d-chris
Copy link
Author

d-chris commented Feb 2, 2022

@andreeis
sorry your config command doesn't show up

image

its only working when the UI icon is already on the left side bar

image

@andreeis
Copy link
Contributor

andreeis commented Feb 2, 2022

@d-chris, I don't understand. In your snippets I see that when "C/C++" left UI is missing, the palette has "Configure" and "Clean Configure" available to run and after you run one of them, "C/C++" shows up and "Set the current build configuration" becomes available in the palette. It's as is supposed to be for now (with the 0.4 fix, you'll see C/C++ UI and all commands from the beginning).

Also, if you click on "C/C++", you should see a whole window area like:
https://user-images.githubusercontent.com/48239328/151256924-9ebc2911-7cfe-46bc-925b-f6ce0e3a7483.png

@d-chris
Copy link
Author

d-chris commented Feb 3, 2022

@andreeis
the difference in the two snippets is the name of configuration, when the name is "Default" i see this window

Also, if you click on "C/C++", you should see a whole window area like:
https://user-images.githubusercontent.com/48239328/151256924-9ebc2911-7cfe-46bc-925b-f6ce0e3a7483.png


i tested to run either configure or clean configure. but still no makefile-tool in the side-bar

console output after running clean configuration

Saving opened files before build.
Pre-configuring...
Script: "c:\Temp\issue259\.vscode\winavr346.bat"

c:\Temp\issue259>call "c:\Temp\issue259\.vscode\winavr346.bat" 
WINAVR 3.4.6

C:\WinAVR\20060421\utils\bin\make.exe
The pre-configure succeeded.
Generating configuration cache with command: 'make.exe --dry-run --always-make --keep-going --print-directory'
Writing the dry-run output: c:\Temp\issue259\.vscode\dryrun.log
Generating dry-run elapsed time: 0.112
The make dry-run command failed.
IntelliSense may work only partially or not at all.
make.exe: *** No targets specified and no makefile found.  Stop.
 

You can see the detailed dry-run output at c:\Temp\issue259\.vscode\dryrun.log
Make sure that the extension is invoking the same make command as in your development prompt environment.
You may need to define or tweak a custom makefile configuration in settings via 'makefile.configurations' like described here: [link]
Also make sure your code base does not have any known issues with the dry-run switches used by this extension (makefile.dryrunSwitches).
If you are not able to fix the dry-run, open a GitHub issue in Makefile Tools repo: https://github.com/microsoft/vscode-makefile-tools/issues
Preprocessing: "c:\Temp\issue259\.vscode\dryrun.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
Updating the CppTools IntelliSense Configuration Provider.
Parsing dry-run output for CppTools Custom Configuration Provider.
Parsing for IntelliSense elapsed time: 0.006
Parsing for launch targets.
No launch configurations have been detected.
Complete list of launch targets: 
Parsing for launch targets elapsed time: 0.003
Generating parse content for build targets.
Generating targets information with command: 'make.exe all --print-data-base --no-builtin-variables --no-builtin-rules --question'
Writing the dry-run output: c:\Temp\issue259\.vscode\targets.log
Generating dry-run elapsed time: 0.102
Parsing for build targets from: "c:\Temp\issue259\.vscode\targets.log"
No build targets have been detected.
Complete list of build targets: 
Parsing build targets elapsed time: 0.001
Configure finished. The status for all the subphases that ran:
generateParseContent: return code = 2, elapsed time = 0.112
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0.006
parseLaunch: return code = 0, elapsed time = 0.003
dryrunTargets: return code = 2, elapsed time = 0.102
parseTargets: return code = 0, elapsed time = 0.001
Configure succeeded.
Preconfigure elapsed time: 0.286
Configure elapsed time: 0.516

console output after running configuration

Saving opened files before build.
Pre-configuring...
Script: "c:\Temp\issue259\.vscode\winavr346.bat"

c:\Temp\issue259>call "c:\Temp\issue259\.vscode\winavr346.bat" 
WINAVR 3.4.6

C:\WinAVR\20060421\utils\bin\make.exe
The pre-configure succeeded.
Generating configuration cache with command: 'make.exe --dry-run --keep-going --print-directory'
Writing the dry-run output: c:\Temp\issue259\.vscode\dryrun.log
Generating dry-run elapsed time: 0.111
The make dry-run command failed.
IntelliSense may work only partially or not at all.
make.exe: *** No targets specified and no makefile found.  Stop.
 

You can see the detailed dry-run output at c:\Temp\issue259\.vscode\dryrun.log
Make sure that the extension is invoking the same make command as in your development prompt environment.
You may need to define or tweak a custom makefile configuration in settings via 'makefile.configurations' like described here: [link]
Also make sure your code base does not have any known issues with the dry-run switches used by this extension (makefile.dryrunSwitches).
If you are not able to fix the dry-run, open a GitHub issue in Makefile Tools repo: https://github.com/microsoft/vscode-makefile-tools/issues
Preprocessing: "c:\Temp\issue259\.vscode\dryrun.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
Updating the CppTools IntelliSense Configuration Provider.
Parsing dry-run output for CppTools Custom Configuration Provider.
Parsing for IntelliSense elapsed time: 0.003
Parsing for launch targets.
No new new launch configurations have been detected.
Complete list of launch targets: 
Parsing for launch targets elapsed time: 0.001
Generating parse content for build targets.
Generating targets information with command: 'make.exe all --print-data-base --no-builtin-variables --no-builtin-rules --question'
Writing the dry-run output: c:\Temp\issue259\.vscode\targets.log
Generating dry-run elapsed time: 0.105
Parsing for build targets from: "c:\Temp\issue259\.vscode\targets.log"
No new build targets have been detected.
Complete list of build targets: 
Parsing build targets elapsed time: 0
Configure finished. The status for all the subphases that ran:
generateParseContent: return code = 2, elapsed time = 0.111
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0.003
parseLaunch: return code = 0, elapsed time = 0.001
dryrunTargets: return code = 2, elapsed time = 0.105
parseTargets: return code = 0, elapsed time = 0
Configure succeeded.
Preconfigure elapsed time: 0.269
Configure elapsed time: 0.493

thanks for all and for now i stick with the workaround to name my config "default".

@kwesterfeld2
Copy link

kwesterfeld2 commented Oct 3, 2022

Any news on this issue? I am facing the exact same problems, running under a Remote Container via SSH:

  • I see "Makefile entry point not found" when opening my project
  • I have tried various combinations of build configurations with names "Default"
  • I do not see the makefile palette in sidebar
  • I see "No folder path to the makefile is defined in the settings file." in the log file
  • My makefile configuration requires me to use "makeDirectory" to a directory relative in my project called "build"

My settings.json:

{
  "makefile.makeDirectory": "build",
  "makefile.configurations": [
    {
        "name": "Default",
        "makeDirectory": "build"
    },
  ],
}

I am using v0.6.0 of the extension

@kwesterfeld2
Copy link

I don't know if this makes any difference, but my build directory does not contain a Makefile, it contains a GNUmakefile which itself makes sub-folders that have a Makefile:

  ./build
  ./build/GNUmakefile
  ./build/src/Makefile

The problem seems to start to get resolved for me if I set makeDirectory to build/src. However, this results in only a partial build.

@andreeis
Copy link
Contributor

andreeis commented Oct 3, 2022

@kwesterfeld2, the extension detects "GNUmakefile" same as "makefile" or "Makefile", that is not the problem.
But if the entrypoint makefile is not present in the root of the folder you open in VSCode (one level up from "build") you need to point to it via "makefile.makefilePath". The "makeDirectory" or "makePath" settings are used in order to find the "make" executable, not the makefile.
Still you should see the left side "C/C++" panel. I don't know why you don't. The extension is supposed to activate when makefiles are found anywhere within the folder you open in VSCode. We'll figure this out as well.
Let me know what happens after setting "makefile.makefilePath": "build" and we'll continue from there.

@andreeis andreeis added the more info needed More info is needed from the community for us to properly triage and investigate label Oct 3, 2022
@kwesterfeld2
Copy link

@andreeis setting.json changed this way resulted in the same error:

{
	"makefile.makefilePath": "build",
	"makefile.configurations": [
		{
			"name": "Default",
			"makeArgs": [
				"-j",
				"16"
			]
		},
	],

And in the log:

The make dry-run command failed.
IntelliSense may work only partially or not at all.
make: *** /opt/ybd/postgresql/build: Is a directory.  Stop.

Setting the value back to makefile.makeDirectory seems now to work, while all my previous attempts were failing:

No path to the makefile is defined in the settings file.
Deduced command 'make -C /opt/ybd/postgresql/build -j 16' for configuration "Default"

From these settings. Something definitely cached and breaking in odd ways.

@andreeis
Copy link
Contributor

andreeis commented Oct 3, 2022

@kwesterfeld2, my mistake. "makefile.makefilePath": "build/GNUMakefile". Try that.
If that doesn't work either, set "makefile.loggingLevel": "Debug" and share with us the output of the "Makefile Tools" channel.

@andreeis
Copy link
Contributor

Closing this "more info needed" ticket as too old but please reactivate if you still see this happening with the latest release and provide more info for us to investigate.

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
Projects
None yet
Development

No branches or pull requests

3 participants