Permission denied when attempting to build xow

I’m attempting to install xow but keep running into this error, regardless if I’m doing it via aur or manually from Git.

==> Entering fakeroot environment...
==> Starting package()...
sed 's|#BINDIR#|/usr/bin|' install/service.in > xow.service
install -D -m 755 xow /home/celty/.cache/paru/clone/xow-git/pkg/xow-git//usr/bin/xow
make: install: Permission denied
make: *** [Makefile:47: install] Error 127
==> ERROR: A failure occurred in package().
    Aborting...
error: failed to build 'xow-git-1:0.5.r14.g189c806-2': 
error: packages failed to build: xow-git-1:0.5.r14.g189c806-2

How do I resolve this?

Did you try the git version xow-git?

This implies a directory is owned by root, or your .cache directory is on a different device (e.g. tmpfs) with non-standard mount options.

For the first, running sudo chown -R $USER: $HOME will ensure all your files are owned by your user.

For the second, you’d have to check the output of mount, but then you’d also probably already know if you’d done something different.

Not sure what the difference is here. The AUR is git-based, so if you clone the repo to do it manually with makepkg then you’re using git…

Yes, I have tried installing both xow and xow-git via paru as well as manually by cloning the github page and running make.

This made no difference.

I meant that I have tried installing both AUR packages, as well as attempted a manual build/install following the instructions in the xow repo, leaving the AUR out of the process.

Neither method has worked so far. This is a new OS installation and I have not altered permissions.

ls -l ~/.cache/paru/clone/xow-git/pkg/               
total 0
drwxr-xr-x 1 celty celty 0 Dec 28 09:36 xow-git

I own the files, yet the error persists. I’m not familiar with tmpfs. I have one disk with btrfs and snapper subvols i.e.

nvme0n1     259:2    0 232.9G  0 disk 
├─nvme0n1p1 259:3    0   300M  0 part /boot
├─nvme0n1p2 259:4    0     8G  0 part [SWAP]
└─nvme0n1p3 259:5    0 224.6G  0 part /var_log
                                      /home
                                      /.snapshots
                                      /

No other modifications have been made. I’m not sure what I’m looking for in the mount output, but there are mentions of tmpfs.

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1635304k,nr_inodes=408826,mode=700,uid=1000,gid=1000,inode64)

Full output:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=8110804k,nr_inodes=2027701,mode=755,inode64)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p3 on / type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=256,subvol=/@)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19568)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p3 on /.snapshots type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=258,subvol=/@snapshots)
/dev/nvme0n1p3 on /home type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=257,subvol=/@home)
/dev/nvme0n1p3 on /var_log type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=259,subvol=/@var_log)
**tmpfs on /tmp type tmpfs (rw,nosuid,nodev,nr_inodes=1048576,inode64)**
/dev/nvme0n1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
net_cls on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
//192.168.1.253/D2/ on /mnt/D2 type cifs (rw,relatime,vers=3.0,cache=strict,username=MAIN,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.253,file_mode=0777,dir_mode=0777,iocharset=utf8,soft,nounix,serverino,mapposix,noperm,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
//192.168.1.253/D1/ on /mnt/D1 type cifs (rw,relatime,vers=3.0,cache=strict,username=MAIN,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.253,file_mode=0777,dir_mode=0777,iocharset=utf8,soft,nounix,serverino,mapposix,noperm,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
//192.168.1.253/D3/ on /mnt/D3 type cifs (rw,relatime,vers=3.0,cache=strict,username=MAIN,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.1.253,file_mode=0777,dir_mode=0777,iocharset=utf8,soft,nounix,serverino,mapposix,noperm,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1635304k,nr_inodes=408826,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=10
00,group_id=1000)

Hmm. The methods are different, so if you’re getting the same error then there’s something very odd going on.

What happens when you clone the AUR repo and use makepkg? (and by “what happens” I mean try it and post any output)

==> Making package: xow-git 1:0.5.r17.gaf5b9d4-2 (Tue 28 Dec 2021 03:56:23 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Cloning xow git repo...
Cloning into bare repository '/home/formidable/Downloads/xow-git/xow'...
remote: Enumerating objects: 1389, done.
remote: Counting objects: 100% (320/320), done.
remote: Compressing objects: 100% (200/200), done.
remote: Total 1389 (delta 186), reused 211 (delta 114), pack-reused 1069
Receiving objects: 100% (1389/1389), 1.36 MiB | 10.41 MiB/s, done.
Resolving deltas: 100% (837/837), done.
==> Validating source files with md5sums...
    xow ... Skipped
==> Extracting sources...
  -> Creating working copy of xow git repo...
Cloning into 'xow'...
done.
==> Starting pkgver()...
==> Updated version: xow-git 1:0.5.r28.ga396e3f-1
==> Starting build()...
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o xow.o xow.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o controller/controller.o controller/controller.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o controller/gip.o controller/gip.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o controller/input.o controller/input.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o dongle/dongle.o dongle/dongle.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o dongle/mt76.o dongle/mt76.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o dongle/usb.o dongle/usb.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o utils/log.o utils/log.cpp
g++  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Wpedantic -std=c++11 -MMD -MP -O3 -DVERSION=\"v0.5-28-ga396e3f\" -c -o utils/reader.o utils/reader.cpp
curl -o driver.cab http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- -100  195k  100  195k    0     0  2851k      0 --:--:-- --:--:-- --:--:-- 2870k
cabextract -F FW_ACC_00U.bin driver.cab
driver.cab: WARNING; possible 16256 extra bytes at end of file.
Extracting cabinet: driver.cab
  extracting FW_ACC_00U.bin

All done, no errors.
echo 48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66 FW_ACC_00U.bin | sha256sum -c
FW_ACC_00U.bin: OK
mv FW_ACC_00U.bin firmware.bin
rm -f driver.cab
ld -r -b binary -z noexecstack -o firmware.o firmware.bin
g++ -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o xow xow.o controller/controller.o controller/gip.o controller/input.o dongle/dongle.o dongle/mt76.o dongle/usb.o utils/log.o utils/reader.o firmware.o -lpthread -lusb-1.0
==> Entering fakeroot environment...
==> Starting package()...
sed 's|#BINDIR#|/usr/bin|' install/service.in > xow.service
install -D -m 755 xow /home/formidable/Downloads/xow-git/pkg/xow-git//usr/bin/xow
make: install: Permission denied
make: *** [Makefile:47: install] Error 127
==> ERROR: A failure occurred in package().
    Aborting...

I started to do some digging, then I found that the author has abandoned this one

in favour of developing a new driver:

This might be worth using instead?

https://aur.archlinux.org/packages/xone-dkms/

I am aware that xow is not being developed and xone is its successor, however, xone does not yet support wireless connectivity through the xbox dongle, which xow does, and until that has been ported/developed for xone I will have to stick to xow. It is still functional, assuming I manage to install it.

1 Like

Hmm. This works without issue or change for me, e.g.:

==> Starting package()...
sed 's|#BINDIR#|/usr/bin|' install/service.in > xow.service
install -D -m 755 xow /build/xow-git/pkg/xow-git//usr/bin/xow
install -D -m 644 install/udev.rules /build/xow-git/pkg/xow-git//etc/udev/rules.d/50-xow.rules
install -D -m 644 install/modules.conf /build/xow-git/pkg/xow-git//etc/modules-load.d/xow-uinput.conf
install -D -m 644 install/modprobe.conf /build/xow-git/pkg/xow-git//etc/modprobe.d/xow-blacklist.conf
install -D -m 644 xow.service /build/xow-git/pkg/xow-git//usr/lib/systemd/system/xow.service
rm -f xow.service
==> Tidying install...

I don’t know why it’s not working for you - the reasons I can think of I’ve already posted above.

1 Like

I’m not sure if this is relevant but I’ve found, what I would consider odd, permissions for the files.

Running ls -la ~/.cache/paru/clone/xow/pkg returns permission denied
Running the same command with sudo returns

d--x--x--x 1 formidable formidable   0 Dec 27 20:39 .
drwxr-xr-x 1 formidable formidable 102 Dec 27 20:39 ..

If I own the files, why does it require sudo?

What if you delete the xow cache folder

sudo rm -rf ~/.cache/paru/clone/xow

and try again?

Same error:

==> Entering fakeroot environment...
==> Starting package()...
sed 's|#BINDIR#|/usr/bin|' install/service.in > xow.service
install -D -m 755 xow /home/formidable/.cache/paru/clone/xow-git/pkg/xow-git//usr/bin/xow
make: install: Permission denied
make: *** [Makefile:47: install] Error 127
==> ERROR: A failure occurred in package().
    Aborting...
error: failed to build 'xow-git-1:0.5.r14.g189c806-2': 
error: packages failed to build: xow-git-1:0.5.r14.g189c806-2

What command are you using exactly?

paru -S xow-git
yay -S xow-git

Strange indeed. Here the git version built OK, but the non-git version had a different build issue. Unfortunately I’m not able to show the outputs currently.

Maybe later today I could build a package and push it to a github place where you can download it?

1 Like

There are comments on the AUR stating that xow does not build (but Git does) so your build issue is likely on par with the rest.

If you have the time and will to build and push it to Git I’d appreciate it. I’d rather not have to do a new OS install.

Ok, I’ll do that later today.
Please remind me tomorrow if I fail to do this today… :wink:

1 Like

Here it is: https://github.com/endeavouros-team/sandbox/tree/master/tmp-stuff

Notes:

  • No warranties of any kind! :wink:
  • I only built the package and added a sha512sum file, so no testing!

Downloading:

wget https://github.com/endeavouros-team/sandbox/raw/master/tmp-stuff/xow-git-1:0.5.r28.ga396e3f-1-x86_64.pkg.tar.zst.sha512sum
wget https://github.com/endeavouros-team/sandbox/raw/master/tmp-stuff/xow-git-1:0.5.r28.ga396e3f-1-x86_64.pkg.tar.zst

Please check the sha512sum to be on the safe side.

1 Like

Thanks a lot! I’ve installed it now, unfortunately it doesn’t seem to be able to access the dongle.

2021-12-29 13:50:09 INFO  - xow v0.5-28-ga396e3f ©Severin v. W.
2021-12-29 13:50:09 INFO  - Waiting for device...
terminate called after throwing an instance of 'UsbException'
  what():  Error opening device: LIBUSB_ERROR_ACCESS
[1]    1087 abort (core dumped)  xow

There are a few similar issues opened on Github but solutions posted there, such as disabling the xow.service, or restarting with the dongle plugged in, have not worked for me.

Not sure if you’ve seen this one. But, xpadneo seems to work with some dongles and might be worth checking out?