Trouble with old yocto build project

I’m trying to run a slightly old yocto build project on Manjaro that previously was only tested on WSL Ubuntu. I’m getting this error:

Traceback (most recent call last):
  File "/home/slawo/Work/project/poky/bitbake/bin/bitbake", line 24, in <module>
    from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
  File "/home/slawo/Work/project/poky/bitbake/lib/bb/main.py", line 24, in <module>
    from bb import cooker
  File "/home/slawo/Work/project/poky/bitbake/lib/bb/cooker.py", line 25, in <module>
    import pyinotify
  File "/home/slawo/Work/project/poky/bitbake/lib/pyinotify.py", line 55, in <module>
    import asyncore
ModuleNotFoundError: No module named 'asyncore'

With some googling I came to the conclusion that I need the python-pyasyncore package from AUR, I’m not very familiar with python or yay.

yay -S python-pyasyncore

...

==> Making package: python-pyasyncore 1.0.4-1 (Thu 09 May 2024 10:51:26 CEST)
==> Retrieving sources...
  -> Cloning pyasyncore git repo...
Cloning into bare repository '/home/slawo/.cache/yay/python-pyasyncore/pyasyncore'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 38 (delta 12), reused 30 (delta 5), pack-reused 0
Receiving objects: 100% (38/38), 23.14 KiB | 1.22 MiB/s, done.
Resolving deltas: 100% (12/12), done.
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
    pyasyncore ... Passed
:: (1/1) Parsing SRCINFO: python-pyasyncore
==> Making package: python-pyasyncore 1.0.4-1 (Thu 09 May 2024 10:51:27 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating pyasyncore git repo...
==> Validating source files with sha256sums...
    pyasyncore ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of pyasyncore git repo...
Cloning into 'pyasyncore'...
done.
Switched to a new branch 'makepkg'
==> Sources are ready.
==> Making package: python-pyasyncore 1.0.4-1 (Thu 09 May 2024 10:51:28 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
/usr/bin/python: No module named build
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python-pyasyncore-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-pyasyncore - exit status 4

How can I get more info on this build error or what manual intervention it needs?
I see the yay build project in $HOME/.cache/yay/python-pyasyncore/pyasyncore/ but there are no logs.

I dont think I have ever seen this error.

The first general AUR thing is that base-devel is required.

sudo pacman -Syu base-devel

Because this is a python error … I might ask have you installed python things from outside the package manager? And/or possibly committed something like sudo pip ?

yes, I have base-devel installed, I got this “install toolchain dependency” script with the project that had the ubuntu dependencies, so I converted it for manjaro based on previous errors and google :slight_smile:

if [ "$1" = "ubuntu" ]; then
	sudo apt-get update
	sudo apt-get install build-essential gcc-multilib libsdl1.2-dev wget git git-core unzip chrpath
	sudo apt-get install gawk diffstat texinfo socat cpio xz-utils debianutils iputils-ping
	sudo apt-get install python3 python3-pip python3-pexpect python3-git python3-jinja2 python3-subunit
	sudo apt-get install libegl1-mesa mesa-common-dev zstd liblz4-tool file locales
	sudo locale-gen 'en_US.UTF-8'
	exit 0
else if [ "$1" = "manjaro" || "$1" = "arch" ]; then
	sudo pacman -Syyu
	sudo pacman -S base-devel multilib-devel
	sudo pacman -S git diffstat unzip texinfo python chrpath wget xterm
	sudo pacman -S sdl rpcsvc-proto socat cpio inetutils
	sudo pacman -S python-pip python-pexpect python-gitpython python-jinja python-subunit

	sudo ln -s /usr/lib/libalpm.so.14.0.0 /usr/lib/libalpm.so.13
	sudo pacman -S yay
	sudo yay -Syy
	sudo yay -S python-pyasyncore
	exit 0
else

I tried to run pip once and it gave me a message how it is an externally managed environment so I canceled and googled into the topic and didn’t run it.

Also python-build is installed, checked just in case

$ sudo pacman -S python-build
warning: python-build-1.1.1-1 is up to date -- reinstalling

One last thing that comes to mind is that I had to make valgrind work last week, so I switched to unstable and then back to stable branch, so many packages are ahead of the stable branch on my system. Maybe that causes a problem?

Also in a quick manual setup it seams to work:

$ type python
python is hashed (/usr/bin/python)

$ ls /usr/bin/python
lrwxrwxrwx 1 root root 7 Apr 23 11:16 /usr/bin/python -> python3

$ python
Python 3.12.3 (main, Apr 23 2024, 09:16:07) [GCC 13.2.1 20240417] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import build
>>> 
>>> import buildF
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'buildF'
>>> 
>>> 
>>> import build
>>> 

Don’t mix local and system Python packages. See:

DO NOT do that.

As far as I can tell I’m not mixing. Or is installing from AUR count as mixing?

Regarding the ln I know its dirty, but I ran into this problem and until stable catches up to last weeks unstable that’s the only thing I can do because I can’t downgrade back to stable:

While its good not to do it, sometimes it’s the best that is available.

Package managers really should gain some sane way to manage hacks like this.

How easy would it be to tell pacman that libalpm14 provides libalpm13 and have a centralized place to manage it instead of just links you hopefully remember.

The real issue here is the attempt to use AUR while using Manjaro stable branch.

Issues like this on Manjaro stable branch is exactly why custom AUR scripts should not be available for stable branch.

There is a reason when a shared object changes primary version - usually it means breaking changes - so when symlinking an older library to a newer or the other way around - you are actually introducing unknown variables into your system.

And when you try to find those - it is like looking for a needle in a haystack - and when you don’t find it you open an issue with upstream ArchLinux pacman developers which then reject your issue and you blame them for a superior attitude.

That never ends well.

1 Like

you can try and explain it away in this case, but it was not my argument. My argument was that sometimes it’s the only option. And for that case, sane support should be provided instead of leaving everyone to improvise in any which way.

“Do not put diesel into an unleaded engine.”
“OK, but sometimes I only have diesel, so instead of telling me not to do it, the engine should provide some way of processing diesel.”
(also: “Whats wrong with my car?”)

what a stupid analogy you employ. How often do you drive well with diesel in gasoline car? Never.

How often did i fix library not found error with only problem being a strict check for file name? quite a few times.

Only problem being from that is that as it works you forget about it. And THEN the problems might arise.

Its times like these I really miss the retort plugin.
:laughing:

(instead of engaging with trite name-calling … I must laugh at the message … in its entirety)

can you comprehend there existing a situation where the needed library simply is not available? Your solution is to not use the software? My solution is to use it in “compatibility mode” where you know it might work fully or barely, but at least it works somehow instead of not at all.

How you could oppose this kind of idea is baffling.

edit: i did not name call, i called out your analogy. Please don’t try to instill undue hostility on me.

If you mean by your example that an otherwise clean and well managed system, during some course of use like … development or forensics … for some reason needs to create a false placeholder for a now defunct library, but that its not a system critical component, blah blah … well then sure, that user is competent enough to know what they are doing and I dont really know why they need some package management component to handle this for them when it should be strictly outside of system package management.
If on the other hand you are talking about some form of misuse where you are trying to establish and patch over a partial-upgrade state then everything about it is the wrong approach.

Back to the original analogy … maybe I should have flipped it.
Because a diesel engine can accept small amounts of unleaded from time to time. In fact under certain conditions, like low fuel and lower temperatures, a small addition of unleaded may even be helpful. But still one should not attempt to run their diesel vehicle using unleaded gasoline in general.
In these ways I actually find the analogy apt.
(To say nothing of the extra intentions like humor)

I feel like we got sidetracked a bit :slight_smile:

Unless the workaround can affect how python invoked by yay can see other python packages it doesn’t seam relevant.

/usr/bin/python: No module named build

Is it possible that pip uses a virtualenv and not the system python installation?

Also I found here a similar problem. It seams to me the next step is building the package myself and hope I get a more detailed error log.

1 Like

Today I could update some packages that were not ahead of my branch mix :smiley:

Update Log
[2024-05-14T09:56:44+0200] [ALPM] upgraded abseil-cpp (20240116.1-1 -> 20240116.2-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded amd-ucode (20240409.1addd7dc-1 -> 20240409.1addd7dc-1.1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded util-linux-libs (2.40-3 -> 2.40.1-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded btrfs-progs (6.8-3 -> 6.8.1-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded diffstat (1.65-1 -> 1.65-2)
[2024-05-14T09:56:44+0200] [ALPM] upgraded mpg123 (1.32.5-1 -> 1.32.6-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded hwdata (0.381-1 -> 0.382-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded util-linux (2.40-3 -> 2.40.1-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded libpsl (0.21.2-1 -> 0.21.5-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded libdeflate (1.20-1 -> 1.20-2)
[2024-05-14T09:56:44+0200] [ALPM] upgraded spirv-tools (2023.6-1 -> 2024.1-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded glslang (14.0.0-2 -> 14.1.0-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded libdovi (3.3.0-1 -> 3.3.0-2)
[2024-05-14T09:56:44+0200] [ALPM] upgraded shaderc (2023.8-1 -> 2024.0-1)
[2024-05-14T09:56:44+0200] [ALPM] upgraded libtiff (4.6.0-4 -> 4.6.0-5)
[2024-05-14T09:56:45+0200] [ALPM] upgraded firefox (125.0.3-1 -> 125.0.3-2)
[2024-05-14T09:56:45+0200] [ALPM] upgraded fzf (0.48.1-1 -> 0.51.0-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded imagemagick (7.1.1.31-1 -> 7.1.1.32-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-fakeroot (1.33-1 -> 1.34-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libtasn1 (4.19.0-1 -> 4.19.0-2)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libcups (2.4.7-1 -> 2.4.8-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libgpg-error (1.48-1 -> 1.49-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libpciaccess (0.18-1 -> 0.18.1-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libpsl (0.21.2-1 -> 0.21.5-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libxcb (1.16.1-1 -> 1.17.0-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libx11 (1.8.7-1 -> 1.8.9-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libva (2.20.0-1 -> 2.21.0-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-util-linux (2.40-2 -> 2.40.1-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-libxmu (1.1.4-1 -> 1.2.1-1)
[2024-05-14T09:56:45+0200] [ALPM] installed lib32-libnsl (2.0.1-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-pam (1.6.0-1 -> 1.6.1-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-sqlite (3.45.2-1 -> 3.45.3-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded lib32-tdb (1.4.9-1 -> 1.4.10-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded libnvme (1.8-2 -> 1.9-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded libpamac (11.6.4-1 -> 11.6.4+1+g3fe0f42-1)
[2024-05-14T09:56:45+0200] [ALPM] upgraded libpamac-flatpak-plugin (11.6.4-1 -> 11.6.4+1+g3fe0f42-1)
[2024-05-14T09:56:46+0200] [ALPM] upgraded libplist (2.4.0-2 -> 2.5.0-1)
[2024-05-14T09:56:46+0200] [ALPM] upgraded libqalculate (5.0.0-2 -> 5.1.1-1)
[2024-05-14T09:56:46+0200] [ALPM] upgraded linux-firmware-whence (20240409.1addd7dc-1 -> 20240409.1addd7dc-1.1)
[2024-05-14T09:56:46+0200] [ALPM] upgraded linux-firmware (20240409.1addd7dc-1 -> 20240409.1addd7dc-1.1)
[2024-05-14T09:56:47+0200] [ALPM] upgraded linux66 (6.6.30-1 -> 6.6.30-2)
[2024-05-14T09:56:47+0200] [ALPM] upgraded manjaro-hello (0.7.2-4 -> 0.7.2-6)
[2024-05-14T09:56:47+0200] [ALPM] upgraded manjaro-release (23.1.4-1 -> 24.0.0-1)
[2024-05-14T09:56:47+0200] [ALPM] upgraded mhwd-db (0.6.5-35 -> 0.6.5-36)

And also while installing the droidcam client I had to install my kernel headers.

[2024-05-14T10:00:25+0200] [ALPM] installed pahole (1:1.26-2)
[2024-05-14T10:00:26+0200] [ALPM] installed linux66-headers (6.6.30-2)

Something here fixed the problem :thinking:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.