WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: piCore-14.x x extensions updated  (Read 2099 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14549
piCore-14.x x extensions updated
« on: August 04, 2023, 03:32:28 AM »
The piCore-14.x x extensions have been updated - it would be best to update all of them at the same time.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: piCore-14.x x extensions updated
« Reply #1 on: August 20, 2023, 05:27:01 AM »
Hi

I'm trying to compile firefox
Code: [Select]
$ time ./mach configure
 ...
 1:08.78 checking for rustc... /usr/local/bin/rustc
 1:08.78 checking for cargo... /usr/local/bin/cargo
 1:10.98 checking rustc version... 1.69.0
 1:11.02 checking cargo version... 1.69.0
 1:11.34 checking for rust host triplet...
 1:11.35 ERROR: The rust compiler host (armv7-unknown-linux-gnueabihf) is not suitable for the configure host (armv7l-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf).
 1:11.35
 1:11.35 You can solve this by:
 1:11.35 * Set your configure host to match the rust compiler host by editing your
 1:11.35 mozconfig and adding "ac_add_options --host=armv7-unknown-linux-gnueabihf".
 1:11.35 * Or, install the rust toolchain for armv7l-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf, if supported, by running
 1:11.35 "rustup default stable-arm-unknown-linux-gnueabihf"

Does that mean I'll need to compile rust as well ?
I guess it means the compiler in the repo was built in armv7l and probably won't work in armv7 or anything lower.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1079
Re: piCore-14.x x extensions updated
« Reply #2 on: August 20, 2023, 07:54:34 AM »
Rust was just rebuilt, but yes, it was done on a pi4. When on a pi3, you need to override the host triplet.  The older pi hardware is quickly becoming software obsolete.   

Moving your pi3 to aarch64 might be easier to work with.   
« Last Edit: August 20, 2023, 07:56:43 AM by Paul_123 »

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: piCore-14.x x extensions updated
« Reply #3 on: August 20, 2023, 10:09:15 PM »
Grab my rpi4
Plug in the sd card I'm working on
Code: [Select]
$ rm -fr firefox-115.1.0/
$ tar -xf firefox-115.1.0esr.source.tar.xz
$ cd firefox-115.1.0/
$ cp ../mozconfig.cross mozconfig
$ time ./mach clobber
...
$ time ./mach configure
...
 0:12.57 checking for host system type... armv7l-unknown-linux-gnueabihf
 0:12.57 checking for target system type... armv7l-unknown-linux-gnueabihf
...
 0:33.45 checking for rust host triplet...
 0:33.45 ERROR: The rust compiler host (armv7-unknown-linux-gnueabihf) is not suitable for the configure host (armv7l-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf).
 0:33.45
 0:33.45 You can solve this by:
 0:33.45 * Set your configure host to match the rust compiler host by editing your
 0:33.45 mozconfig and adding "ac_add_options --host=armv7-unknown-linux-gnueabihf".
 0:33.45 * Or, install the rust toolchain for armv7l-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf, if supported, by running
 0:33.45 "rustup default stable-arm-unknown-linux-gnueabihf"
 0:33.46
*** Fix above errors and then restart with "./mach build"
Command exited with non-zero status 1

Interesting, rust doesn't work for me on pi4 either
Code: [Select]
$ sudo /mnt/mmcblk0p3/V3DLib/obj/qpu-debug/bin/detectPlatform
Platform    : Raspberry Pi 4 Model B Rev 1.1
Model Number: BCM2711
Revision    : c03111
This is a pi platform.
GPU: v3d (VideoCore VI)

Moving your pi3 to aarch64 might be easier to work with.   
I'm simply filling out the missing pieces for the 32-bit, I get requests of porting firefox-perf.tcz to 32-bit
I'm quite curious on how it will perform as well

P.S. I just send nss.tcz and nspr.tcz to tcesubmit at gmail
They are needed for newer firefox (115.1 ESR)
« Last Edit: August 20, 2023, 10:17:25 PM by polikuo »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1079
Re: piCore-14.x x extensions updated
« Reply #4 on: August 21, 2023, 03:56:34 AM »
I recall having issues getting rust to build with the same toolchain triplet as gcc.  It had to be forced to armv7.  Most things don't care.

Does editing the mozconfig resolve the issue? 
« Last Edit: August 21, 2023, 06:42:57 AM by Paul_123 »

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: piCore-14.x x extensions updated
« Reply #5 on: August 21, 2023, 06:48:05 AM »
Does editing the mozconfig resolve the issue?
I've found another way to bypass the checker by editing certain files.
Specifically, build/moz.configure/rust.configure
I'll upload the detailed instructions when everything is ready.

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1079
Re: piCore-14.x x extensions updated
« Reply #6 on: August 21, 2023, 06:58:57 AM »
good luck building. I failed miserably the last time I tried due to hitting the memory limit for a single process.... but then I was going the normal gcc route.  llvm might be different.

aus9

  • Guest
Re: piCore-14.x x extensions updated
« Reply #7 on: August 21, 2023, 07:16:04 PM »
Hi
Quote
I get requests of porting firefox-perf.tcz to 32-bit

If it was only my request, I withdraw it....sorry for not saying it earlier.
My browser needs are satisfied with get-chromium-browser.tcz

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: piCore-14.x x extensions updated
« Reply #8 on: August 22, 2023, 06:35:40 AM »
Code: [Select]
$ ./configure ...
Node.js configure: Found Python 3.11.2...
Traceback (most recent call last):
  File "/mnt/mmcblk0p3/node-v16.20.2/./configure", line 28, in <module>
    import configure
  File "/mnt/mmcblk0p3/node-v16.20.2/configure.py", line 14, in <module>
    import bz2
  File "/usr/local/lib/python3.11/bz2.py", line 17, in <module>
    from _bz2 import BZ2Compressor, BZ2Decompressor
ModuleNotFoundError: No module named '_bz2'
Command exited with non-zero status 1
$ provides.sh "_bz2"
python3.10.tcz
python3.6.tcz
python3.8.tcz
python3.9.tcz

Hi.

BZ2 module for python3.11 on armv7 is not available.
Google says you need to specify it when building python.
I've tried loading bzip2-dev, it has nothing to do with the error.
I can probably get around with an older version, node.js doesn't appears to depend on python anyway...

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1079
Re: piCore-14.x x extensions updated
« Reply #9 on: August 22, 2023, 10:48:26 AM »
Interesting that you cannot even add to python as a separate module.  I'll have to adjust my python build scripts.


Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1079
Re: piCore-14.x x extensions updated
« Reply #10 on: August 22, 2023, 04:57:34 PM »
Python3.11 has been updated on all piCore repos

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: piCore-14.x x extensions updated
« Reply #11 on: August 25, 2023, 02:25:50 AM »
Apparently, Node has dropped armv6 ages ago
https://github.com/nodejs/build/issues/1677
It took me 4 tries until a success build on my RPI3B.
GCC didn't work for me, evey tries it failed with different reasons.
With LLVM, I was finally able to get a success build for armv7.
Sorry, armv6 users, but I'm gonna build Firefox for armv7.
Frankly speaking, armv6 specs are not that beefy anyway.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: piCore-14.x x extensions updated
« Reply #12 on: August 31, 2023, 07:33:36 AM »
Apparently, firefox now requires webassembly
I'll need to rebuild llvm, won't I ?  :P
If yes, which version should I build ? (for armv7 and probably aarch64)
https://github.com/WebAssembly/wasi-sdk/issues/172
Code: [Select]
1:01.69 checking the wasm C compiler version... 15.0.7
 1:01.80 checking the wasm C compiler works... no
 1:01.80 DEBUG: Creating `/tmp/conftest.n2308nwq.c` with content:
 1:01.80 DEBUG: | int
 1:01.80 DEBUG: | main(void)
 1:01.80 DEBUG: | {
 1:01.80 DEBUG: |
 1:01.80 DEBUG: |   ;
 1:01.80 DEBUG: |   return 0;
 1:01.80 DEBUG: | }
 1:01.81 DEBUG: Executing: `/usr/local/bin/clang -std=gnu99 --target=wasm32-wasi /tmp/conftest.n2308nwq.c -c`
 1:01.81 DEBUG: The command returned non-zero exit status 1.
 1:01.81 DEBUG: Its error output was:
 1:01.81 DEBUG: | error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasi"'
 1:01.81 DEBUG: | 1 error generated.
 1:01.81 ERROR: Failed compiling a simple C source with the wasm C compiler
Code: [Select]
tc@piCore:~$ llc --version
LLVM (http://llvm.org/):
  LLVM version 15.0.7
  Optimized build with assertions.
  Default target: armv7l-unknown-linux-gnueabihf
  Host CPU: cortex-a53

  Registered Targets:
    arm     - ARM
    armeb   - ARM (big endian)
    thumb   - Thumb
    thumbeb - Thumb (big endian)
« Last Edit: August 31, 2023, 07:42:00 AM by polikuo »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1079
Re: piCore-14.x x extensions updated
« Reply #13 on: August 31, 2023, 08:14:54 AM »
I would just rebuild the current version.


Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: piCore-14.x x extensions updated
« Reply #14 on: September 01, 2023, 09:39:27 AM »
I'm tired.  :P
Any suggestions ?