Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation issue #1229

Open
devnexen opened this issue Jan 21, 2025 · 4 comments
Open

installation issue #1229

devnexen opened this issue Jan 21, 2025 · 4 comments
Labels
bug Something isn't working build Build related issues

Comments

@devnexen
Copy link
Contributor

devnexen commented Jan 21, 2025

I suspect since it s possible to also install scxtop, I always get this issue at first install attempt

meson install -C build
ninja: Entering directory `/home/dcarlier/Contribs/scx/build'
[3/3] Generating rust_all with a custom command (wrapped by meson to set env)
Installing subdir /home/dcarlier/Contribs/scx/scheds/include/scx to /usr/local/include/scx
Installing /home/dcarlier/Contribs/scx/scheds/include/scx/enums.bpf.h to /usr/local/include/scx
Installation failed due to insufficient permissions.
Attempt to use /usr/bin/sudo to gain elevated privileges? [y/n] 
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 193, in run
    return options.run_func(options)
           ~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 870, in run
    installer.do_install(datafilename)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 549, in do_install
    self.install_subdirs(d, dm, destdir, fullprefix) # Must be first, because it needs to delete the old subtree.
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 618, in install_subdirs
    self.do_copydir(d, i.path, full_dst_dir, i.exclude, i.install_mode, dm,
    ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    follow_symlinks=i.follow_symlinks)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 524, in do_copydir
    self.do_copyfile(abs_src, abs_dst, follow_symlinks=follow_symlinks)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 409, in do_copyfile
    self.remove(to_file)
    ~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 308, in remove
    os.remove(*args, **kwargs)
    ~~~~~~~~~^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/usr/local/include/scx/enums.bpf.h'

ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment.

I might be doing something wrong but the 2nd time it always works so nothing major.

@hodgesds hodgesds added bug Something isn't working build Build related issues labels Jan 21, 2025
@frelon
Copy link
Contributor

frelon commented Jan 31, 2025

Hi @devnexen

Looks like you don't have permissions to create /usr/local/include/scx directory.

I get the following prompt when trying the same (and after a timeout the above error message):

Installing subdir /home/frelon/src/scx/scheds/include/scx to /usr/local/include/scx
Installation failed due to insufficient permissions.
Attempt to use /usr/bin/sudo to gain elevated privileges? [y/n]

If you want to install to another directory there is also the --destdir flag:

meson install -C build --destdir $(pwd)/install

@devnexen
Copy link
Contributor Author

Eventually, it works when I try a second time without me changing the permissions manually. Thinking of this ticket, it happens less often now, seems a bit random.

@frelon
Copy link
Contributor

frelon commented Jan 31, 2025

Eventually, it works when I try a second time without me changing the permissions manually. Thinking of this ticket, it happens less often now, seems a bit random.

Weird! What distribution are you building on?

@devnexen
Copy link
Contributor Author

debian unstable. I do not know meson as much as cmake, so no idea if this is a meson version bug or this project issue. But again, no big deal :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Build related issues
Projects
None yet
Development

No branches or pull requests

3 participants