Re: Cross compiling user applications for armv7
Mark Millard <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
Michał_Kruszewski <mkru_at_protonmail.com> wrote on
Date: Fri, 19 Sep 2025 18:22:16 UTC :
> I am coming back after one week.
> This time, I got much further.
> I already try to cross compile lang/python311 using the following command:
> doas poudriere bulk -j zturn -p default lang/python311
> However, I think I did something wrong because I keep getting permission and ownership errors.
>
> The ports-mgmt/pkg is the first thing that compiles.
> It failed because of::
> patch: **** can't create /tmp/patcho385AFbZRG8: Permission denied
> I fixed that by manually changing permissions of the tmp directory in the DESTDIR.
> However, right now the second build, which is print/indexinfo, fails because of:
> pkg-static: . wrong user or group ownership (expected 0/0 versus actual 1001/1001)
>
> After build I prepare distribution with the following commands:
> make NO_ROOT=YES installworld -j 11
> make NO_ROOT=YES installkernel -j 11
> make NO_ROOT=YES distribution -j 11
That does not match "man 8 poudriere-jail":
QUOTE
-m method Specify which method to use to create the jail. The
default is http.
. . .
null This option can be used to import an
existing directory that already contains an
installed system. The path must be
specified with -M path. It is expected
that this directory be installed to with
the following:
# cd /usr/src
# make installworld DESTDIR=PATH DB_FROM_SRC=1
# make distrib-dirs DESTDIR=PATH DB_FROM_SRC=1
# make distribution DESTDIR=PATH DB_FROM_SRC=1
It will not be copied at the time of
running “poudriere jail”. Deleting the
jail will attempt to revert any files
changed by poudriere.
END QUOTE
You may want a separate directory tree with content that
matches the documented criteria. That is what I have
always done.
> My MAKEOBJDIRPREFIX and DESTDIR point to custom paths.
>
> I create poudriere jail with the following command:
> doas poudriere jail -c \
> -j zturn \
> -a armv7 \
> -m null -M $wd/build/freebsd/ -S $FREEBSDSRC
>
> I have created ports with:
> poudriere ports -c
I'll note that "man 8 poudriere" says:
QUOTE
. . .
Create optional poudriere.conf
You can also specify an optional poudriere.conf that is pulled in
depending on the build. Any of the following are allowed and will all be
used in the order shown:
/usr/local/etc/poudriere.d/poudriere.conf
/usr/local/etc/poudriere.d/<setname>-poudriere.conf
/usr/local/etc/poudriere.d/<tree>-poudriere.conf
/usr/local/etc/poudriere.d/<jailname>-poudriere.conf
/usr/local/etc/poudriere.d/<tree>-<setname>-poudriere.conf
/usr/local/etc/poudriere.d/<jailname>-<tree>-poudriere.conf
/usr/local/etc/poudriere.d/<jailname>-<setname>-poudriere.conf
/usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-poudriere.conf
. . .
FILES
POUDRIERE_ETC/poudriere.conf See self-documented
/usr/local/etc/poudriere.conf.sample
for example.
POUDRIERE_ETC/poudriere.d/poudriere.conf The configuration can be stored
in the poudriere.d directory as
well.
POUDRIERE_ETC/poudriere.d This directory contains various
configuration files for the
different jails.
. . .
END QUOTE
What do you have for the content of:
/usr/local/etc/poudriere.conf
(or the like)?
/usr/local/etc/poudriere.conf.sample exists for
reference. Some of that is:
# Define to yes to build and stage as a regular user
# Default: yes, unless CCACHE_DIR is set and CCACHE_DIR_NON_ROOT_SAFE is not
# set. Note that to use ccache with BUILD_AS_NON_ROOT you will need to
# use a non-shared CCACHE_DIR that is only built by PORTBUILD_USER and chowned
# to that user. Then set CCACHE_DIR_NON_ROOT_SAFE to yes.
#BUILD_AS_NON_ROOT=no
# Define to the username and groupname to build as when BUILD_AS_NON_ROOT is yes.
# Default: nobody (uid PORTBUILD_UID)
#PORTBUILD_USER=nobody
#PORTBUILD_GROUP=nobody
# Define to the uid and gid to use for PORTBUILD_USER if the user does not
# already exist in the jail.
# Default: 65532
#PORTBUILD_UID=65534
#PORTBUILD_GID=65534
Are you happy with the documented defaults?
(Fair warning, I've always used
BUILD_AS_NON_ROOT=no so I've no experience.)
===
Mark Millard
marklmi at yahoo.com