Skip to content

[Bug] parsing of environment from preconfigure script fails with bash exported functions or multiline environment variables #754

@diego-santacruz

Description

@diego-santacruz

Brief Issue Summary

Bash exported functions are exported to the environment with the BASH_FUNC_ prefix as multiline variables. But the parsing of the printenv output in applyEnvironment() does not support multiline variables.

As a result, partial function definitions are saved to the environment and then running any commands via bash fails as bash complains about syntax errors importing function definitions, like this.

/bin/sh: which: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `which'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'
/bin/sh: switchml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `switchml'
/bin/sh: scl: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `scl'
/bin/sh: ml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `ml'

If someone uses multiline environment variables a similar problem will occur: the parsed variable values will be incomplete.

Although multiline environment variables are rare, using printenv -0 would output NUL separated variables, instead of newline, with which it should be easy to add robust support for multiline environment variables in applyEnvironment().

Debug Log

Reading current configuration "fukiran-Debug" from the workspace state.
Reading current build target "spxevents" from the workspace state.
Dropping various extension output files at /home/SPINETIX/dsc/.vscode-server/data/User/workspaceStorage/ba806d4707f846485b1946ddecc95fbc/ms-vscode.makefile-tools
Logging level: Debug
Sending telemetry: eventName = varexp
properties: setting = "configurationCachePath",pattern = "configuration"
Sending telemetry: eventName = varexp
properties: setting = "configurationCachePath",pattern = "buildTarget"
Expanding from 'configurationCache_${configuration}_${buildTarget}.log' to 'configurationCache_fukiran-Debug_spxevents.log' for setting 'configurationCachePath'.
Configurations cached at /home/SPINETIX/dsc/.vscode-server/data/User/workspaceStorage/ba806d4707f846485b1946ddecc95fbc/ms-vscode.makefile-tools/configurationCache_fukiran-Debug_spxevents.log
No path to the makefile is defined in the settings file.
No folder path to the makefile is defined in the settings file.
Sending telemetry: eventName = varexp
properties: setting = "preConfigureScript",pattern = "workspaceFolder"
Expanding from '${workspaceFolder}/../build/scripts/build-with-sdk.sh' to '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/../build/scripts/build-with-sdk.sh' for setting 'preConfigureScript'.
Found pre-configure script defined as /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/../build/scripts/build-with-sdk.sh
Always pre-configure: true
Always post-configure: false
Dry-run switches: '--always-make', '--keep-going', '--print-directory', '--jobs', '1', 'V=1'
Found the following configurations defined in makefile.configurations setting: fukiran-Debug;fukiran-Release;intel-spx-apl-Debug;intel-spx-apl-Release;ikebana-Debug;ikebana-Release
No current launch configuration is set in the workspace state.
Default launch configuration: MIMode = undefined,
                miDebuggerPath = undefined,
                stopAtEntry = undefined,
                symbolSearchPath = undefined
Configure on open: false
Configure on edit: true
Configure after command: true
Only .PHONY targets: true
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 CONFIG=Debug PLATFORM=Linux64' for configuration "fukiran-Debug"
Sending telemetry: eventName = settings
properties: makefile.configurations.name = "...",makefile.configurations.preConfigureArgs = "...",makefile.configurations.makeArgs = "...",makefile.configurations.problemMatchers = "...",makefile.makeDirectory = "undefined",makefile.makefilePath = "undefined",makefile.configurationCachePath = "...",makefile.dryrunSwitches = "--always-make;--keep-going;--print-directory;...;...;...",makefile.configureOnOpen = "false",makefile.preConfigureScript = "...",makefile.alwaysPreConfigure = "true",makefile.phonyOnlyTargets = "true"
Saving opened files before build.
Pre-configuring...
Script: "/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/../build/scripts/build-with-sdk.sh"
The pre-configure succeeded.
Sending telemetry: eventName = preConfigure
properties: exitCode = "0",triggeredBy = "settings (alwaysPreConfigure)"
measures: preConfigureElapsedTime = "0.284"
Generating configuration cache with command: 'make spxevents CONFIG=Debug PLATFORM=Linux64 --dry-run --always-make --keep-going --print-directory --jobs 1 V=1'
Writing the dry-run output: /home/SPINETIX/dsc/.vscode-server/data/User/workspaceStorage/ba806d4707f846485b1946ddecc95fbc/ms-vscode.makefile-tools/dryrun.log
Spawning child process with:
 process name: make
 process args: spxevents,CONFIG=Debug,PLATFORM=Linux64,--dry-run,--always-make,--keep-going,--print-directory,--jobs,1,V=1
 working directory: /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
 shell type: default
Generating dry-run elapsed time: 0.151
Preprocessing: "/home/SPINETIX/dsc/.vscode-server/data/User/workspaceStorage/ba806d4707f846485b1946ddecc95fbc/ms-vscode.makefile-tools/dryrun.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
Updating the CppTools IntelliSense Configuration Provider.
Parsing dry-run output for CppTools Custom Configuration Provider.
Analyzing line: make: Entering directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system'
MAKE -C: entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Analyzing line: make[1]: Entering directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents'
MAKE -C: entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents
Found compiler command: x86_64-spx-linux-g++  -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux  	-MD -c -MF Debug_Linux64/spxevents.tmp.d -MT Debug_Linux64/spxevents.o  -Iinclude -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -D_REENTRANT -I/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux/usr/include/libevdev-1.0/  -O2 -pipe -g -feliminate-unused-debug-types    -O0 -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -U_FORTIFY_SOURCE -Wno-misleading-indentation -fvisibility-inlines-hidden -D_GLIBCXX_ASSERTIONS -Wno-unused-local-typedefs -D_GLIBCXX_DEBUG -Wall -std=c++14 -Wno-sign-compare /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/spxevents.cpp -o Debug_Linux64/spxevents.o
Error running the compiler args parser script /home/SPINETIX/dsc/.vscode-server/extensions/ms-vscode.makefile-tools-0.12.17/assets/parseCompilerArgs.sh for regions ( -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong  -O2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux  	-MD -c -MT Debug_Linux64/spxevents.o  -O2 -pipe -g -feliminate-unused-debug-types    -O0 -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -U_FORTIFY_SOURCE -Wno-misleading-indentation -fvisibility-inlines-hidden -Wno-unused-local-typedefs -Wall -Wno-sign-compare /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/spxevents.cpp -o Debug_Linux64/spxevents.o): /bin/sh: which: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `which'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'
/bin/sh: switchml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `switchml'
/bin/sh: scl: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `scl'
/bin/sh: ml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `ml'
/bin/bash: switchml: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `switchml'
/bin/bash: which: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `which'
/bin/bash: ml: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `ml'
/bin/bash: scl: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `scl'
/bin/bash: module: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `module'

Sending configuration for file /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/spxevents.cpp -----------------------------------
    Defines: _FORTIFY_SOURCE=2;_FILE_OFFSET_BITS=64;_GNU_SOURCE;_REENTRANT;_GLIBCXX_ASSERTIONS;_GLIBCXX_DEBUG
    Includes: /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/include;/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux/usr/include/libevdev-1.0/
    Force Includes: 
    Standard: c++14
    IntelliSense Mode: gcc-x64
    Compiler Path: /opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/x86_64-spxsdk-linux/usr/bin/x86_64-spx-linux/x86_64-spx-linux-g++
    Compiler Arguments: -m64;-march=nehalem;-mtune=generic;-mfpmath=sse;-msse4.2;-fstack-protector-strong;-O2;-Wformat;-Wformat-security;-Werror=format-security;--sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux;-MD;-c;-MT;Debug_Linux64/spxevents.o;-O2;-pipe;-g;-feliminate-unused-debug-types;-O0;-fno-omit-frame-pointer;-g;-feliminate-unused-debug-types;-pipe;-U_FORTIFY_SOURCE;-Wno-misleading-indentation;-fvisibility-inlines-hidden;-Wno-unused-local-typedefs;-Wall;-Wno-sign-compare;/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/spxevents.cpp;-o;Debug_Linux64/spxevents.o
---------------------------------------------------------------------------------------------------
Found compiler command: x86_64-spx-linux-g++  -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux  	-MD -c -MF Debug_Linux64/InputDev.tmp.d -MT Debug_Linux64/InputDev.o  -Iinclude -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE  -D_REENTRANT -I/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux/usr/include/libevdev-1.0/  -O2 -pipe -g -feliminate-unused-debug-types    -O0 -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -U_FORTIFY_SOURCE -Wno-misleading-indentation -fvisibility-inlines-hidden -D_GLIBCXX_ASSERTIONS -Wno-unused-local-typedefs -D_GLIBCXX_DEBUG -Wall -std=c++14 -Wno-sign-compare /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/InputDev.cpp -o Debug_Linux64/InputDev.o
Error running the compiler args parser script /home/SPINETIX/dsc/.vscode-server/extensions/ms-vscode.makefile-tools-0.12.17/assets/parseCompilerArgs.sh for regions ( -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong  -O2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux  	-MD -c -MT Debug_Linux64/InputDev.o  -O2 -pipe -g -feliminate-unused-debug-types    -O0 -fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -U_FORTIFY_SOURCE -Wno-misleading-indentation -fvisibility-inlines-hidden -Wno-unused-local-typedefs -Wall -Wno-sign-compare /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/InputDev.cpp -o Debug_Linux64/InputDev.o): /bin/sh: which: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `which'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'
/bin/sh: switchml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `switchml'
/bin/sh: scl: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `scl'
/bin/sh: ml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `ml'
/bin/bash: switchml: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `switchml'
/bin/bash: which: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `which'
/bin/bash: ml: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `ml'
/bin/bash: scl: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `scl'
/bin/bash: module: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `module'

Sending configuration for file /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/InputDev.cpp -----------------------------------
    Defines: _FORTIFY_SOURCE=2;_FILE_OFFSET_BITS=64;_GNU_SOURCE;_REENTRANT;_GLIBCXX_ASSERTIONS;_GLIBCXX_DEBUG
    Includes: /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/include;/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux/usr/include/libevdev-1.0/
    Force Includes: 
    Standard: c++14
    IntelliSense Mode: gcc-x64
    Compiler Path: /opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/x86_64-spxsdk-linux/usr/bin/x86_64-spx-linux/x86_64-spx-linux-g++
    Compiler Arguments: -m64;-march=nehalem;-mtune=generic;-mfpmath=sse;-msse4.2;-fstack-protector-strong;-O2;-Wformat;-Wformat-security;-Werror=format-security;--sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux;-MD;-c;-MT;Debug_Linux64/InputDev.o;-O2;-pipe;-g;-feliminate-unused-debug-types;-O0;-fno-omit-frame-pointer;-g;-feliminate-unused-debug-types;-pipe;-U_FORTIFY_SOURCE;-Wno-misleading-indentation;-fvisibility-inlines-hidden;-Wno-unused-local-typedefs;-Wall;-Wno-sign-compare;/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/InputDev.cpp;-o;Debug_Linux64/InputDev.o
---------------------------------------------------------------------------------------------------
Found compiler command: x86_64-spx-linux-g++  -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed  -Wl,-z,relro,-z,now  Debug_Linux64/spxevents.o Debug_Linux64/libspxevents.a   -ldaemon -levdev -o Debug_Linux64/spxevents
Error running the compiler args parser script /home/SPINETIX/dsc/.vscode-server/extensions/ms-vscode.makefile-tools-0.12.17/assets/parseCompilerArgs.sh for regions ( -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong  -O2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed  -Wl,-z,relro,-z,now  Debug_Linux64/spxevents.o Debug_Linux64/libspxevents.a   -ldaemon -levdev -o Debug_Linux64/spxevents): /bin/sh: which: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `which'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'
/bin/sh: switchml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `switchml'
/bin/sh: scl: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `scl'
/bin/sh: ml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `ml'
/bin/bash: switchml: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `switchml'
/bin/bash: which: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `which'
/bin/bash: ml: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `ml'
/bin/bash: scl: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `scl'
/bin/bash: module: line 1: syntax error: unexpected end of file
/bin/bash: error importing function definition for `module'

Analyzing line: make[1]: Leaving directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents'
POPD command or end of MAKE -C: leaving directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents and entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Analyzing line: make: Leaving directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system'
POPD command or end of MAKE -C: leaving directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system and entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Sending Workspace Browse Configuration: -----------------------------------
    Browse Path: /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/include;/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src;/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux/usr/include/libevdev-1.0/
    Standard: c++14
    Compiler Path: /opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/x86_64-spxsdk-linux/usr/bin/x86_64-spx-linux/x86_64-spx-linux-g++
    Compiler Arguments: -m64;-march=nehalem;-mtune=generic;-mfpmath=sse;-msse4.2;-fstack-protector-strong;-O2;-Wformat;-Wformat-security;-Werror=format-security;--sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux;-MD;-c;-MT;Debug_Linux64/InputDev.o;-O2;-pipe;-g;-feliminate-unused-debug-types;-O0;-fno-omit-frame-pointer;-g;-feliminate-unused-debug-types;-pipe;-U_FORTIFY_SOURCE;-Wno-misleading-indentation;-fvisibility-inlines-hidden;-Wno-unused-local-typedefs;-Wall;-Wno-sign-compare;/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/src/InputDev.cpp;-o;Debug_Linux64/InputDev.o
----------------------------------------------------------------------------
Parsing for IntelliSense elapsed time: 0.086
Parsing for launch targets.
Analyzing line: make: Entering directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system'
MAKE -C: entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Analyzing line: make[1]: Entering directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents'
MAKE -C: entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents
Found linker command: x86_64-spx-linux-g++  -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/devtools/spx-sdk/spxhmp/fukiran-trunk/sysroots/corei7-64-spx-linux -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed  -Wl,-z,relro,-z,now  Debug_Linux64/spxevents.o Debug_Linux64/libspxevents.a   -ldaemon -levdev -o Debug_Linux64/spxevents
Producing target binary: Debug_Linux64/spxevents
Adding launch configuration:
/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/Debug_Linux64>spxevents()
Analyzing line: make[1]: Leaving directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents'
POPD command or end of MAKE -C: leaving directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents and entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Analyzing line: make: Leaving directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system'
POPD command or end of MAKE -C: leaving directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system and entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Analyzing line: make: Entering directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system'
MAKE -C: entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Analyzing line: make[1]: Entering directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents'
MAKE -C: entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents
Analyzing line: make[1]: Leaving directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents'
POPD command or end of MAKE -C: leaving directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents and entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Analyzing line: make: Leaving directory '/home/SPINETIX/dsc/svn/dev/genesis/trunk/system'
POPD command or end of MAKE -C: leaving directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system and entering directory /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
Found the following 1 launch targets defined in the makefile: /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/Debug_Linux64>spxevents()
Complete list of launch targets: /home/SPINETIX/dsc/svn/dev/genesis/trunk/system/spxevents/Debug_Linux64>spxevents()
Parsing for launch targets elapsed time: 0.009
Generating parse content for build targets.
Generating targets information with command: 'make all CONFIG=Debug PLATFORM=Linux64 --print-data-base --no-builtin-variables --no-builtin-rules --question'
Writing the dry-run output: /home/SPINETIX/dsc/.vscode-server/data/User/workspaceStorage/ba806d4707f846485b1946ddecc95fbc/ms-vscode.makefile-tools/targets.log
Spawning child process with:
 process name: make
 process args: all,CONFIG=Debug,PLATFORM=Linux64,--print-data-base,--no-builtin-variables,--no-builtin-rules,--question
 working directory: /home/SPINETIX/dsc/svn/dev/genesis/trunk/system
 shell type: default
Generating dry-run elapsed time: 0.089
Parsing for build targets from: "/home/SPINETIX/dsc/.vscode-server/data/User/workspaceStorage/ba806d4707f846485b1946ddecc95fbc/ms-vscode.makefile-tools/targets.log"
Found the following 13 build targets defined in the makefile: all;clean;install-bin;install-conf;libsysutils.a;modeset;passgen;spxdispmanager;spxenroll;spxevents;spxiot;spxucd;updater
Complete list of build targets: all;clean;install-bin;install-conf;libsysutils.a;modeset;passgen;spxdispmanager;spxenroll;spxevents;spxiot;spxucd;updater
Parsing build targets elapsed time: 0.006
Configure finished. The status for all the subphases that ran:
loadFromCache: return code = -3, elapsed time = 0
generateParseContent: return code = 0, elapsed time = 0.151
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0.086
parseLaunch: return code = 0, elapsed time = 0.009
dryrunTargets: return code = 1, elapsed time = 0.089
parseTargets: return code = 0, elapsed time = 0.006
Configure succeeded.
Preconfigure elapsed time: 0.285
Configure elapsed time: 1.184
Sending telemetry: eventName = configure
properties: firstTime = "false",makeDryRun = "true",readCache = "false",isClean = "true",processTargetsSeparately = "true",resetBuildTarget = "false",triggeredBy = "command pallette (clean configure)",preConfigureExitCode = "0",buildTarget = "..."
measures: numberBuildTargets = "13",numberLaunchTargets = "1",numberIndexedSourceFiles = "2",numberMakefileConfigurations = "6",totalElapsedTime = "1.184",exitCode = "0",loadFromCache.exitCode = "-3",loadFromCache.elapsed = "0",generateParseContent.exitCode = "0",generateParseContent.elapsed = "0.151",preprocessParseContent.exitCode = "0",preprocessParseContent.elapsed = "0",parseIntelliSense.exitCode = "0",parseIntelliSense.elapsed = "0.086",parseLaunch.exitCode = "0",parseLaunch.elapsed = "0.009",dryrunTargets.exitCode = "1",dryrunTargets.elapsed = "0.089",parseTargets.exitCode = "0",parseTargets.elapsed = "0.006",preConfigureElapsedTime = "0.285"

Additional Information

As a workaround I have added the following to my preconfigure script

unexport_shell_functions() {
    # Bash exported shell functions interfere with VSCode's Makefile Tools extension, when it parses the generated
    # environment as they appear as multiline BASH_FUNC_... definitions in the printenv output. This function unexports
    # them all, without undefining them in case they are needed within this script.
    local fn

    for fn in $(compgen -A function); do
        declare -f +x "$fn"
    done
}

unexport_shell_functions

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions