32 bits package or Windows compiling how-to

I’m trying to install ActivityWatch in Windows 10 running on an Acer Aspire One with an Intel Atom, but that’s a 32 bits microprocessor and the compiled package is only available for 64 bits processors. I’ve been trying to compile it following the “Installing from source (on Windows)” how-to but I got lost in the process.

Could you update the how-to or compile and upload a 32 bits package (or both)…?

The how-to should be the same as for 64-bit unless there’s some issue with building for 32-bit specifically which we are unaware of. If you encounter some issue though, feel free to tell us or better make a PR for changing the documentation right away. The building procedures are a bit more complicated on Windows however.

Regarding to make a 32-bit package we will not add support for that, primarily because or CI system GitHub Actions which automatically builds or releases do not support 32-bit so that means that we would have to manually build it for every release which would be a lot of work for each release.

Well, I tried on Windows 10 the how-to’s for Linux and Windows, and this is what I get:

[email protected] MINGW32 ~/activitywatch (master)
$ make build
if [ -e "aw-core/.git" ]; then \
        echo "Submodules seem to already be initialized, continuing..."; \
else \
        git submodule update --init --recursive; \
fi
Submodules seem to already be initialized, continuing...
make --directory=aw-core build
make[1]: Entering directory 'C:/Users/nelson/activitywatch/aw-core'
poetry install
Makefile:4: recipe for target 'build' failed
process_begin: CreateProcess(NULL, poetry install, ...) failed.
make (e=2): El sistema no puede encontrar el archivo especificado.
make[1]: *** [build] Error 2
make[1]: Leaving directory 'C:/Users/nelson/activitywatch/aw-core'
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 2
(venv)

(The message “El sistema no puede encontrar el archivo especificado.” traslate to “the system can not find the specified file.”)

[email protected] MINGW32 ~/activitywatch (master)
$ echo $PATH
C:\Users\nelson\venv/Scripts:/c/Users/nelson/bin:/mingw32/bin:/usr/local/bin:/usr/bin:/bin:/mingw32/bin:/usr/bin:/c/Users/nelson/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/cmd:/c/MinGW/bin:/c/Program Files/nodejs:/c/Users/nelson/AppData/Local/Programs/Python/Python36-32/Scripts:/c/Users/nelson/AppData/Local/Programs/Python/Python36-32/Scripts:/c/Users/nelson/AppData/Local/Programs/Python/Python36-32:/c/Users/nelson/AppData/Roaming/npm:/usr/bin/vendor_perl:/usr/bin/core_perl
(venv)
[email protected] MINGW32 ~/activitywatch (master)
$

[email protected] MINGW32 ~/activitywatch (master)
$ python -V ; node -v ; npm -v ;
Python 3.6.8
v12.18.1
6.14.5
(venv)
[email protected] MINGW32 ~/activitywatch (master)
$

What I’m missing?

The command running right above the error tries to run “poetry install”, so maybe you need to install poetry?
Just a guess though.

Added to the docs that poetry is needed, you are not the first one to ask that. Sorry for that.

1 Like

I can’t advance from here:

make --directory=aw-watcher-afk build
make[1]: Entering directory 'C:/Users/nelson/activitywatch/aw-watcher-afk'
poetry install
Installing dependencies from lock file


Package operations: 7 installs, 0 updates, 0 removals

  - Installing pyHook (1.5.1 https://github.com/ActivityWatch/wheels/raw/master/pyHook-1.5.1-cp36-cp36m-win_amd64.whl)

[EnvCommandError]
Command ['C:\\Users\\nelson\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\aw-watcher-afk-p_uBid-B-py3.6\\Scripts\\pip.exe', 'install', '--no-deps', 'https://github.com/ActivityWatch/wheels/raw/master/pyHook-1.5.1-cp36-cp36m-win_amd64.whl#egg=pyhook'] errored with the following return code 1, and output:
pyHook-1.5.1-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
You are using pip version 18.1, however version 20.2b1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Makefile:4: recipe for target 'build' failed
make[1]: *** [build] Error 1
make[1]: Leaving directory 'C:/Users/nelson/activitywatch/aw-watcher-afk'
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 2

I’ve google how to upgrade pip, but turns up I’m using the last version:

[email protected] MINGW32 ~/activitywatch (master)
$ pip --version
pip 20.1.1 from c:\users\nelson\appdata\local\programs\python\python36-32\lib\site-packages\pip (python 3.6)

by the way, the file pip want to download is compiled for amd64 architecture -> pyHook-1.5.1-cp36-cp36m-win_amd64.whl

So, I don’t know what else to do…

Aha, there’s actually a case where we have failed to make it 32-bit compatible

Replace the line in aw-watcher-afk/pyproject.toml starting with “pyhook =” with the following should fix it:

pyhook = {url = "https://github.com/ActivityWatch/wheels/raw/master/pyHook-1.5.1-cp36-cp36m-win32.whl", platform = "win32" }

We hard apparently hardcoded it to always be 64-bit which is bad. Will fix that.

This PR should fix that so others won’t have this issue in the future.

Thanks for giving us heads up on the flaws in our build system and documentation (first on poetry missing as a dependency in the documentation which I added and now this).

1 Like

thanks for the good technical support, I really appreciate it

I got a new error message, or a lot of new warning messages, related with npm:

[email protected] compile C:\Users\nelson\activitywatch\aw-server\aw-webui\aw-client- js
tsc

make[3]: Leaving directory 'C:/Users/nelson/activitywatch/aw-server/aw-webui/aw-client-js'
npm install
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\is-fullwidth-code-point-a31f4710\package.json'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\is-fullwidth-code-point-a31f4710\index.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\vue-awesome-bf8255e5\icons\ad.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\is-fullwidth-code-point-a31f4710\license'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\vue-awesome-bf8255e5\icons\address-book.js'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\is-fullwidth-code-point-a31f4710\readme.md'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\vue-awesome-bf8255e5\icons\address-card.js'
.
.
.
npm WARN tar ENOENT: no such file or directory, lstat 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\less-17021efb\test\css\modifyVars'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\node-sass-25d245c6\test\fixtures\include-files\index.scss'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\node-sass-25d245c6\test\fixtures\include-path\lib\vars.scss'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\node-sass-25d245c6\test\fixtures\sass-path\expected-orange.css'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\node-sass-25d245c6\test\fixtures\sass-path\expected-red.css'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\nelson\activitywatch\aw-server\aw-webui\node_modules\.staging\node-sass-25d245c6\test\fixtures\sass-path\index.scss'
npm ERR! Unexpected end of JSON input while parsing near '...W99SaB989EbFeoX5I4oF9'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\nelson\AppData\Roaming\npm-cache\_logs\2020-06-28T02_47_23_279Z-debug.log
Makefile:9: recipe for target 'install' failed
make[2]: *** [install] Error 1
make[2]: Leaving directory 'C:/Users/nelson/activitywatch/aw-server/aw-webui'
Makefile:7: recipe for target 'aw_webui' failed
make[1]: *** [aw_webui] Error 2
make[1]: Leaving directory 'C:/Users/nelson/activitywatch/aw-server'
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 2

I’m still getting the same warning and error messages in make build. I cloned the whole reporsitory and run make build once again with the same result, do I have to clone a different branch?

You don’t need to clone a different branch, but I’m surprised that it can’t find those files in the .staging directory.

Just a guess, but maybe something like this may solve it? https://stackoverflow.com/a/50818923/2127148

For reasons unrelated to this project I had to downgrade my netbook from Windows 10 to Windows 7, now all the previous error messages have disappeared, the compiling process goes beyond that last point but once again it stops, with a different error message:

make[1]: Leaving directory 'C:/Users/nelson/activitywatch/aw-server'
make --directory=aw-server-rust build SKIP_WEBUI=
make[1]: Entering directory 'C:/Users/nelson/activitywatch/aw-server-rust'
cargo build --release --bin aw-server
Makefile:19: recipe for target 'aw-server' failed
process_begin: CreateProcess(NULL, cargo build --release --bin aw-server, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [aw-server] Error 2
make[1]: Leaving directory 'C:/Users/nelson/activitywatch/aw-server-rust'
Makefile:28: recipe for target 'build' failed
make: *** [build] Error 2
(venv)