pijul_org / pijul

#289 Can't get this to work on Windows

Opened by xzn, on June 28, 2018
Open
xzn commented on June 28, 2018

Complained about missing dlls from the official downloaded binary.\r + \r + After getting the dlls manually complained about file system error when I tried cloning a repository.\r+ \r + Tried compiling the binary manually but still got file system error when cloning

elahn commented on July 19, 2018

On Windows 10:\r + \r +

pijul clone https://nest.pijul.com/pijul_org/pijul\r                                      +
\r                                                                                        +
error: The filename, directory name, or volume label syntax is incorrect. (os error 123)\r+
fedorg commented on November 12, 2018

Fixing missing dll library errors\r +

\r + First, if you get an error about the missing libraries, you should install OpenSSL and download libsodium.\r + \r + Download and install OpenSSL as normal (Win64 OpenSSL v1.1.1 EXE) and extract libsodium.dll from the archive path libsodium-1.0.16-msvc.zip\x64\Release\v141\dynamic\libsodium.dll into a folder of your choosing (I chose %userprofile%).\r + Then, append the library paths to PATH and set the environment variables OPENSSL_DIR and SODIUM_LIB_DIR to point to the correct location (my openssl was in C:\Program Files\OpenSSL-Win64) using the dialog:\r +

rundll32 sysdm.cpl,EditEnvironmentVariables\r                                                                                                                                                                                                                 +
```\r                                                                                                                                                                                                                                                         +
These two envvars are not strictly necessary for *runtime*, but I found that helped cargo find the libraries when I tried to build Pijul on Windows; just to save you the extra trouble down the line.\r                                                      +
\r                                                                                                                                                                                                                                                            +
#### Fixing OS error 123\r                                                                                                                                                                                                                                    +
\r                                                                                                                                                                                                                                                            +
This section works around this bug\r                                                                                                                                                                                                                          +
```\r                                                                                                                                                                                                                                                         +
>pijul init\r                                                                                                                                                                                                                                                 +
error: The filename, directory name, or volume label syntax is incorrect. (os error 123)\r                                                                                                                                                                    +
```\r                                                                                                                                                                                                                                                         +
\r                                                                                                                                                                                                                                                            +
This is caued by a single file write with an incorrect filename: `".\.pijul\local/ignore"` (notice the slash direction).\r                                                                                                                                    +
The error in the source code is around the middle of `libpijul/src/fs_representation.rs`:\r                                                                                                                                                                   +
\r                                                                                                                                                                                                                                                            +
```rust\r                                                                                                                                                                                                                                                     +
    repo_dir.push("local/ignore");\r                                                                                                                                                                                                                          +
    let _f = std::fs::File::create(&repo_dir)?;\r                                                                                                                                                                                                             +
    repo_dir.pop();\r                                                                                                                                                                                                                                         +
```\r                                                                                                                                                                                                                                                         +
The string should have been wrapped as such: `repo_dir.push(canonicalize("local/ignore"));`\r                                                                                                                                                                 +
\r                                                                                                                                                                                                                                                            +
I found this bug using the *kinda free* Windows software called Rohitab APIMonitor by breaking on all `CreateFileW` calls.\r                                                                                                                                  +
\r                                                                                                                                                                                                                                                            +
### Mitigation\r                                                                                                                                                                                                                                              +
\r                                                                                                                                                                                                                                                            +
You could just apply the binary patch to a pijul.exe version 0.10.0 (from the download section)\r                                                                                                                                                             +
by replacing `/` to `\` at file offset 0x831c57 using a binary editing tool like HxD editor.\r                                                                                                                                                                +
\r                                                                                                                                                                                                                                                            +
Alternatively, if you are fine with running random executable binaries from untrusted strangers on the net (I know I am!) you could just [download the patched file from my google drive](https://drive.google.com/open?id=1KekxSJ3qNTNWBs3rZVmlBOYVfvuFQHlU).
dzmitry-lahoda commented on February 6, 2019

Does not works on Windows. I hope stuff to work on windows out of box.\r + \r + ---------------------------\r + pijul-0.11.0.exe - System Error\r + ---------------------------\r + The code execution cannot proceed because libssl-1_1-x64.dll was not found. Reinstalling the program may fix this problem. \r + ---------------------------\r + OK \r + ---------------------------\r + ---------------------------\r + pijul-0.11.0.exe - System Error\r + ---------------------------\r + The code execution cannot proceed because libcrypto-1_1-x64.dll was not found. Reinstalling the program may fix this problem. \r+ ---------------------------\r + OK \r + ---------------------------\r + \r + \r +

cosmicspacedragon commented on May 13, 2019

I also had issues with libcrypto-1_1-x64.dll, but it worked fine after installing OpenSSL. It might be a good idea to mention this issue on the download page and/or the "Installing" page of the manual.