pkgsrc-Users archive

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

Re: pkgsrc build looking for PYPACKAGE suggestion?



On 1/11/21 10:23 AM, Greg Troxel wrote:
Bob McGowan <ramjr0915%gmail.com@localhost> writes:

On 1/9/21 7:38 AM, Greg Troxel wrote:
While building Samba4, I have a build failure because 'make' is
looking for Python 2.7 based packages, but Python 3.8 packages are
what are available.

A message is printed stating that the system default is "38", but that
the build will use "27", by setting PYPACKAGE.  It then says if this
is not right, interrupt and set PYPACKAGE as needed.

The problem is that it has nothing to say about where/how to make the
change.
pkgsrc has a notion that python packages can be built for a number of
different versions.   Some packages support all of the ones in pkgsrc,
and some don't.  There are variables PYTHON_VERSIORS_ACCEPTED and
PYTHON_VERSIONS_INCOMPATIBLE set by package Makefiles.

Read /usr/pkgsrc/lang/python/pyversion.mk.
I will take a look at these, see if they provide any guidance.
That in particular talks about user-settable variables, package-settable
variables, and variables defined by the file.  You should only set
user-settable variables in mk.conf.

Initially, no.  But your comment suggested to me that I should add
PYPACKAGE=python38 to mk.conf, which I did.
I did not mean to suggest that.  That's not a user-settable variable, so
that's basically a wrong thing to do.

That got me past the first failure, with py-libxml2, but introduced a
problem with the next, py-libxslt, which still wants python2.7.  So I
will try PYPACKAGE.py-libxslt=python27 and see what that does.
You got advice to get rid of stale workdirs.  Let us know if that was
the issue.

OK.  The question as to if I had done a 'make clean clean-depends' is answered with 'yes'.  However, note that this whole experience started with trying to do cross-compiles on my Linux x86_64 system.  Once I got qemu working and NetBSD installed, rather than download all the files again, I copied them from the Linux system to NetBSD, which forced the make clean; make clean-depends.

Given that the potential for cross contamination may still be there I will clean up by deleting and downloading a complete new set of files.

As for the discussion of variables, and which should or should not be changed by the user, I was mis-interppreting the following:

==========================================================================
    The following variables will affect the build process of this package,
    gnome-doc-utils-0.20.10nb7.  Their current value is shown below:

            * PYTHON_VERSION_DEFAULT = 38

    Based on these variables, the following variables have been set:

            * PYPACKAGE = python27

    You may want to abort the process now with CTRL-C and change their value
    before continuing.  Be sure to run `/usr/bin/make clean' after
    the changes.
==========================================================================

The last sentence says "...change _their_ value...".  But looking closer and at other cases of similar messages, where multiple variables are mentioned, so I suspect the plural refers to the variables in the upper section of the message only.

I will be more careful in future.

Bob


Home | Main Index | Thread Index | Old Index