pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: trouble compiling harfbuzz: env does not find meson



xolodho <xolodho%gmail.com@localhost> writes:

> Yes, spot on. It seems pkgsrc and pkgin binaries are out of sync.
> Perhaps it's because I updated with 'cvs update -dP' a few days ago
> instead of downloading the 2023Q2 tarball, seems this got the pkgsrc
> tree to bleeding edge, I naively thought it would get it to 2023Q2, oops
> (yeah I don't really don't understand much of this cvs thing), and it's
> all inconsistent now. Should pkgsrc be downgraded to 2023Q2 from the
> tarball? or use cvs to get that specific version? I'm rather lost.

There are two reasonable options:

  use binary packages from 2023Q2 and use pkgsrc from 2023Q2.  run pkgin
  fug, and then rebuild as you need.

  don't use binary packages from other people.   update pkgsrc as you
  did to head. Run pkg_rolling-replace to update all packages to the
  current versions.

> How can I make sure that pkgsrc and pkin are in the same branch? Also,
> how do I tell what version a source directory from /usr/pkgsrc is?
> pkg_info reports versions of installed packages, not for the sources on
> /usr/pkgsrc.

You look at the pkgin URL, and the Tag value in CVS, that you passed to
csv up -r, and you make sure they match.

> `pkg_info -e meson` reports `meson-0.60.1`.
>
> result of `ls -l /usr/pkg/bin/meson`:
>   -rwxr-xr-x  1 root  wheel  957 Nov 28  2021 /usr/pkg/bin/meson*

which is in the past by a lot.

> result of `head -n7 /usr/pkg/bin/meson`:
>   #!/usr/pkg/bin/python3.9
>   # EASY-INSTALL-ENTRY-SCRIPT: 'meson==0.60.1','console_scripts','meson'
>   import re
>   import sys
>
>   # for compatibility with easy_install; see #2198
>   __requires__ = 'meson==0.60.1
>
> As you said, the interpreter (python3.9) is not installed, actually
> running `meson` gives this output:
>   zsh: /usr/pkg/bin/meson: bad interpreter: /usr/pkg/bin/python3.9: no
> such file or directory

So somehow, the python3.9 package was removed, and meson remained.

> When I run 'pkg_info -e '*python*', this appears:
>   python39-3.9.7
>   python310-3.10.12
>   python27-2.7.18nb6
>   python39-3.9.9nb1
>   python38-3.8.12nb1
>   python37-3.7.12nb1
>
> So the python39 package installation is broken. Running `pkg_admin
> check python3.9` reports multiple errors saying that this or that file
> is in `+CONTENTS` but not on the filesystem, but then I found out ...

generally, removing broken packages and letting them be installed is wise.

> ... there is a worse issue. This NetBSD is running as a guest on a Linux
> Virtualbox host, and I just realized there are are bad sectors on the
> hard drive that have caused significant corruption of several files in
> `/usr/pkg/pkgdb` and elsewhere (e.g. `cat +CONTENTS` might return binary
> jibberish on stdout instead of showing the text contents). When
> attempting to run `pkg_admin check`, the Linux host dmesg reports
> several disk read errors and NetBSD spits out some 'lost interrupt' and
> 'bus master DMA error' messages on the TTY and freezes.
>
> Removing packages also triggers the disk allergy. I'm afraid `pkg_admin
> rebuild-tree` might cause further damage.

well, you need to fix that before you can fix pkgsrc. sorry, but that's
how it is....

> So I think I'll have to reinstall to some saner storage (I can't just
> copy the virtual .vdi file because of I/O errors). Not everything is
> corrupted on the NetBSD filesystem so maybe some parts can be salvaged.
> The base system seems alright, it's the pkgsrc/pkg userland that is
> messed up. Any recommendations for backing up with tar ? (or pax or
> whatever?).

I lean to dump.

But, you probably want to just grab /usr/pkg/etc, anad the output of
pkg_info, and then when you are recovered, ensure you have no packages
installed and  no content in /usr/pkg/etc, and add fresh.


Home | Main Index | Thread Index | Old Index