[issue] spaces in project path cause build errors (was: Workbench Build Errors)

The Workbench local build fails. Git is installed. I created a new project, copied over the WebIDE working application source and saved it in the new file. I get the Build Output below. What going on?

Operating System:	Ubuntu 18.04.1 LTS
Computer:		Dell Precision 4600

VSCode Version Etc:	
Version: 1.32.3
Commit: a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4
Date: 2019-03-14T23:38:49.842Z
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-46-generic

Other extensions installed: 
	Workbench Snipelts 1.3.0
	Workbench Extension Pack for Particle Workbench 1.3.0
	Workbench Core 1.3.0 (for Particle)
	Workbench Themes 1.3.0

Build Output:
> Executing task: make -f '/home/john/.particle/toolchains/buildscripts/1.5.0/Makefile' compile-user -s <

fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
../../../build/module.mk:219: target `for' given more than once in the same rule.
../../../build/module.mk:227: warning: overriding recipe for target `/home/john/Projects'
../../../build/module.mk:220: warning: ignoring old recipe for target `/home/john/Projects'
../../../build/module.mk:227: warning: overriding recipe for target `for'
../../../build/module.mk:220: warning: ignoring old recipe for target `for'
../../../build/module.mk:227: warning: overriding recipe for target `ParticleIO/WorkbenchLocal/TestLEDLocal/BlinkLedLocal/target//Projects'
../../../build/module.mk:220: warning: ignoring old recipe for target `ParticleIO/WorkbenchLocal/TestLEDLocal/BlinkLedLocal/target//Projects'
../../../build/module.mk:226: target `for' given more than once in the same rule.
../../../build/module.mk:236: warning: overriding recipe for target `/home/john/Projects'
../../../build/module.mk:227: warning: ignoring old recipe for target `/home/john/Projects'
../../../build/module.mk:236: warning: overriding recipe for target `for'
../../../build/module.mk:227: warning: ignoring old recipe for target `for'
../../../build/module.mk:236: warning: overriding recipe for target `ParticleIO/WorkbenchLocal/TestLEDLocal/BlinkLedLocal/target//Projects'
../../../build/module.mk:227: warning: ignoring old recipe for target `ParticleIO/WorkbenchLocal/TestLEDLocal/BlinkLedLocal/target//Projects'
../../../build/module.mk:235: target `for' given more than once in the same rule.
../../../build/module.mk:260: warning: overriding recipe for target `/home/john/Projects'
../../../build/module.mk:236: warning: ignoring old recipe for target `/home/john/Projects'
../../../build/module.mk:260: warning: overriding recipe for target `for'
../../../build/module.mk:236: warning: ignoring old recipe for target `for'
../../../build/module.mk:259: *** mixed implicit and normal rules.  Stop.
make[1]: *** [modules/photon/user-part] Error 2
make: *** [compile-user] Error 2
The terminal process terminated with exit code: 2

Audit Environment:

{
"username": "johnpart100@gmail.com",
"workspace": {
"name": "WebControlledLedProject",
"isWorkspace": false,
"folders": [
{
"location": "/home/john/Projects for ParticleIO/NewTestProjects/WebPageControlLed/WebControlledLedProject",
"settings": {
"firmwareName": "deviceOS",
"firmwareVersion": "1.0.1",
"targetDevice": "EI",
"targetPlatform": "photon",
"compileButtonAction": "localAppDeviceOS",
"flashButtonAction": "localAppDeviceOS",
"disableWelcomeScreen": false,
"disableLocalCompilerDirtyCheck": false
},
"files": [
".vscode",
".vscode/c_cpp_properties.json",
".vscode/launch.json",
".vscode/settings.json",
".vscode/tasks.json",
"README.md",
"photon_firmware_1552334225191.bin",
"project.properties",
"src",
"src/API Tests",
"src/Untitled-1",
"src/WebControlledLedProject.ino"
]
}
]
},
"cli": {
"binpath": "/home/john/.vscode/extensions/particle.particle-vscode-core-1.2.2/src/cli/bin/linux/amd64/particle",
"ok": true,
"version": "1.40.0",
"installed": 1550767691925
},
"localCompiler": {
"dependencies": [
"deviceOS@1.0.1",
"gcc-arm@5.3.1",
"buildtools@1.0.1",
"buildscripts@1.2.0",
"openocd@0.10.0-particle.1"
]
},
"platform": {
"os": "linux",
"type": "Linux",
"release": "4.15.0-46-generic",
"arch": "x64",
"path": {
"key": "PATH",
"value": "/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/gcc-arm/bin"
},
"homeDir": "/home/john",
"particleDir": "/home/john/.particle",
"localCompilerToolchainDir": "/home/john/.particle/toolchains"
},
"env": {
"CLUTTER_IM_MODULE": "xim",
"XDG_MENU_PREFIX": "gnome-",
"SNAP_USER_DATA": "/home/john/snap/vscode/89",
"LANG": "en_US.UTF-8",
"DISPLAY": ":0",
"GNOME_SHELL_SESSION_MODE": "ubuntu",
"SNAP_REVISION": "89",
"DISABLE_WAYLAND": "1",
"SNAP_ARCH": "amd64",
"SNAP_INSTANCE_KEY": "",
"USERNAME": "john",
"XDG_VTNR": "2",
"GIO_LAUNCHED_DESKTOP_FILE_PID": "5056",
"SSH_AUTH_SOCK": "/run/user/1000/keyring/ssh",
"XDG_SESSION_ID": "2",
"SNAP_USER_COMMON": "/home/john/snap/vscode/common",
"USER": "john",
"DESKTOP_SESSION": "ubuntu",
"QT4_IM_MODULE": "xim",
"TEXTDOMAINDIR": "/usr/share/locale/",
"PWD": "/home/john",
"HOME": "/home/john",
"TEXTDOMAIN": "im-config",
"SNAP": "/snap/vscode/89",
"SSH_AGENT_PID": "2510",
"QT_ACCESSIBILITY": "1",
"SNAP_COMMON": "/var/snap/vscode/common",
"XDG_SESSION_TYPE": "x11",
"SNAP_NAME": "vscode",
"XDG_DATA_DIRS": "/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop",
"SNAP_INSTANCE_NAME": "vscode",
"SNAP_DATA": "/var/snap/vscode/89",
"GSETTINGS_SCHEMA_DIR": "/snap/vscode/89/usr/share/glib-2.0/schemas",
"XDG_SESSION_DESKTOP": "ubuntu",
"GJS_DEBUG_OUTPUT": "stderr",
"GDK_PIXBUF_MODULE_FILE": "/home/john/snap/vscode/common/.cache/gdk-pixbuf-loaders.cache",
"GTK_MODULES": "gail:atk-bridge",
"SNAP_COOKIE": "y54kmD2wjlfng32c1THyN0VQ8TpQqRJ2QTmBnMDvlF7T",
"WINDOWPATH": "2",
"SHELL": "/bin/bash",
"QT_IM_MODULE": "ibus",
"XMODIFIERS": "@im=ibus",
"IM_CONFIG_PHASE": "2",
"XDG_CURRENT_DESKTOP": "ubuntu:GNOME",
"GPG_AGENT_INFO": "/run/user/1000/gnupg/S.gpg-agent:0:1",
"BAMF_DESKTOP_FILE_HINT": "/var/lib/snapd/desktop/applications/vscode_vscode.desktop",
"SNAP_REEXEC": "",
"GIO_LAUNCHED_DESKTOP_FILE": "/var/lib/snapd/desktop/applications/vscode_vscode.desktop",
"XDG_SEAT": "seat0",
"SHLVL": "1",
"GDK_PIXBUF_MODULEDIR": "/snap/vscode/89/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders",
"GDMSESSION": "ubuntu",
"GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
"XDG_CACHE_HOME": "/home/john/snap/vscode/common/.cache",
"LOGNAME": "john",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
"XDG_RUNTIME_DIR": "/run/user/1000/snap.vscode",
"XAUTHORITY": "/run/user/1000/gdm/Xauthority",
"SNAP_CONTEXT": "y54kmD2wjlfng32c1THyN0VQ8TpQqRJ2QTmBnMDvlF7T",
"XDG_CONFIG_DIRS": "/etc/xdg/xdg-ubuntu:/etc/xdg",
"PATH": "/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/gcc-arm/bin",
"SNAP_VERSION": "1.32.3-1552606978",
"GJS_DEBUG_TOPICS": "JS ERROR;JS LOG",
"SNAP_LIBRARY_PATH": "/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void",
"SESSION_MANAGER": "local/john-Precision-M4600:@/tmp/.ICE-unix/2334,unix/john-Precision-M4600:/tmp/.ICE-unix/2334",
"GTK_IM_MODULE": "ibus",
"_": "/snap/vscode/89/usr/share/code/bin/../code",
"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
"VSCODE_CLI": "1",
"ELECTRON_NO_ATTACH_CONSOLE": "1",
"VSCODE_IPC_HOOK": "/run/user/1000/snap.vscode/vscode-f7f7606b-1.32.3-main.sock",
"VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
"VSCODE_LOGS": "/home/john/.config/Code/logs/20190328T091342",
"AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
"PIPE_LOGGING": "true",
"VERBOSE_LOGGING": "true",
"VSCODE_IPC_HOOK_EXTHOST": "/tmp/vscode-ipc-eaff8f05-9e5f-42a9-8f9f-141d5e7d72cb.sock",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_LOG_STACK": "false",
"VSCODE_PREVENT_FOREIGN_INSPECT": "true",
"ELECTRON_RUN_AS_NODE": "1"
},
"versions": {
"http_parser": "2.8.0",
"node": "10.2.0",
"v8": "6.6.346.32",
"uv": "1.20.3",
"zlib": "1.2.11",
"ares": "1.14.0",
"modules": "64",
"nghttp2": "1.29.0",
"napi": "3",
"openssl": "1.1.0h"
},
"vscode": {
"appName": "Visual Studio Code",
"appRoot": "/snap/vscode/89/usr/share/code/resources/app",
"machineId": "27e8fcf1497fc19adbc314e294713e2ada098f89c87aaeb296ff31a500be01b0",
"sessionId": "09fc69d1-1c5b-47d4-b72b-a1eed025b3c61553782429296",
"version": "1.32.3"
},
"extensions": [
{
"id": "ms-vscode.node-debug",
"version": "1.32.4"
},
{
"id": "ms-vscode.node-debug2",
"version": "1.32.0"
},
{
"id": "ms-vscode.references-view",
"version": "0.0.26"
},
{
"id": "marus25.cortex-debug",
"version": "0.2.3"
},
{
"id": "ms-vscode.cpptools",
"version": "0.21.0"
},
{
"id": "particle.particle-vscode-core",
"version": "1.2.2"
},
{
"id": "particle.particle-vscode-pack",
"version": "1.2.2"
},
{
"id": "particle.particle-vscode-snippets",
"version": "1.2.2"
},
{
"id": "particle.particle-vscode-theme",
"version": "1.2.2"
}
]
}

Git is installed

sorry about that, it's a silly, non-error message - see:

I created a new project

did you create the project via the Particle: Create Project command (or "create project" button on the main "Welcome" screen that launches when you click the Particle logo in the "Activity" bar on the left)?

see docs here:

https://docs.particle.io/tutorials/developer-tools/workbench/#working-with-particle-projects

copied over the WebIDE working application source and saved it in the new file

are you comfortable sharing the source? or if not, are you able to create a bare-bones version that reproduces the error?

Audit Environment

".vscode/c_cpp_properties.json",
".vscode/tasks.json",

these files are not required and should be deleted unless you've purposely added them yourself.

{
"id": "particle.particle-vscode-pack",
"version": "1.2.2"
}

we released v1.3.0 yesterday - it's worth upgrading though it's not likely to fix your build error(s)

I created the project using Particle: Create Project. The project workspace file is not specifically displayed in workbench as indicated in the documentation.

I am using a bare bones system. The program is a copy of Particle’s LED blinker program from the hardware tutorial. Just tried again and created a new project workspace and directory, built it and got same type of errors.

Updated the particle.particle-vscode-pack. Deleted the others noted yesterday.

The program is a copy of Particle’s LED blinker program from the hardware tutorial

this one?

The project workspace file is not specifically displayed in workbench as indicated in the documentation

you mean .code-workspace? if so, that's expected :+1:

Yes, That is the example I used today. The example yesterday was like that one with some of my comments, so it should be the same.

Yes, .code-workspace .

here’s what i tried:

  1. open VSCode
  2. login: run Particle: Login, provide credentials, see “logged in as” notification
  3. create a project: run Particle: Create Project, enter info, see VSCode load newly created project folder
  4. add source code: open the newly created src/support-blink.ino file, copy & paste in source from https://build.particle.io/examples/56214d636666d9ece3000001
  5. compile: run the Particle: Compile application (local) task from VSCode’s main menu: “Terminal > Run Task…” then pick the aforementioned task from the list shown

this succeeds with:


(screenshot shows build “success” logs and intellisense’s “peek definition” pop-up window)

my audit info:


*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

{
    "username": "m@particle.io",
    "workspace": {
        "name": "support-blink",
        "isWorkspace": false,
        "folders": [
            {
                "location": "/home/m/Projects/workbench-testing/support-blink",
                "settings": {
                    "firmwareName": "deviceOS",
                    "firmwareVersion": "1.0.1",
                    "targetDevice": "",
                    "targetPlatform": "photon",
                    "compileButtonAction": "localAppDeviceOS",
                    "flashButtonAction": "localAppDeviceOS",
                    "disableWelcomeScreen": true,
                    "disableLocalCompilerDirtyCheck": false,
                    "enableVerboseLocalCompilerLogging": false
                },
                "files": [
                    ".vscode",
                    ".vscode/ipch",
                    ".vscode/launch.json",
                    ".vscode/settings.json",
                    "README.md",
                    "project.properties",
                    "src",
                    "src/support-blink.cpp",
                    "src/support-blink.ino",
                    "target",
                    "target/obj",
                    "target/support-blink.bin",
                    "target/support-blink.bin.crc_block",
                    "target/support-blink.bin.no_crc",
                    "target/support-blink.elf",
                    "target/support-blink.hex",
                    "target/support-blink.lst",
                    "target/support-blink.map"
                ]
            }
        ]
    },
    "cli": {
        "binpath": "/home/m/.vscode/extensions/particle.particle-vscode-core-1.3.0/src/cli/bin/linux/amd64/particle",
        "ok": true,
        "version": "1.40.0"
    },
    "localCompiler": {
        "ok": true,
        "dependencies": [
            {
                "id": "deviceOS@1.0.1",
                "ok": true
            },
            {
                "id": "gcc-arm@5.3.1",
                "ok": true
            },
            {
                "id": "buildtools@1.0.3",
                "ok": true
            },
            {
                "id": "buildscripts@1.5.0",
                "ok": true
            },
            {
                "id": "openocd@0.10.0-particle.1",
                "ok": true
            },
            {
                "id": "deviceOS@0.9.0",
                "ok": true
            }
        ]
    },
    "platform": {
        "os": "linux",
        "type": "Linux",
        "release": "4.15.0-46-generic",
        "arch": "x64",
        "path": {
            "key": "PATH",
            "value": "/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin"
        },
        "homeDir": "/home/m",
        "particleDir": "/home/m/.particle",
        "localCompilerToolchainDir": "/home/m/.particle/toolchains"
    },
    "env": {
        "USER": "m",
        "SSH_AGENT_PID": "3417",
        "HOME": "/home/m",
        "QT4_IM_MODULE": "xim",
        "GNOME_SHELL_SESSION_MODE": "ubuntu",
        "GTK_MODULES": "gail:atk-bridge",
        "DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
        "PULSE_SCRIPT": "/etc/xrdp/pulse/default.pa",
        "LOGNAME": "m",
        "GTK_IM_MODULE": "ibus",
        "XDG_SESSION_ID": "c2",
        "PATH": "/sbin:/bin:/usr/bin:/usr/local/bin:/snap/bin",
        "XRDP_SOCKET_PATH": "/var/run/xrdp/sockdir",
        "XDG_RUNTIME_DIR": "/run/user/1000",
        "DISPLAY": ":10.0",
        "LANG": "en_US.UTF-8",
        "XDG_CURRENT_DESKTOP": "Unity",
        "XMODIFIERS": "@im=ibus",
        "UID": "1000",
        "SSH_AUTH_SOCK": "/run/user/1000/keyring/ssh",
        "SHELL": "/bin/bash",
        "QT_ACCESSIBILITY": "1",
        "XRDP_SESSION": "1",
        "GPG_AGENT_INFO": "/run/user/1000/gnupg/S.gpg-agent:0:1",
        "QT_IM_MODULE": "xim",
        "PWD": "/home/m",
        "XDG_DATA_DIRS": "/usr/share/gnome:/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop",
        "XDG_CONFIG_DIRS": "/etc/xdg/user-dirs.conf:/etc/xdg",
        "CLUTTER_IM_MODULE": "xim",
        "GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
        "XDG_MENU_PREFIX": "gnome-",
        "SESSION_MANAGER": "local/nuc-ubuntu:@/tmp/.ICE-unix/3352,unix/nuc-ubuntu:/tmp/.ICE-unix/3352",
        "GIO_LAUNCHED_DESKTOP_FILE": "/usr/share/applications/code.desktop",
        "GIO_LAUNCHED_DESKTOP_FILE_PID": "7070",
        "GJS_DEBUG_OUTPUT": "stderr",
        "GJS_DEBUG_TOPICS": "JS ERROR;JS LOG",
        "VSCODE_IPC_HOOK": "/run/user/1000/vscode-226f97c9-1.32.3-main.sock",
        "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
        "VSCODE_LOGS": "/home/m/.config/Code/logs/20190329T140544",
        "CHROME_DESKTOP": "code-url-handler.desktop",
        "LESSCLOSE": "/bin/lesspipe %s %s",
        "LESSOPEN": "| /bin/lesspipe %s",
        "LS_COLORS": "",
        "NO_AT_BRIDGE": "1",
        "SHLVL": "1",
        "VSCODE_NODE_CACHED_DATA_DIR": "/home/m/.config/Code/CachedData/a3db5be9b5c6ba46bb7666ec5d60178ecc2eaae4",
        "VSCODE_PID": "7070",
        "_": "/usr/share/code/code",
        "AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
        "PIPE_LOGGING": "true",
        "VERBOSE_LOGGING": "true",
        "VSCODE_IPC_HOOK_EXTHOST": "/tmp/vscode-ipc-4ad02039-2441-41f8-82aa-0cab86f2dafug.sock",
        "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
        "VSCODE_LOG_STACK": "false",
        "VSCODE_PREVENT_FOREIGN_INSPECT": "true",
        "ELECTRON_RUN_AS_NODE": "1",
        "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true"
    },
    "versions": {
        "http_parser": "2.8.0",
        "node": "10.2.0",
        "v8": "6.6.346.32",
        "uv": "1.20.3",
        "zlib": "1.2.11",
        "ares": "1.14.0",
        "modules": "64",
        "nghttp2": "1.29.0",
        "napi": "3",
        "openssl": "1.1.0h"
    },
    "vscode": {
        "appName": "Visual Studio Code",
        "appRoot": "/usr/share/code/resources/app",
        "machineId": "ac3f06e8652fc0768bed4e55b453d72735026f74c24f630e08ae5a2d08445087",
        "sessionId": "26867d93-9649-4cba-864c-db37cb0027b21553893596696",
        "version": "1.32.3"
    },
    "extensions": [
        {
            "id": "ms-vscode.node-debug",
            "version": "1.32.4"
        },
        {
            "id": "ms-vscode.node-debug2",
            "version": "1.32.0"
        },
        {
            "id": "ms-vscode.references-view",
            "version": "0.0.26"
        },
        {
            "id": "marus25.cortex-debug",
            "version": "0.2.3"
        },
        {
            "id": "ms-vscode.cpptools",
            "version": "0.22.1"
        },
        {
            "id": "particle.particle-vscode-core",
            "version": "1.3.0"
        },
        {
            "id": "particle.particle-vscode-pack",
            "version": "1.3.0"
        },
        {
            "id": "particle.particle-vscode-snippets",
            "version": "1.3.0"
        },
        {
            "id": "particle.particle-vscode-theme",
            "version": "1.3.0"
        }
    ]
}

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:
https://community.particle.io/t/information-how-to-report-bugs-and-provide-feedback/44245

how does all of that compare to your config and the steps you took to produce your error?

have you ever been able to successfully compile a project within Workbench? if so, you may need to run clean - specifically these tasks:

Particle: Clean application & DeviceOS (local)
Particle: Clean application for debug (local)

typically we’ll warn you if your local environment is “dirty” when you first open your project.

m_m

I get this.
After Particle: Compile application (local) I get the below. I never get the change to select what to compile.

../../../build/module.mk:236: warning: overriding recipe for target ParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2/target//Projects' ../../../build/[module.mk:227](http://module.mk:227): warning: ignoring old recipe for target ParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2/target//Projects'
../../../build/module.mk:235: target for' given more than once in the same rule. ../../../build/[module.mk:260](http://module.mk:260): warning: overriding recipe for target /home/john/Projects'
../../../build/module.mk:236: warning: ignoring old recipe for target /home/john/Projects' ../../../build/[module.mk:260](http://module.mk:260): warning: overriding recipe for target for'
../../../build/module.mk:236: warning: ignoring old recipe for target `for'
../../../build/module.mk:259: *** mixed implicit and normal rules. Stop.
make[1]: *** [modules/photon/user-part] Error 2
make: *** [compile-user] Error 2
The terminal process terminated with exit code: 2

No, I have never been able to have a successful compile. Cleaning with either command results with a similar error as before. I will include the dump again after I list differences in your file and mine.

  1. Anything with target before it is missing.
  2. "cli": section has this in addition
    "version": "1.40.0",
    "installed": 1553803760927

"localCompiler": {
"ok": false, where yours is true
4. under "platform": directory reference are different
"path": {
"key": "PATH",
"value": "/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/gcc-arm/bin"
},
"homeDir": "/home/john",
"particleDir": "/home/john/.particle",
"localCompilerToolchainDir": "/home/john/.particle/toolchains"
},
5.Many things under "env" are different
"env": {
"CLUTTER_IM_MODULE": "xim",
"XDG_MENU_PREFIX": "gnome-",
"SNAP_USER_DATA": "/home/john/snap/vscode/89",
"LANG": "en_US.UTF-8",
"DISPLAY": ":0",
"GNOME_SHELL_SESSION_MODE": "ubuntu",
"SNAP_REVISION": "89",
"DISABLE_WAYLAND": "1",
"SNAP_ARCH": "amd64",
"SNAP_INSTANCE_KEY": "",
"USERNAME": "????",
"XDG_VTNR": "2",
"GIO_LAUNCHED_DESKTOP_FILE_PID": "5026",
"SSH_AUTH_SOCK": "/run/user/1000/keyring/ssh",
"XDG_SESSION_ID": "3",
"SNAP_USER_COMMON": "/home/john/snap/vscode/common",
"USER": "?????",
"DESKTOP_SESSION": "ubuntu",
"QT4_IM_MODULE": "xim",
"TEXTDOMAINDIR": "/usr/share/locale/",
"PWD": "/home/john",
"HOME": "/home/john",
"TEXTDOMAIN": "im-config",
"SNAP": "/snap/vscode/89",
"SSH_AGENT_PID": "2861",
"QT_ACCESSIBILITY": "1",
"SNAP_COMMON": "/var/snap/vscode/common",
"XDG_SESSION_TYPE": "x11",
"SNAP_NAME": "vscode",
"XDG_DATA_DIRS": "/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop",
"SNAP_INSTANCE_NAME": "vscode",
"SNAP_DATA": "/var/snap/vscode/89",
"GSETTINGS_SCHEMA_DIR": "/snap/vscode/89/usr/share/glib-2.0/schemas",
"XDG_SESSION_DESKTOP": "ubuntu",
"GJS_DEBUG_OUTPUT": "stderr",
"GDK_PIXBUF_MODULE_FILE": "/home/john/snap/vscode/common/.cache/gdk-pixbuf-loaders.cache",
"GTK_MODULES": "gail:atk-bridge",
"SNAP_COOKIE": "????",
"WINDOWPATH": "2",
"SHELL": "/bin/bash",
"QT_IM_MODULE": "ibus",
"XMODIFIERS": "@im=ibus",
"IM_CONFIG_PHASE": "2",
"XDG_CURRENT_DESKTOP": "ubuntu:GNOME",
"GPG_AGENT_INFO": "/run/user/1000/gnupg/S.gpg-agent:0:1",
"BAMF_DESKTOP_FILE_HINT": "/var/lib/snapd/desktop/applications/vscode_vscode.desktop",
"SNAP_REEXEC": "",
"GIO_LAUNCHED_DESKTOP_FILE": "/var/lib/snapd/desktop/applications/vscode_vscode.desktop",
"XDG_SEAT": "seat0",
"SHLVL": "1",
"GDK_PIXBUF_MODULEDIR": "/snap/vscode/89/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders",
"GDMSESSION": "ubuntu",
"GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
"XDG_CACHE_HOME": "/home/john/snap/vscode/common/.cache",
"LOGNAME": "john",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
"XDG_RUNTIME_DIR": "/run/user/1000/snap.vscode",
"XAUTHORITY": "/run/user/1000/gdm/Xauthority",
"SNAP_CONTEXT": "y54kmD2wjlfng32c1THyN0VQ8TpQqRJ2QTmBnMDvlF7T",
"XDG_CONFIG_DIRS": "/etc/xdg/xdg-ubuntu:/etc/xdg",
"PATH": "/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/gcc-arm/bin",
"SNAP_VERSION": "1.32.3-1552606978",
"GJS_DEBUG_TOPICS": "JS ERROR;JS LOG",
"SNAP_LIBRARY_PATH": "/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void",
"SESSION_MANAGER": "local/john-Precision-M4600:@/tmp/.ICE-unix/2784,unix/john-Precision-M4600:/tmp/.ICE-unix/2784",
"GTK_IM_MODULE": "ibus",
"_": "/snap/vscode/89/usr/share/code/bin/../code",
"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
"VSCODE_CLI": "1",
"ELECTRON_NO_ATTACH_CONSOLE": "1",
"VSCODE_IPC_HOOK": "/run/user/1000/snap.vscode/vscode-f7f7606b-1.32.3-main.sock",
"VSCODE_NLS_CONFIG": "{"locale":"en-us","availableLanguages":{},"_languagePackSupport":true}",
"VSCODE_LOGS": "/home/john/.config/Code/logs/20190401T082511",
"AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
"PIPE_LOGGING": "true",
"VERBOSE_LOGGING": "true",
"VSCODE_IPC_HOOK_EXTHOST": "/tmp/vscode-ipc-5049c38f-ba9c-426a-83b7-c06022436c74.sock",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_LOG_STACK": "false",
"VSCODE_PREVENT_FOREIGN_INSPECT": "true",
"ELECTRON_RUN_AS_NODE": "1"
},
6. "vscode":
"vscode": {
"appName": "Visual Studio Code",
"appRoot": "/snap/vscode/89/usr/share/code/resources/app",
"machineId": "??",
"sessionId": "?????",
"version": "1.32.3"
},

Below is the whole dump.

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:

{
"username": "johnpart100@gmail.com",
"workspace": {
"name": "BLINKERLOCAL2",
"isWorkspace": false,
"folders": [
{
"location": "/home/john/Projects for ParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2",
"settings": {
"firmwareName": "deviceOS",
"firmwareVersion": "1.0.1",
"targetDevice": "",
"targetPlatform": "photon",
"compileButtonAction": "localAppDeviceOS",
"flashButtonAction": "localAppDeviceOS",
"disableWelcomeScreen": false,
"disableLocalCompilerDirtyCheck": false,
"enableVerboseLocalCompilerLogging": false
},
"files": [
".vscode",
".vscode/ipch",
".vscode/launch.json",
".vscode/settings.json",
"README.md",
"project.properties",
"src",
"src/BLINKERLOCAL2.ino",
"src/support-blink.ino"
]
}
]
},
"cli": {
"binpath": "/home/john/.vscode/extensions/particle.particle-vscode-core-1.3.0/src/cli/bin/linux/amd64/particle",
"ok": true,
"version": "1.40.0",
"installed": 1553803760927
},
"localCompiler": {
"ok": false,
"dependencies": [
{
"id": "deviceOS@1.0.1",
"ok": true
},
{
"id": "gcc-arm@5.3.1",
"ok": true
},
{
"id": "buildtools@1.0.3",
"ok": true
},
{
"id": "buildscripts@1.5.0",
"ok": true
},
{
"id": "openocd@0.10.0-particle.1",
"ok": false
},
{
"id": "deviceOS@0.8.0-rc.14",
"ok": true
},
{
"id": "deviceOS@0.6.4",
"ok": true
},
{
"id": "gcc-arm@4.9.3",
"ok": true
}
]
},
"platform": {
"os": "linux",
"type": "Linux",
"release": "4.15.0-46-generic",
"arch": "x64",
"path": {
"key": "PATH",
"value": "/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/gcc-arm/bin"
},
"homeDir": "/home/john",
"particleDir": "/home/john/.particle",
"localCompilerToolchainDir": "/home/john/.particle/toolchains"
},
"env": {
"CLUTTER_IM_MODULE": "xim",
"XDG_MENU_PREFIX": "gnome-",
"SNAP_USER_DATA": "/home/john/snap/vscode/89",
"LANG": "en_US.UTF-8",
"DISPLAY": ":0",
"GNOME_SHELL_SESSION_MODE": "ubuntu",
"SNAP_REVISION": "89",
"DISABLE_WAYLAND": "1",
"SNAP_ARCH": "amd64",
"SNAP_INSTANCE_KEY": "",
"USERNAME": "john",
"XDG_VTNR": "2",
"GIO_LAUNCHED_DESKTOP_FILE_PID": "5026",
"SSH_AUTH_SOCK": "/run/user/1000/keyring/ssh",
"XDG_SESSION_ID": "3",
"SNAP_USER_COMMON": "/home/john/snap/vscode/common",
"USER": "john",
"DESKTOP_SESSION": "ubuntu",
"QT4_IM_MODULE": "xim",
"TEXTDOMAINDIR": "/usr/share/locale/",
"PWD": "/home/john",
"HOME": "/home/john",
"TEXTDOMAIN": "im-config",
"SNAP": "/snap/vscode/89",
"SSH_AGENT_PID": "2861",
"QT_ACCESSIBILITY": "1",
"SNAP_COMMON": "/var/snap/vscode/common",
"XDG_SESSION_TYPE": "x11",
"SNAP_NAME": "vscode",
"XDG_DATA_DIRS": "/usr/share/ubuntu:/usr/local/share:/usr/share:/var/lib/snapd/desktop",
"SNAP_INSTANCE_NAME": "vscode",
"SNAP_DATA": "/var/snap/vscode/89",
"GSETTINGS_SCHEMA_DIR": "/snap/vscode/89/usr/share/glib-2.0/schemas",
"XDG_SESSION_DESKTOP": "ubuntu",
"GJS_DEBUG_OUTPUT": "stderr",
"GDK_PIXBUF_MODULE_FILE": "/home/john/snap/vscode/common/.cache/gdk-pixbuf-loaders.cache",
"GTK_MODULES": "gail:atk-bridge",
"SNAP_COOKIE": "y54kmD2wjlfng32c1THyN0VQ8TpQqRJ2QTmBnMDvlF7T",
"WINDOWPATH": "2",
"SHELL": "/bin/bash",
"QT_IM_MODULE": "ibus",
"XMODIFIERS": "@im=ibus",
"IM_CONFIG_PHASE": "2",
"XDG_CURRENT_DESKTOP": "ubuntu:GNOME",
"GPG_AGENT_INFO": "/run/user/1000/gnupg/S.gpg-agent:0:1",
"BAMF_DESKTOP_FILE_HINT": "/var/lib/snapd/desktop/applications/vscode_vscode.desktop",
"SNAP_REEXEC": "",
"GIO_LAUNCHED_DESKTOP_FILE": "/var/lib/snapd/desktop/applications/vscode_vscode.desktop",
"XDG_SEAT": "seat0",
"SHLVL": "1",
"GDK_PIXBUF_MODULEDIR": "/snap/vscode/89/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders",
"GDMSESSION": "ubuntu",
"GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
"XDG_CACHE_HOME": "/home/john/snap/vscode/common/.cache",
"LOGNAME": "john",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
"XDG_RUNTIME_DIR": "/run/user/1000/snap.vscode",
"XAUTHORITY": "/run/user/1000/gdm/Xauthority",
"SNAP_CONTEXT": "y54kmD2wjlfng32c1THyN0VQ8TpQqRJ2QTmBnMDvlF7T",
"XDG_CONFIG_DIRS": "/etc/xdg/xdg-ubuntu:/etc/xdg",
"PATH": "/home/john/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/gcc-arm/bin",
"SNAP_VERSION": "1.32.3-1552606978",
"GJS_DEBUG_TOPICS": "JS ERROR;JS LOG",
"SNAP_LIBRARY_PATH": "/var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void",
"SESSION_MANAGER": "local/john-Precision-M4600:@/tmp/.ICE-unix/2784,unix/john-Precision-M4600:/tmp/.ICE-unix/2784",
"GTK_IM_MODULE": "ibus",
"_": "/snap/vscode/89/usr/share/code/bin/../code",
"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
"VSCODE_CLI": "1",
"ELECTRON_NO_ATTACH_CONSOLE": "1",
"VSCODE_IPC_HOOK": "/run/user/1000/snap.vscode/vscode-f7f7606b-1.32.3-main.sock",
"VSCODE_NLS_CONFIG": "{"locale":"en-us","availableLanguages":{},"_languagePackSupport":true}",
"VSCODE_LOGS": "/home/john/.config/Code/logs/20190401T082511",
"AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess",
"PIPE_LOGGING": "true",
"VERBOSE_LOGGING": "true",
"VSCODE_IPC_HOOK_EXTHOST": "/tmp/vscode-ipc-5049c38f-ba9c-426a-83b7-c06022436c74.sock",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_LOG_STACK": "false",
"VSCODE_PREVENT_FOREIGN_INSPECT": "true",
"ELECTRON_RUN_AS_NODE": "1"
},
"versions": {
"http_parser": "2.8.0",
"node": "10.2.0",
"v8": "6.6.346.32",
"uv": "1.20.3",
"zlib": "1.2.11",
"ares": "1.14.0",
"modules": "64",
"nghttp2": "1.29.0",
"napi": "3",
"openssl": "1.1.0h"
},
"vscode": {
"appName": "Visual Studio Code",
"appRoot": "/snap/vscode/89/usr/share/code/resources/app",
"machineId": "?????",
"sessionId": "?????",
"version": "1.32.3"
},
"extensions": [
{
"id": "ms-vscode.node-debug",
"version": "1.32.4"
},
{
"id": "ms-vscode.node-debug2",
"version": "1.32.0"
},
{
"id": "ms-vscode.references-view",
"version": "0.0.26"
},
{
"id": "marus25.cortex-debug",
"version": "0.2.3"
},
{
"id": "ms-vscode.cpptools",
"version": "0.22.1"
},
{
"id": "particle.particle-vscode-core",
"version": "1.3.0"
},
{
"id": "particle.particle-vscode-pack",
"version": "1.3.0"
},
{
"id": "particle.particle-vscode-snippets",
"version": "1.3.0"
},
{
"id": "particle.particle-vscode-theme",
"version": "1.3.0"
}
]
}

*** WARNING: MAY CONTAIN CONFIDENTIAL INFORMATION - PLEASE SANITIZE BEFORE SHARING ***
To report an issue, visit:

I

is this the actual location of your project?

“location”: “/home/john/Projects for ParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2”

if so, we don’t support spaces in file paths since the underlying make system does not handle them well (if at all) - see:

this would explain the error(s) you are seeing - e.g:

recipe for targetParticleIO/WorkbenchWorkspaceLocal/BLINKERLOCAL2/target//Projects’
…/…/…/build/module.mk:235: target for' given more than once in the same rule. 

just to confirm, can you try creating a project at a location without any spaces in the path and then building that?

m_m

Deleting spaces in the directory name fixed the problem and now I can do a local compile. I have not been a Linux user, so got caught by this. Ubuntu Linux did not prevent me from using spaces in the directory name. It would be good to note this in the example documentation for local compile.

Thank you much the help and for your timely responses.

1 Like

Deleting spaces in the directory name fixed the problem and now I can do a local compile.

yayy :tada::confetti_ball: glad we got you working - sorry again for the bumps :pray:

It would be good to note this in the example documentation for local compile.

yep! i'll also add a check for it when you create a project and show a warning if detected :+1:

looks like you still have one lingering issue:

{
    “id”: “openocd@0.10.0-particle.1”,
    “ok”: false
}

this means that our openocd lib is not able to run for some reason. on some systems, we need an additional system-wide dependency - see:

to verify this applies to you, run the Particle: Launch Compiler Shell command then in the terminal pane that launches enter arm-none-eabi-gdb --version - if that returns an error like:

error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

run sudo apt-get install libncurses5:i386 to install the missing dependency.

otherwise, try running the Particle: Reset Environment command and once that completes re-run Particle: Audit Environment and check the localCompiler section to see if everything reports ok: true

if that still doesn't get things back on track, try running:

~/.particle/toolchains/openocd/0.10.0-particle.1/bin/openocd --version

in the terminal created via Particle: Launch Compiler Shell and share the error that you receive here :+1:

I get this:

john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/BlinkLED$ arm-none-eabi-gdb --version
arm-none-eabi-gdb: command not found

Tried Reset Environment command and got same result. So now what. I should mention that I could flash the device the the program doesn’t light the LED even though the software matches my wiring. The blue on the Electron D7 LED doesn’t light either, probably due to this problem?

can you share a screenshot showing that output?

Here is the screen shot.

ok, try running:

ls ~/.particle/toolchains/gcc-arm/5.3.1/bin/

then:

echo $PATH

and share the results

The screen shot is:

By editinig the .bashrc file in the home directory by adding : ~/.particle/goolchains/gcc-arm/5.3.1/bin/ and saving the file, closing Visual Studio and restating it I was able to compile flash the program and have both the D6 (external whilte) and the D7 (blue) LED flash.

I did another Audit Environment get this as before:
…
{
“id”: “openocd@0.10.0-particle.1”,
“ok”: false
}

Then ran some of your suggested code from above and got the results below:

john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/BlinkLED$ ~/.particle/toolchains/openocd/0.10.0-particle.1/bin/openocd --version
/home/john/.particle/toolchains/openocd/0.10.0-particle.1/bin/openocd: error while loading shared libraries: libusb-0.1.so.4: cannot open shared object file: No such file or directory
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/BlinkLED$

The screen shot is

we prepend your current path with a series of directory locations when we launch the compiler shell terminal. from the look of it, it seems your PATH is not being properly set - perhaps due to how you've configured your .bashrc. as you can see from running ls ~/.particle/toolchains/gcc-arm/5.3.1/bin/, the binaries are available, it's just that PATH doesn't have the locations required to look them up properly.

can you check your .bashrc for a line like:

export PATH=

and share the non-sensitive bits of that line :pray:

By editinig the .bashrc file in the home directory by adding : ~/.particle/goolchains/gcc-arm/5.3.1/bin/

you shouldn't have to modify your env at all (missing libs aside though my longer-term aim is for you not to have to worry about those either). my hunch is that your .bashrc is doing something funny :grin:

error while loading shared libraries: libusb-0.1.so.4

ah, looks like you need yet another lib - running sudo apt-get install libusb-0.1-4 in a standard terminal should get you what you need. more info and options here:

i really appreciate you working through these issues - everything we've uncovered here will help others as we evolve the tool and improve docs :pray::+1:

m_m

Add Path Environment Variable for Android Studio

PATH=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin…:~/.particle/toolchains/gcc-arm/5.3.1/bin/

There is no export PATH= statement. I was going to add it that way, but appended the PATH=PATH= statement in the .bashrc file. Don’t think there should be two PATH= 's.

Don’t think there should be two PATH= 's

try adding or editing what you have to match this format:

export PATH=$PATH:<any non-default locations here>

the key parts being:

export - exposes a variable or function to child processes
PATH=$PATH - prepend the current PATH to your new PATH
: - item delimiter
<any non-default locations here> - this is where you add any custom (non-default) locations - e.g. /foo/bar:/foo/baz - if you don't have any, you can omit.

iirc, the typic default $PATH on ubuntu is:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

which looks like what you have so i don't think you need to re-add that.

I installed the library sudo apt-get install libusb-0.1-4 as you showed above.
I put export PATH=$PATH:/usr/local/gcc-arm/bin at the end of the .bashrc file
Now an Audit Environment shows:
{
“id”: “openocd@0.10.0-particle.1”,
“ok”: true
},
and the other dependencies as true.

As far as I know everything is working as it should and I’ve learned some things. Thanks much!

I am not sure if I’ve left some confidential information in this thread. Could you please take a look and let me know if there is anything else I should have deleted?

1 Like