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

strace, dpkg-query, and incorrect library paths #338

Open
rswinkle opened this issue Dec 22, 2023 · 0 comments
Open

strace, dpkg-query, and incorrect library paths #338

rswinkle opened this issue Dec 22, 2023 · 0 comments

Comments

@rswinkle
Copy link

This is probably something really dumb on my part but hopefully that means the fix is easy and I just couldn't find it Googling.

So I'm trying to package my sdl_img project and my process looks like this (ignoring build output):

make config=release
make install DESTDIR=AppDir/usr
appimage-builder --generate  # accept all defaults

I've also done DESTDIR=AppDir. I think I'm structuring/using DESTDIR incorrectly in my Makefile but I want to support DESTDIR=/usr/local which means using DESTDIR=AppDir gets turned into AppDir/bin AppDir/share etc. which seems wrong

The last command outputs a bunch of lines like this:

dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libSDL2-2.0.so.0
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libcurl-gnutls.so.4
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libasound.so.2
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpulse.so.0
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libX11.so.6

Which generates this recipe:

AppImageBuilder.yml.txt

And then running appimage-builder gets

robert@pop-os:~/programming/C/sdl_img$ appimage-builder 
INFO:main:Running main script
INFO:main:Running apt deploy
INFO:apt:apt-get update
Get:1 https://brave-browser-apt-release.s3.brave.com stable InRelease [7,547 B]
Get:2 https://brave-browser-apt-release.s3.brave.com stable/main amd64 Packages [9,166 B]
Get:3 https://apt.llvm.org/jammy llvm-toolchain-jammy-17 InRelease [6,833 B]
Ign:3 https://apt.llvm.org/jammy llvm-toolchain-jammy-17 InRelease
Get:4 https://apt.llvm.org/jammy llvm-toolchain-jammy-17/main amd64 Packages [12.4 kB]
Fetched 36.0 kB in 1s (27.1 kB/s)   
Reading package lists... Done
W: GPG error: https://apt.llvm.org/jammy llvm-toolchain-jammy-17 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 15CF4D18AF4F7421
W: The repository 'http://apt.llvm.org/jammy llvm-toolchain-jammy-17 InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Reading package lists... Done
Building dependency tree... Done
Package zlib1g is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libexpat1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

ERROR:root:"/usr/bin/apt-get install -y --no-install-recommends --download-only -o Debug::pkgAcquire=1 libcap2:amd64 libcom-err2:amd64 libexpat1:amd64 libgpg-error0:amd64 libkeyutils1:amd64 liblzma5:amd64 libpulse0:amd64 zlib1g:amd64" execution failed
ERROR:root:E: Unable to locate package libcap2:amd64
ERROR:root:E: Unable to locate package libcom-err2:amd64
ERROR:root:E: Package 'libexpat1' has no installation candidate
ERROR:root:E: Unable to locate package libgpg-error0:amd64
ERROR:root:E: Unable to locate package libkeyutils1:amd64
ERROR:root:E: Unable to locate package liblzma5:amd64
ERROR:root:E: Unable to locate package libpulse0:amd64
ERROR:root:E: Package 'zlib1g' has no installation candidate
Traceback (most recent call last):
  File "/usr/local/bin/appimage-builder", line 8, in <module>
    sys.exit(__main__())
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/__main__.py", line 50, in __main__
    invoker.execute(commands)
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/invoker.py", line 29, in execute
    command()
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/commands/apt_deploy.py", line 46, in __call__
    deployed_packages = apt_deploy.deploy(
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 40, in deploy
    deploy_list = self._resolve_packages_to_deploy(
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 70, in _resolve_packages_to_deploy
    deploy_list = set(self.apt_venv.resolve_packages(include_patterns))
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/modules/deploy/apt/venv.py", line 184, in resolve_packages
    output = self._run_apt_get_install_download_only(packages_str)
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/modules/deploy/apt/venv.py", line 208, in _run_apt_get_install_download_only
    shell.assert_successful_result(command)
  File "/usr/local/lib/python3.10/dist-packages/appimagebuilder/utils/shell.py", line 35, in assert_successful_result
    raise RuntimeError(
RuntimeError: "/usr/bin/apt-get install -y --no-install-recommends --download-only -o Debug::pkgAcquire=1 libcap2:amd64 libcom-err2:amd64 libexpat1:amd64 libgpg-error0:amd64 libkeyutils1:amd64 liblzma5:amd64 libpulse0:amd64 zlib1g:amd64" execution failed with code 100

I don't know why strace is giving back paths like /lib/x86_64-linux-gnu/libSDL2-2.0.so.0 instead of /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 because doing dpkg-query works for the correct path at least for some:

robert@pop-os:~/programming/C/sdl_img$ dpkg-query -S /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so
libsdl2-dev:amd64: /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so

but not for others:

robert@pop-os:~/programming/C/sdl_img$ dpkg-query -S /usr/lib/x86_64-linux-gnu/libcap.so.2
dpkg-query: no path found matching pattern /usr/lib/x86_64-linux-gnu/libcap.so.2
robert@pop-os:~/programming/C/sdl_img$ apt-file search libcap.so
libcap-dev: /usr/lib/x86_64-linux-gnu/libcap.so
libcap2: /lib/x86_64-linux-gnu/libcap.so.2
libcap2: /lib/x86_64-linux-gnu/libcap.so.2.44
robert@pop-os:~/programming/C/sdl_img$ dpkg-query -S /usr/lib/x86_64-linux-gnu/libcap.so.2.44
dpkg-query: no path found matching pattern /usr/lib/x86_64-linux-gnu/libcap.so.2.44
robert@pop-os:~/programming/C/sdl_img$ dpkg-query -S /usr/lib/x86_64-linux-gnu/libcap.so
dpkg-query: no path found matching pattern /usr/lib/x86_64-linux-gnu/libcap.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant