Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of build fixes #8477

Merged
merged 2 commits into from
Jan 5, 2024
Merged

A couple of build fixes #8477

merged 2 commits into from
Jan 5, 2024

Conversation

dhewg
Copy link
Contributor

@dhewg dhewg commented Jan 4, 2024

Just a few small fixes for issues I ran into.

config/functions Outdated
@@ -609,13 +609,16 @@ EOF
}

create_meson_conf_target() {
local linker="$(get_target_linker)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense. Does this mean that we have been usingbfd for all meson:target builds? What is the impact of these builds now using gold or mold? (Well specifically gold as it is the default in the LE12 image?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I believe those have been using bfd all along.
I only tested mold for my allwinner board though. While that works just fine, I neither tested gold nor any other platform

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one will need more testing then. I just noticed pixman on the 0.43.0 update is meson and it explicitly wanted bfd in configure, but with this change gold would be used. So let’s hold this commit back for LE12.

@@ -48,6 +48,7 @@ make_host() {

makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C libsframe install # bfd is reliant on libsframe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is bfd necessary for or1k? It is technically correct - not sure why the buildhost for Allwinner builds is not having a problem. Should the bfd line go? @jernejsk

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really sure if it's necessary, but this at least fixes the toolchain build for me

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll give mold/gold/bfd a try on a build. I’m assuming you are doing PROJECT=Allwinner ARCH=aarch64 DEVICE=H6 make image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t reproduce an error with

PROJECT=Allwinner ARCH=aarch64 AUTOREMOVE=yes DEVICE=H6 make image

LibreELEC.kernel11$ ls -latr target/
total 1404912
drwxr-xr-x  3 docker docker      4096 Dec  2 04:37 addons
drwxr-xr-x 39 docker docker      4096 Jan  5 02:29 ..
-rw-r--r--  1 docker docker  23552008 Jan  5 02:31 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194.kernel
-rw-r--r--  1 docker docker 129667072 Jan  5 02:31 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194.system
-rw-r--r--  1 docker docker 154112000 Jan  5 02:31 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194.tar
-rw-r--r--  1 docker docker       125 Jan  5 02:31 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194.tar.sha256
-rw-r--r--  1 docker docker 141391534 Jan  5 02:32 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-beelink-gs1.img.gz
-rw-r--r--  1 docker docker       140 Jan  5 02:32 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-beelink-gs1.img.gz.sha256
-rw-r--r--  1 docker docker 141414759 Jan  5 02:32 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-3.img.gz
-rw-r--r--  1 docker docker       139 Jan  5 02:32 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-3.img.gz.sha256
-rw-r--r--  1 docker docker 141414507 Jan  5 02:32 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-3-lts.img.gz
-rw-r--r--  1 docker docker       143 Jan  5 02:32 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-3-lts.img.gz.sha256
-rw-r--r--  1 docker docker 141389745 Jan  5 02:33 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-lite2.img.gz
-rw-r--r--  1 docker docker       143 Jan  5 02:33 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-lite2.img.gz.sha256
-rw-r--r--  1 docker docker 141389464 Jan  5 02:33 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-one-plus.img.gz
-rw-r--r--  1 docker docker       146 Jan  5 02:33 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-orangepi-one-plus.img.gz.sha256
-rw-r--r--  1 docker docker 141427028 Jan  5 02:33 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-pine-h64.img.gz
-rw-r--r--  1 docker docker       137 Jan  5 02:33 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-pine-h64.img.gz.sha256
-rw-r--r--  1 docker docker 141427230 Jan  5 02:34 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-pine-h64-model-b.img.gz
-rw-r--r--  1 docker docker       145 Jan  5 02:34 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-pine-h64-model-b.img.gz.sha256
-rw-r--r--  1 docker docker 141388914 Jan  5 02:34 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-tanix-tx6.img.gz
-rw-r--r--  1 docker docker       138 Jan  5 02:34 LibreELEC-H6.aarch64-12.0-devel-20240105022924-f87e194-tanix-tx6.img.gz.sha256
drwxr-xr-x  3 docker docker     98304 Jan  5 02:34 .


docker@24ee90e044ed:/var/media/DATA/home-rudi/LibreELEC.kernel11$ git diff
diff --git a/distributions/LibreELEC/options b/distributions/LibreELEC/options
index 5a663f4f05..b8323fe019 100644
--- a/distributions/LibreELEC/options
+++ b/distributions/LibreELEC/options
@@ -36,7 +36,7 @@
   MOLD_SUPPORT="no"
 
 # default linker (bfd / gold / mold)
-  DEFAULT_LINKER="gold"
+  DEFAULT_LINKER="mold"
 
 # HARDENING (security relevant linker and compiler flags) support
   HARDENING_SUPPORT="no"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retested (making sure I had mold this time)

diff --git a/distributions/LibreELEC/options b/distributions/LibreELEC/options
index 5a663f4f05..50a77bf642 100644
--- a/distributions/LibreELEC/options
+++ b/distributions/LibreELEC/options
@@ -33,10 +33,10 @@
   GOLD_SUPPORT="yes"
 
 # MOLD (Modern Linker) support
-  MOLD_SUPPORT="no"
+  MOLD_SUPPORT="yes"
 
 # default linker (bfd / gold / mold)
-  DEFAULT_LINKER="gold"
+  DEFAULT_LINKER="mold"
 
 # HARDENING (security relevant linker and compiler flags) support
   HARDENING_SUPPORT="no"

And build “is” fine.

ls -l target
total 1420260
-rw-r--r-- 1 docker docker 142979964 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-beelink-gs1.img.gz
-rw-r--r-- 1 docker docker       140 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-beelink-gs1.img.gz.sha256
-rw-r--r-- 1 docker docker  23552008 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.kernel
-rw-r--r-- 1 docker docker 143003189 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3.img.gz
-rw-r--r-- 1 docker docker       139 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3.img.gz.sha256
-rw-r--r-- 1 docker docker 143002937 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3-lts.img.gz
-rw-r--r-- 1 docker docker       143 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3-lts.img.gz.sha256
-rw-r--r-- 1 docker docker 142978171 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-lite2.img.gz
-rw-r--r-- 1 docker docker       143 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-lite2.img.gz.sha256
-rw-r--r-- 1 docker docker 142977880 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-one-plus.img.gz
-rw-r--r-- 1 docker docker       146 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-one-plus.img.gz.sha256
-rw-r--r-- 1 docker docker 143015449 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64.img.gz
-rw-r--r-- 1 docker docker       137 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64.img.gz.sha256
-rw-r--r-- 1 docker docker 143015653 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64-model-b.img.gz
-rw-r--r-- 1 docker docker       145 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64-model-b.img.gz.sha256
-rw-r--r-- 1 docker docker 131223552 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.system
-rw-r--r-- 1 docker docker 142977329 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-tanix-tx6.img.gz
-rw-r--r-- 1 docker docker       138 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-tanix-tx6.img.gz.sha256
-rw-r--r-- 1 docker docker 155668480 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.tar
-rw-r--r-- 1 docker docker       125 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.tar.sha256

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing a clean build of

PROJECT=Allwinner ARCH=aarch64 AUTOREMOVE=yes DEVICE=H6 s/build binutils-or1k:host

gives me the error.

but if I then execute

PROJECT=Allwinner ARCH=aarch64 AUTOREMOVE=yes DEVICE=H6 s/build binutils-aarch64:host
PROJECT=Allwinner ARCH=aarch64 AUTOREMOVE=yes DEVICE=H6 s/build binutils-or1k:host

I get a successful build. Hmmmm - confused/concerned….

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the files generated - as below, if aarch64 is built first, then the libsframe from this is used to link bfd for or1k. Which is not as intended. This commit needs some more work to address the root cause and potential unexpected behaviors.

$ find build.LibreELEC-H6.aarch64-12.0-devel/ -name libsframe.*
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.a
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.lai
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1.0.0
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/libsframe.ver
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.a
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.lai
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1.0.0
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/libsframe.ver
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/libsframe.ver
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.a
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.so.1
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.so
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.so.1.0.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build seems to be fine without this commit (it's 10 months old ;), so dunno what fixed it, but I'll drop it then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so there still is a problem, apparently I just got lucky yesterday with the build order.
But that looks like general binutils problem for all toolchains then, not just or1k

packages/mediacenter/kodi/package.mk Show resolved Hide resolved
packages/security/libxcrypt/package.mk Outdated Show resolved Hide resolved
@heitbaum
Copy link
Contributor

heitbaum commented Jan 5, 2024

  • Can you put “meson: use chosen linker” in a separate PR (probably for LE13.)
  • Can you add back the patch for “packages/security/libxcrypt/package.mk” - but fix it with PKG_DEPENDS_TARGET+=" mold:host"

So should be just the 2 fixes (kodi, libxcrypt) - these can be merged,

we should look at a correct fix for the binutils- but that can be separate too.

dhewg added 2 commits January 5, 2024 10:14
Required since libxcrypt is now part of the toolchain.

Signed-off-by: Andre Heider <[email protected]>
This fixes the build error:
"Error: Could not find or load main class groovy.ui.GroovyMain"
Because groovy has already been wiped with AUTOREMOVE due to the wrong
dependency.

Fixes: e02cc98 "kodi: support change to Groovy/Apache commons binaries"
Signed-off-by: Andre Heider <[email protected]>
@dhewg
Copy link
Contributor Author

dhewg commented Jan 5, 2024

Done, see #8481
Thanks!

packages/security/libxcrypt/package.mk Outdated Show resolved Hide resolved
@@ -48,6 +48,7 @@ make_host() {

makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C libsframe install # bfd is reliant on libsframe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I retested (making sure I had mold this time)

diff --git a/distributions/LibreELEC/options b/distributions/LibreELEC/options
index 5a663f4f05..50a77bf642 100644
--- a/distributions/LibreELEC/options
+++ b/distributions/LibreELEC/options
@@ -33,10 +33,10 @@
   GOLD_SUPPORT="yes"
 
 # MOLD (Modern Linker) support
-  MOLD_SUPPORT="no"
+  MOLD_SUPPORT="yes"
 
 # default linker (bfd / gold / mold)
-  DEFAULT_LINKER="gold"
+  DEFAULT_LINKER="mold"
 
 # HARDENING (security relevant linker and compiler flags) support
   HARDENING_SUPPORT="no"

And build “is” fine.

ls -l target
total 1420260
-rw-r--r-- 1 docker docker 142979964 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-beelink-gs1.img.gz
-rw-r--r-- 1 docker docker       140 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-beelink-gs1.img.gz.sha256
-rw-r--r-- 1 docker docker  23552008 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.kernel
-rw-r--r-- 1 docker docker 143003189 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3.img.gz
-rw-r--r-- 1 docker docker       139 Jan  5 03:40 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3.img.gz.sha256
-rw-r--r-- 1 docker docker 143002937 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3-lts.img.gz
-rw-r--r-- 1 docker docker       143 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-3-lts.img.gz.sha256
-rw-r--r-- 1 docker docker 142978171 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-lite2.img.gz
-rw-r--r-- 1 docker docker       143 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-lite2.img.gz.sha256
-rw-r--r-- 1 docker docker 142977880 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-one-plus.img.gz
-rw-r--r-- 1 docker docker       146 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-orangepi-one-plus.img.gz.sha256
-rw-r--r-- 1 docker docker 143015449 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64.img.gz
-rw-r--r-- 1 docker docker       137 Jan  5 03:41 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64.img.gz.sha256
-rw-r--r-- 1 docker docker 143015653 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64-model-b.img.gz
-rw-r--r-- 1 docker docker       145 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-pine-h64-model-b.img.gz.sha256
-rw-r--r-- 1 docker docker 131223552 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.system
-rw-r--r-- 1 docker docker 142977329 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-tanix-tx6.img.gz
-rw-r--r-- 1 docker docker       138 Jan  5 03:42 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194-tanix-tx6.img.gz.sha256
-rw-r--r-- 1 docker docker 155668480 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.tar
-rw-r--r-- 1 docker docker       125 Jan  5 03:39 LibreELEC-H6.aarch64-12.0-devel-20240105032953-f87e194.tar.sha256

@@ -48,6 +48,7 @@ make_host() {

makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C libsframe install # bfd is reliant on libsframe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing a clean build of

PROJECT=Allwinner ARCH=aarch64 AUTOREMOVE=yes DEVICE=H6 s/build binutils-or1k:host

gives me the error.

but if I then execute

PROJECT=Allwinner ARCH=aarch64 AUTOREMOVE=yes DEVICE=H6 s/build binutils-aarch64:host
PROJECT=Allwinner ARCH=aarch64 AUTOREMOVE=yes DEVICE=H6 s/build binutils-or1k:host

I get a successful build. Hmmmm - confused/concerned….

@@ -48,6 +48,7 @@ make_host() {

makeinstall_host() {
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
make -C libsframe install # bfd is reliant on libsframe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the files generated - as below, if aarch64 is built first, then the libsframe from this is used to link bfd for or1k. Which is not as intended. This commit needs some more work to address the root cause and potential unexpected behaviors.

$ find build.LibreELEC-H6.aarch64-12.0-devel/ -name libsframe.*
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.a
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.lai
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1.0.0
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/.x86_64-linux-gnu/libsframe/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-aarch64-2.41/libsframe/libsframe.ver
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.a
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.lai
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/.libs/libsframe.so.1.0.0
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/.x86_64-linux-gnu/libsframe/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-or1k-2.41/libsframe/libsframe.ver
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/testsuite/libsframe.find
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/testsuite/libsframe.decode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/testsuite/libsframe.encode
build.LibreELEC-H6.aarch64-12.0-devel/build/binutils-2.41/libsframe/libsframe.ver
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.a
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.so.1
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.la
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.so
build.LibreELEC-H6.aarch64-12.0-devel/toolchain/lib/libsframe.so.1.0.0

@heitbaum heitbaum merged commit c1cab83 into LibreELEC:master Jan 5, 2024
@dhewg dhewg deleted the buildfixes branch January 5, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants