Skip to content

Perl+c23#270

Merged
jkloetzke merged 16 commits into
BobBuildTool:masterfrom
rhubert:perl+c23
Sep 11, 2025
Merged

Perl+c23#270
jkloetzke merged 16 commits into
BobBuildTool:masterfrom
rhubert:perl+c23

Conversation

@rhubert

@rhubert rhubert commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

The reason for this change is to add support for perl modules as needed for example by graphviz (see BobBuildTool/basement-gnu-linux#5)
It seams to be crucial to have the same environment when compiling perl and the perl module, which is not the case if perl is in the sandbox / the host perl and the module is build using the host-compat-toolchain. By using perl as a regular tool perl modules can be used like python modules.

As a new sandbox is necessary I run into #268. The fixes are also added here for now. I can separate the PR's if you want to.

Comment thread recipes/utils/bash/0001-fix-cross-build.patch
Comment thread recipes/perl/perl.yaml
Comment thread classes/install.yaml Outdated
Comment thread classes/install.yaml Outdated
@jkloetzke

Copy link
Copy Markdown
Member

As a new sandbox is necessary I run into #268. The fixes are also added here for now. I can separate the PR's if you want to.

No, we can leave them in here.

@rhubert

rhubert commented Aug 25, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback 👍 I'll rework it following your suggestions but it might take some time to recompile everything...

@rhubert rhubert force-pushed the perl+c23 branch 3 times, most recently from a4c2081 to 8dffa54 Compare September 7, 2025 13:19
@rhubert rhubert marked this pull request as ready for review September 7, 2025 13:19
rhubert and others added 13 commits September 9, 2025 21:22
Bash has CFLAGS and CFLAGS_FOR_BUILD. CFLAGS are used for
(cross)compiling bash, while CFLAGS_FOR_BUILD are used with the
host-gcc. Therefore, the CROSS_COMPILE information needs to be at CFLAGS
instead of CFLAGS_FOR_BUILD. Otherwise, the wrong settings detected by
configure are picked up.
Apply a buildroot patch to fix compile with gcc15.
gcc15 has c23 enabled by default. Apply a patch to the bundled glib.
Our host-compat-toolchain uses glibc 2.31 ATM. This version
still had libcrypt support which was later removed in glibc 2.38.
Since we have glibc 2.39 the is no libxcrypt in the sandbox and thus
tools linked shared against the host-compat toolchains libcrypt can
not be started without libxcrypt.
Using an absolute path for the interpreter breaks if the interpreter is
installed somewhere else. Add a helper function to replace the absolute
path by '/usr/bin/env <interpreter>'.

In case the interpreter is called with arguments, `env -S` must be used.
This only works for coreutils-env and is not supported by busybox 'env'.
The sandbox toolchain doesn't provide a CROSS_COMPILE or a
TOOLCHAIN_SYSROOT environment.
For cross compiling perl modules we need to keep some development files
which are usually not required on the target. Provide a perl-dev package
to make them useable.

Also apply some patches from openembedded to make it possible to
cross-compile perl modules.
This class picks up perl modules from the dependencies and builds the
PERL5LIB search path.
This class configures the necessary environment for cross compilation of
perl modules.
@jkloetzke jkloetzke merged commit 9dad7ac into BobBuildTool:master Sep 11, 2025
3 checks passed
@jkloetzke

Copy link
Copy Markdown
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants