[ISSUE] bash.exe: warning: could not find /tmp, please create! (was: Missing tmp folder)

I have a newly installed copy of VS Code with a Particle Workbench extension installed from the extension panel on a Windows 10 box.
I entered a blink program and compiled it locally and got a bunch of

bash.exe: warning: could not find /tmp, please create!
messages. Where do I need to create this directory?

int led1 = D7;
// setup() runs once, when the device is first turned on.
void setup() {
  // Put initialization like pinMode and begin functions here.
  pinMode(led1, OUTPUT);
}

// loop() runs over and over again, as quickly as it can execute.
void loop() {
  // The core of your code will likely live here.
  digitalWrite(led1, HIGH);
  delay(1000);
  digitalWrite(led1, LOW);
  delay(1000);
}
Particle: Compile Application(local)

generates the following:
> Executing task: make -f 'C:\Users\USER\.particle\toolchains\buildscripts\1.5.0\Makefile' compile-user -s <

bash.exe: warning: could not find /tmp, please create!
(repeated about 20 times)
...
bash.exe: warning: could not find /tmp, please create!
   text    data     bss     dec     hex filename
   4300     112    1408    5820    16bc c:/Users/USER/Documents/ParticleWB/BoardTest/target/BoardTest.elf

*** COMPILED SUCCESSFULLY ***

please run the Particle: Audit Environment command and share the non-sensitive parts here.

for future reference, here’s how to report issues

I did a fresh install of vscode and particle workbench before asking for help.
steps required to duplicate: Particle: Compile(Local)
Workbench was the only installed extension
Windows 10 build 1803 Pentium Dual Core 8G Ram no other programs running.

Here are the results of an Audit.

{
  "username": null,
  "workspace": {
    "name": "BoardTest",
    "isWorkspace": false,
    "folders": [
      {
        "location": "c:\\Users\\USER\\Documents\\ParticleWB\\BoardTest",
        "hasValidPath": true,
        "settings": {
          "firmwareName": "deviceOS",
          "firmwareVersion": "1.0.1",
          "targetDevice": "EXP1",
          "targetPlatform": "photon",
          "compileButtonAction": "localAppDeviceOS",
          "flashButtonAction": "localAppDeviceOS",
          "disableWelcomeScreen": false,
          "disableLocalCompilerDirtyCheck": false,
          "enableVerboseLocalCompilerLogging": false
        },
        "files": [
          ".vscode",
          ".vscode\\ipch",
          ".vscode\\launch.json",
          ".vscode\\settings.json",
          "electron_firmware_1556136473260.bin",
          "photon_firmware_1556137343834.bin",
          "project.properties",
          "README.md",
          "src",
          "src\\BoardTest.cpp",
          "src\\BoardTest.ino",
          "target",
          "target\\BoardTest.bin",
          "target\\BoardTest.bin.crc_block",
          "target\\BoardTest.bin.no_crc",
          "target\\BoardTest.elf",
          "target\\BoardTest.hex",
          "target\\BoardTest.lst",
          "target\\BoardTest.map",
          "target\\obj",
          "tmp"
        ]
      }
    ]
  },
  "cli": {
    "binpath": "C:\\Users\\USER\\.vscode\\extensions\\particle.particle-vscode-core-1.4.2\\src\\cli\\bin\\windows\\amd64\\particle.exe",
    "ok": false,
    "version": null,
    "installed": 1555285822188
  },
  "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.7.0",
        "ok": true
      }
    ]
  },
  "platform": {
    "os": "windows",
    "type": "Windows_NT",
    "release": "10.0.17134",
    "arch": "x64",
    "path": {
      "key": "Path",
      "value": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Python36\\Scripts\\;C:\\Program Files\\Python36\\;C:\\Program Files (x86)\\Python36-32\\Scripts\\;C:\\Program Files (x86)\\Python36-32\\;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Gow\\bin;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\syswow64;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft\\Web Platform Installer\\;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\1.0\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\110\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\130\\DTS\\Binn\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\LLVM\\bin;C:\\Program Files\\OpenSSL;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\nodejs\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin\\;C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Brackets\\command;C:\\Go\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files (x86)\\Notepad++;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files (x86)\\GNU Tools ARM Embedded\\5.3 2016q1\\bin;C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\USER\\AppData\\Local\\particle\\bin;C:\\Users\\USER\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Microsoft VS Code\\bin;C:\\Users\\USER\\AppData\\Roaming\\npm;C:\\Users\\USER\\Documents\\gocode\\bin;C:\\Users\\USER\\AppData\\Local\\Programs\\Microsoft VS Code\\bin"
    },
    "homeDir": "C:\\Users\\USER",
    "particleDir": "C:\\Users\\USER\\.particle",
    "localCompilerToolchainDir": "C:\\Users\\USER\\.particle\\toolchains"
  },
  "env": {
    "ALLUSERSPROFILE": "C:\\ProgramData",
    "AMD_ENTRYPOINT": "vs\/workbench\/services\/extensions\/node\/extensionHostProcess",
    "APPDATA": "C:\\Users\\USER\\AppData\\Roaming",
    "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
    "CARBON_MEM_DISABLE": "1",
    "ChocolateyInstall": "C:\\ProgramData\\chocolatey",
    "ChocolateyLastPathUpdate": "131990447688008746",
    "CommonProgramFiles": "C:\\Program Files\\Common Files",
    "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
    "CommonProgramW6432": "C:\\Program Files\\Common Files",
    "COMPUTERNAME": "HPPRO3000",
    "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
    "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
    "ELECTRON_RUN_AS_NODE": "1",
    "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
    "FPS_BROWSER_USER_PROFILE_STRING": "Default",
    "FP_NO_HOST_CHECK": "NO",
    "GOPATH": "C:\\Users\\USER\\Documents\\gocode",
    "GOROOT": "C:\\Go\\",
    "HOMEDRIVE":"C: ",
    "HOMEPATH":"\\Users\\USER",
    "KICAD_PTEMPLATES":"C: \\Program Files\\KiCad\\share\\kicad\\template",
    "KICAD_SYMBOL_DIR":"C: \\Users\\USER\\Documents\\KiCad5-1-1\\Official_KiCad_Libraries\\KiCad_Symbols",
    "KICAD_TEMPLATE_DIR":"C: \\Program Files\\KiCad\\share\\kicad\\template",
    "KISYS3DMOD":"C: \\Users\\USER\\Documents\\KiCad5-1-1\\Official_KiCad_Libraries\\KiCad-3DPackages",
    "KISYSMOD":"C: \\Users\\USER\\Documents\\KiCad5-1-1\\Official_KiCad_Libraries\\KiCad_Footprints",
    "LOCALAPPDATA":"C: \\Users\\USER\\AppData\\Local",
    "LOGONSERVER":"\\\\HPPRO3000",
    "MOZ_PLUGIN_PATH":"C: \\Program Files (x86)\\Foxit Software\\Foxit Reader\\plugins\\",
    "NUMBER_OF_PROCESSORS": "2",
    "OneDrive": "C:\\Users\\USER\\OneDrive",
    "OS": "Windows_NT",
    "Path": "C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath;C:\\Program Files\\Python36\\Scripts\\;C:\\Program Files\\Python36\\;C:\\Program Files (x86)\\Python36-32\\Scripts\\;C:\\Program Files (x86)\\Python36-32\\;C:\\ProgramData\\Oracle\\Java\\javapath;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Gow\\bin;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\;C:\\Program Files\\WIDCOMM\\Bluetooth Software\\syswow64;C:\\Program Files\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft\\Web Platform Installer\\;C:\\Program Files (x86)\\Windows Kits\\10\\Windows Performance Toolkit\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\110\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\120\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\Binn\\ManagementStudio\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\1.0\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\110\\DTS\\Binn\\;C:\\Program Files (x86)\\Microsoft SQL Server\\130\\DTS\\Binn\\;C:\\Program Files\\dotnet\\;C:\\Program Files\\LLVM\\bin;C:\\Program Files\\OpenSSL;C:\\Program Files (x86)\\Microsoft SQL Server\\140\\DTS\\Binn\\;C:\\Program Files (x86)\\nodejs\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin\\;C:\\Program Files\\IVI Foundation\\VISA\\Win64\\Bin\\;C:\\Program Files (x86)\\IVI Foundation\\VISA\\WinNT\\Bin;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Brackets\\command;C:\\Go\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files (x86)\\Notepad++;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files (x86)\\GNU Tools ARM Embedded\\5.3 2016q1\\bin;C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python37\\Scripts\\;C:\\Users\\USER\\AppData\\Local\\Programs\\Python\\Python37\\;C:\\Users\\USER\\AppData\\Local\\particle\\bin;C:\\Users\\USER\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Program Files (x86)\\Microsoft VS Code\\bin;C:\\Users\\USER\\AppData\\Roaming\\npm;C:\\Users\\USER\\Documents\\gocode\\bin;C:\\Users\\USER\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
    "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
    "PIPE_LOGGING": "true",
    "PROCESSOR_ARCHITECTURE": "AMD64",
    "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 23 Stepping 10, GenuineIntel",
    "PROCESSOR_LEVEL": "6",
    "PROCESSOR_REVISION": "170a",
    "ProgramData": "C:\\ProgramData",
    "ProgramFiles": "C:\\Program Files",
    "ProgramFiles(x86)": "C:\\Program Files (x86)",
    "ProgramW6432": "C:\\Program Files",
    "PSModulePath": "C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules\\;C:\\Program Files (x86)\\Microsoft SQL Server\\120\\Tools\\PowerShell\\Modules\\",
    "PUBLIC":"C: \\Users\\Public",
    "SESSIONNAME":"Console",
    "SystemDrive":"C: ",
    "SystemRoot":"C: \\WINDOWS",
    "TEMP":"C: \\Users\\USER\\AppData\\Local\\Temp",
    "TMP":"C: \\Users\\USER\\AppData\\Local\\Temp",
    "USERDOMAIN":"HPPRO3000",
    "USERDOMAIN_ROAMINGPROFILE":"HPPRO3000",
    "USERNAME":"USER",
    "USERPROFILE":"C: \\Users\\USER",
    "VBOX_MSI_INSTALL_PATH":"C: \\Program Files\\Oracle\\VirtualBox\\",
    "VERBOSE_LOGGING": "true",
    "VS100COMNTOOLS": "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools\\",
    "VS110COMNTOOLS":"C: \\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\Tools\\",
    "VS120COMNTOOLS": "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\",
    "VS140COMNTOOLS":"C: \\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\",
    "VS80COMNTOOLS": "C:\\Program Files (x86)\\Microsoft Visual Studio 8\\Common7\\Tools\\",
    "VSCODE_CWD":"C: \\Users\\USER\\AppData\\Local\\Programs\\Microsoft VS Code",
    "VSCODE_HANDLES_UNCAUGHT_ERRORS":"true",
    "VSCODE_IPC_HOOK":"\\\\.\\pipe\\6f7f7439a076c1dd521200c06694e730-1.33.1-main-sock",
    "VSCODE_IPC_HOOK_EXTHOST":"\\\\.\\pipe\\vscode-ipc-c68b9fbc-c5e3-4d0a-bef5-9a3a8f1d0e1c-sock",
    "VSCODE_LOGS":"C: \\Users\\USER\\AppData\\Roaming\\Code\\logs\\20190425T075819",
    "VSCODE_LOG_STACK":"false",
    "VSCODE_NLS_CONFIG":"{
      \"locale\": \"en-us\",
      \"availableLanguages\": {

      },
      \"_languagePackSupport\": true
    }",
    "VSCODE_NODE_CACHED_DATA_DIR":"C: \\Users\\USER\\AppData\\Roaming\\Code\\CachedData\\51b0b28134d51361cf996d2f0a1c698247aeabd8",
    "VSCODE_PID":"2864",
    "VSCODE_PREVENT_FOREIGN_INSPECT":"true",
    "VSSDK140Install":"C: \\Program Files (x86)\\Microsoft Visual Studio 14.0\\VSSDK\\",
    "VXIPNPPATH": "C:\\Program Files (x86)\\IVI Foundation\\VISA\\",
    "VXIPNPPATH64":"C: \\Program Files\\IVI Foundation\\VISA\\",
    "windir": "C:\\WINDOWS",
    "windows_tracing_flags": "3",
    "windows_tracing_logfile": "C:\\BVTBin\\Tests\\installpackage\\csilogfile.log"
  },
  "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": "c:\\Users\\USER\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
    "machineId": "e95e38ab44c2ac640f1c77264326b4659223934e166651d6a90b662730813bc8",
    "sessionId": "f7ac30bf-cc13-4a2c-a614-3f8cce6598641556204315639",
    "version": "1.33.1"
  },
  "extensions": [
    {
      "id": "ms-vscode.node-debug",
      "version": "1.33.3"
    },
    {
      "id": "ms-vscode.node-debug2",
      "version": "1.33.0"
    },
    {
      "id": "ms-vscode.references-view",
      "version": "0.0.26"
    },
    {
      "id": "marus25.cortex-debug",
      "version": "0.2.3"
    },
    {
      "id": "ms-vscode.cpptools",
      "version": "0.23.0-insiders"
    },
    {
      "id": "particle.particle-vscode-core",
      "version": "1.4.2"
    },
    {
      "id": "particle.particle-vscode-pack",
      "version": "1.4.2"
    },
    {
      "id": "particle.particle-vscode-snippets",
      "version": "1.4.2"
    }
  ]
}

thanks :+1:

let’s try to fix this first:

"cli": {
    "binpath": "C:\\Users\\USER\\.vscode\\extensions\\particle.particle-vscode-core-1.4.2\\src\\cli\\bin\\windows\\amd64\\particle.exe",
    "ok": false,
    "version": null,
    "installed": 1555285822188
  }

specifically, the "ok": false bit :wink:

run the Particle: Launch CLI command from VSCode + Workbench then in the terminal instance that launches, try running particle update-cli.

if you get an error, please share it here.

otherwise, you should see the CLI install its dependencies. once that completes, try running another local build by clicking “Terminal > Run Task…” from VSCode’ main menu and then selecting Particle: Compile application (local) from the quick-pick list.

if that still doesn’t get things working as expected, please share the error that you get here :+1:

I did not get any errors updating the CLI

PS C:\Users\USER\Documents\ParticleWB\BoardTest> particle update-cli
Updating CLI... no plugins to update.
PS C:\Users\USER\Documents\ParticleWB\BoardTest>

My CLI appears to be up to date.

I did another Audit and the result included:

    "cli": {
        "binpath": "C:\\Users\\USER\\.vscode\\extensions\\particle.particle-vscode-core-1.4.2\\src\\cli\\bin\\windows\\amd64\\particle.exe",
        "ok": true,
        "version": "1.40.0",
        "installed": 1555285822188
    },

The missing /tmp message still appears when I try Particle: Compile Application (Local) or Particle: Compile for Debug (Local)

I did try installing everything on a second computer and the same code compiled without an problem there.

I have scattered /tmp folders all over the place without effect. If the message would show the path to the missing folder it would be a big help.

Thanks,
mdent

My CLI appears to be up to date

yep! looks like that's in working order now :+1:

I did try installing everything on a second computer and the same code compiled without an problem there.

:thinking: that points to something unique about the environment on the problematic machine.

i see a ton of stuff in your platform.path and env sections - nothing jumps out as an obvious conflict though so :man_shrugging:

one other thing to check is the buildtools dependency that Workbench installs in ~/.particle/toolchains/buildtools/1.0.3/ - there should be a ./tmp directory there. if not, try running Particle: Reset Environment to reinstall the toolchains then another compile to see if things are fixed.

otherwise, try comparing the report generated by Particle: Audit Environment on both machines - perhaps then you can isolate the exact difference(s) between the two.

hope it helps! please share what you find here :pray::+1:

I manually created a ./tmp folder in ~/.particle/toolchains/buildtools/1.0.3/

That appears to have solved the problem. The file compiled locally with no errors.
I will do a reset environment when I have time this weekend and audit the other computer but this is my main development box and used for many things and that one has much less installed software.

Thanks for your help.

1 Like

That appears to have solved the problem. The file compiled locally with no errors.

yay :tada: glad we got you up and running - sorry for the bumps :pray:

i'm still not clear on how this situation might occur (this could explain it but not if you've never installed WB v1.4.0 or prior).

when you get around to it, i'd be curious to know what happens after running Particle: Reset Environment - specifically whether or not the ./tmp directory is successfully created and if not, what errors pop-up.

It is possible that I installed WB v1.4 but I did an uninstall and reinstall of WB and VSCode without fixing the problem.

Differences between the two computers are

  1. isWorkspace is true in main box and false in test box
    2 cppTools ver in main box is 0.23.0, test box is 0.22.1
  2. differences in path variable and serial nos etc.

Doing a Reset Environment did not change anything.

I consider the problem solved.

Thanks
mdent

I had the same " bash.exe: warning: could not find /tmp, please create!"
added the /tmp dir
then I had no make file
so I did a running Particle: Reset Environment to reinstall the toolchains then another compile to see if things are fixed.
this worked.

1 Like