You are not logged in.

#1 2017-11-24 09:13:59

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 833
Website

community/chromium

The Chromium webbrowser and hence all derivates using Chromium (like Vivaldi) have a 32-bit version which
needs at least SSE2 instructions of your CPU

shell> chromium
Illegal instruction (core dumped)
shell> file core
gcore: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from '/usr/lib/chromium/chromium', real uid: 0, effective uid: 0, real gid: 0, effective gid: 0, execfn: '/usr/lib/chromium/chromium', platform: 'i686'
shell> gdb /usr/lib/chromium/chromium core
gdb> layout asm
  >│0x8a1ee2        movsd  -0xc30acc(%ecx),%xmm0                                                        │

So if you have very old 686 CPUs (meaning pre Pentium 4) without SSE2 instructions, compile Chromium on your own. :-)

Offline

#2 2017-11-24 09:16:33

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 833
Website

Re: community/chromium

This also means, beware of packages with 386/686 in their name: they don't really show for which
instruction set they have been compiled. Best is always to have packages as source tarballs.

Offline

#3 2018-03-09 13:01:22

jonathon
Member
From: UK
Registered: 2017-07-19
Posts: 40
Website

Re: community/chromium

I've got Chromium 65 building by switching `ffmpeg` to the system library instead of using the bundled version. I'm trying to prepare a PR for the packaging files, essentially what needs to happen is:

depends+=('ffmpeg')
_system_libs[ffmpeg]=ffmpeg

However, the"system libraries" array is declared `readonly`:

readonly -A _system_libs=(
  #[ffmpeg]=ffmpeg            # https://crbug.com/731766 <- this line needs to change
  [flac]=flac
  [fontconfig]=fontconfig
  [freetype]=freetype2
  [harfbuzz-ng]=harfbuzz
  [icu]=icu
  [libdrm]=
  [libjpeg]=libjpeg
  #[libpng]=libpng            # https://crbug.com/752403#c10
  [libvpx]=libvpx
  [libwebp]=libwebp
  #[libxml]=libxml2           # https://crbug.com/736026
  [libxslt]=libxslt
  [opus]=opus
  [re2]=re2
  [snappy]=snappy
  [yasm]=
  [zlib]=minizip
)

How is this best accomplished with the archlinux32 "overlay" PKGBUILD setup?

Offline

#4 2018-03-10 09:27:37

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 833
Website

Re: community/chromium

Seems a good idea. ffmpeg causes the funny optimization assembly errors. What happens, when we take the system ffmpeg is unclear to me, but I'll make a patch. Especially because chromium is blocking packages currently:

```
[08:07:21] <deep42thought> What do we do about the dependency problem?
[08:07:48] <deep42thought> the blocking package seems to be chromium, which fails to build for some time now and thus still depends on the old library
[08:11:05] -!- isacdaavid has joined #archlinux-ports
[08:33:08] <deep42thought> I'm tempted to delete extra/chromium and update the library
```

Offline

#5 2018-03-10 15:02:21

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 833
Website

Re: community/chromium

depends+=('ffmpeg')

eval "$(
  sed '
    s/#[ffmpeg]=ffmpeg/[ffmpeg]=ffmpeg/g
  ' "${BASH_SOURCE[0]}"
)"

results in:

/data/arch32/builder/work/tmp.I7wBG2/PKGBUILD: line 279926: _system_libs: readonly variable
/data/arch32/builder/work/tmp.I7wBG2/PKGBUILD: line 279930: _unwanted_bundled_libs: readonly variable

yep, this doesn't work. This might be a general problem of the overlay mechanism..

Offline

#6 2018-03-10 15:25:59

deep42thought
Administrator
From: Jena, Germany
Registered: 2017-06-17
Posts: 617

Re: community/chromium

jonathon wrote:

However, the"system libraries" array is declared `readonly`:

Why do they do that?
I opened a bug report - maybe we get an explanation.
As another option we could replace all "readonly" by "declare" in the PKGBUILD with our build scripts, but this feels hackish and potentially produces some other issues.

Offline

#7 2018-03-13 22:13:30

jonathon
Member
From: UK
Registered: 2017-07-19
Posts: 40
Website

Re: community/chromium

andreas_baumann wrote:

eval "$(
  sed '
    s/#[ffmpeg]=ffmpeg/[ffmpeg]=ffmpeg/g
  ' "${BASH_SOURCE[0]}"
)"

Is it necessary to actually alter the line? You should get the same effect just by setting the array value directly (_system_libs[ffmpeg]=ffmpeg) ?

deep42thought wrote:

Why do they do that?

:shrug: Defensive programming maybe, i.e. keeping variables that don't change as constants?

Offline

#8 2018-05-24 21:44:37

jonathon
Member
From: UK
Registered: 2017-07-19
Posts: 40
Website

Re: community/chromium

Huge success. Going from a hint on https://github.com/android-ndk/ndk/issu … -390815633 the bundled FFMPEG will build with:

diff --git a/extra/chromium/PKGBUILD b/extra/chromium/PKGBUILD
index 774975c..bf09043 100644
--- a/extra/chromium/PKGBUILD
+++ b/extra/chromium/PKGBUILD
@@ -1,3 +1 @@
-depends+=('ffmpeg')
-
-_system_libs[ffmpeg]=ffmpeg
+CFLAGS+=' -mno-stackrealign'

https://github.com/archlinux32/packages/pull/14

This also gets Chromium 66 building (not sure why it doesn't like the system FFMPEG, but it doesn't matter with the above change).

Last edited by jonathon (2018-05-24 21:45:20)

Offline

#9 2018-05-25 06:32:45

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 833
Website

Re: community/chromium

Great! :-)

Offline

#10 2018-05-30 20:18:40

jonathon
Member
From: UK
Registered: 2017-07-19
Posts: 40
Website

Re: community/chromium

And with 67.0.3396.56 it's all change. The upstream Arch package has switched to the system FFMPEG, and it all builds without changes on i686. smile

Offline

#11 2018-09-01 11:21:54

jonathon
Member
From: UK
Registered: 2017-07-19
Posts: 40
Website

Re: community/chromium

Workaround for fatal linker warnings (e.g. "/usr/sbin/ld.gold: warning: discarding version information"):

local_flags+=(
    'fatal_linker_warnings=false'
)

Offline

#12 2018-09-01 12:40:45

andreas_baumann
Administrator
From: Zurich, Switzerland
Registered: 2017-08-10
Posts: 833
Website

Re: community/chromium

Thanks. Currently testing. :-)

Offline

#13 2019-08-02 14:04:05

jonathon
Member
From: UK
Registered: 2017-07-19
Posts: 40
Website

Re: community/chromium

I had to add

LDFLAGS+=' -Wl,-z,notext'

under build() to get 76 to compile.

Offline

Board footer

Powered by FluxBB