Bug 259358 - devel/xtensa-esp32-elf: fix build on powerpc64*
Summary: devel/xtensa-esp32-elf: fix build on powerpc64*
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: Craig Leres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-22 17:16 UTC by Piotr Kubaj
Modified: 2021-10-27 17:37 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (leres)


Attachments
patch (665 bytes, text/plain)
2021-10-23 20:46 UTC, Piotr Kubaj
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2021-10-22 17:16:38 UTC
Apparently upgrading to GMP 6.1.0 would fix build on powerpc64* systems: https://review.coreboot.org/plugins/gitiles/coreboot/+/9631016660423d0585a145400232fd68b7e3da8f
Comment 1 Craig Leres freebsd_committer 2021-10-22 20:49:59 UTC
Making changes to the versions of packages used to build the toolchain is non-trivial; would you consider adding (actually: adding back) BROKEN_powerpc64 an acceptable fix?
Comment 2 Piotr Kubaj freebsd_committer 2021-10-22 21:20:49 UTC
I found after creating this PR this patch https://cgit.openembedded.org/openembedded-core/tree/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch?h=jethro

I'm testing it right now.
Comment 3 Piotr Kubaj freebsd_committer 2021-10-23 00:34:37 UTC
That fixes the error, but now build fails later at:
[INFO ]  Installing pass-2 core C gcc compiler
[ERROR]    /wrkdirs/usr/ports/devel/xtensa-esp32-elf/work/crosstool-NG-1.22.0-97-gc752ad5/.build/src/gcc-5.2.0/gcc/match.pd:120:1 error: expected (, got
NAME
[ERROR]    gmake[3]: *** [Makefile:2303: s-match] Error 1
[ERROR]    gmake[2]: *** [Makefile:4098: all-gcc] Error 2
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing pass-2 core C gcc compiler'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_gcc_core_backend[scripts/build/cc/100-gcc.sh@545]
[ERROR]  >>        called from: do_gcc_core_pass_2[scripts/build/cc/100-gcc.sh@160]
[ERROR]  >>        called from: do_cc_core_pass_2[scripts/build/cc.sh@42]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@646]

This is on powerpc64le.
Comment 4 Craig Leres freebsd_committer 2021-10-23 20:32:15 UTC
Are you trying to use this port on powerpc?

Can I test your patch on amd64 (I don't think I have access to powerpc). If so, could you please share your patch?
Comment 5 Piotr Kubaj freebsd_committer 2021-10-23 20:46:42 UTC
Created attachment 228970 [details]
patch

Attached (and drop the patch I linked to before to files/0001-gmp-6.0.0a.patch).
Comment 6 Craig Leres freebsd_committer 2021-10-26 00:08:40 UTC
Your Makefile patch does not cleanly apply for me but I made the changes by hand, downloaded 0001-gmp-6.0.0a.patch and was able to build under 12.2-RELEASE-p10/amd64.

Which version of FreeBSD and what arch are you testing on?
Comment 7 Piotr Kubaj freebsd_committer 2021-10-27 01:16:03 UTC
13.0-RELEASE, powerpc64le.
Comment 8 Craig Leres freebsd_committer 2021-10-27 17:37:36 UTC
I installed 13.0-RELEASE (amd64) on a spare SSD and was able to use poudriere to build the current version of devel/xtensa-esp32-elf and also a version with your suggested patches.

I've cross compiled ports for pfsense before using qemu-user-static but haven't been able to get a 13.0-RELEASE, powerpc64le poudriere jail to install. I even tried qemu-user-static-devel. powerpc64 almost works.

sea 135 # pkg info | fgrep qemu
qemu-user-static-devel-6.0.91  QEMU CPU Emulator (github bsd-user branch)
sea 136 # poudriere jail -c -j 13rease-powerpc64le -a powerpc64le -v 13.0-RELEASE
[00:00:00] Cross-building ports for powerpc64le on amd64 requires QEMU
[00:00:00] Error: You need to install the qemu-user-static package or setup an emulator with binmiscctl(8) for powerpc64le
sea 137 # poudriere jail -c -j 13release-powerpc64 -a powerpc64 -v 13.0-RELEASE
[00:00:00] Cross-building ports for powerpc64 on amd64 requires QEMU
[00:00:00] Creating 13release-powerpc64 fs at /usr/local/poudriere/jails/13release-powerpc64... done
[00:00:01] Fetching MANIFEST for FreeBSD 13.0-RELEASE powerpc64
fetch: https://download.FreeBSD.org/ftp/releases/powerpc64/powerpc64/13.0-RELEASE/MANIFEST: Not Found
fetch: https://download.FreeBSD.org/ftp/releases/powerpc64/powerpc64/13.0-RELEASE/MANIFEST: Not Found
[00:00:02] Error: Failed to fetch from https://download.FreeBSD.org/ftp/releases/powerpc64/powerpc64/13.0-RELEASE/MANIFEST
[00:00:02] Error while creating jail, cleaning up.
[00:00:02] Removing 13release-powerpc64 jail... done
[00:00:03] Cleaning 13release-powerpc64 data... done