Chromium does not compile under FreeBSD 13.3

Which version of FreeBSD, exactly?

Packages of ports from quarterly, or latest?

freebsd--version -kru ; uname -aKU

pkg -vv | grep -e url -e enabled -e priority
Hi grahamperrin,

Thank you for your guidance. Please see below for the outputs of the commands you recommended:
freebsd--version -kru ; uname -aKU
14.0-RELEASE-p5
14.0-RELEASE-p5
14.0-RELEASE-p5
FreeBSD htpc.example.com 14.0-RELEASE-p5 FreeBSD 14.0-RELEASE-p5 #0: Tue Feb 13 23:37:36 UTC 2024 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd6
4.amd64/sys/GENERIC amd64 1400097 1400097
pkg -vv | grep -e url -e enabled -e priority
url : "pkg+http://pkg.freebsd.org/FreeBSD:14:amd64/quarterly",
enabled : yes,
priority : 0,
Most of the dependencies installed, actually. bash-completion complained about MAKE_JOBS_UNSAFE=yes setting, which I did, after which it compiled. foreign-cdm failed to compile a few times; I ended up installing it using pkg rather than compiling it.
# portmaster /usr/ports/www/chromium

===>>> Currently installed version: chromium-122.0.6261.111
===>>> Port directory: /usr/ports/www/chromium

===>>> Launching 'make checksum' for www/chromium in background
===>>> Gathering dependency list for www/chromium from ports

===>>> The dependency for devel/llvm17
seems to be handled by llvm17-17.0.6_5

===>>> Initial dependency check complete for www/chromium


===>>> Starting build for www/chromium <<<===

===>>> All dependencies are up to date

===> Cleaning for chromium-122.0.6261.111

To build Chromium, you should have around 2GB of memory
and around 14 GB of free disk space.

===> License BSD3CLAUSE LGPL21 MPL11 accepted by the user
===> chromium-122.0.6261.111 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by chromium-122.0.6261.111 for building
===> Extracting for chromium-122.0.6261.111
=> SHA256 Checksum OK for chromium-122.0.6261.111.tar.xz.
=> SHA256 Checksum OK for chrome-linux-122.0.6261.111-llvm17.profdata.tar.xz.
The host has 16 GB RAM and 174 GB SDD space.

As I was typing this, I realized that it actually compiled from the message posted above. I failed so many times, after the last crash I assumed it still didn't work, but apparently it did. I am sorry for the noise.
 
As I was typing this, I realized that it actually compiled from the message posted above. I failed so many times, after the last crash I assumed it still didn't work, but apparently it did.
If you compile enough, you'll see that kind of behavior from time to time. I've had that happen to me on a few ports, and every time I see that behavior on a different port. Never bothered to really pay attention and investigate that behavior, but I'd make an educated guess that it may have something to do with the hardware you have. :)
 
What is weird about Chromium that it compiles fine for some, & doesn't compile for others.
This does not happen with other ports like "htop".
 
Chromium compiles fine for me under 14-stable.

sure,it works on 14-CURRENT here. But it is called Chrome. When it does not work at all is on FreeBSD 13.3 (at least for me). I'm not talking about the chromium package,but the port.
 
sure,it works on 14-CURRENT here. But it is called Chrome. When it does not work at all is on FreeBSD 13.3 (at least for me). I'm not talking about the chromium package,but the port.
Well then come up with some proper error messages, and/or differenciate which nondefault options are the problem. Default settings work here, and work elsewhere - otherwise there wouldn't be a pkg to download. I'm getting bored of this.
 
Btw, does anybody know why Chromium had changed User Agent a while ago? It was FreeBSD, and now says Linux. Or is it just me, who cares?
 
Btw, does anybody know why Chromium had changed User Agent a while ago? It was FreeBSD, and now says Linux. Or is it just me, who cares?
Nice job paying attention! 👍

It is useful to know how to change the User Agent string in Chromium, a lot of useful web sites don't work properly if the UA string is not what they like to see. That's unfortunate politics, with a workaround that is stupid easy. ;)
 
On 13.3, if MAKE_JOBS_UNSAFE works successful, it is likely an OOM kill from the unfixed arc_prune issue. I had this, too.
 
Nope. Please go back and see :


this is where it stops to compile. No one explained if he has got that error and how to fix it. So,I assume that it is a bug that happens in some circumstances. Yes,I used MAKE_JOBS_UNSAFE.
 
Now I'm sure that Chromium does not compile correctly on FreeBSD 13.3 because I've installed it from scratch and then I've launched the compilation. Anyway,the error that I've got is not the same that I've got on my main installation. This time is the following one :

Code:
/compat/linux/opt/rh/devtoolset-11/root/usr/bin/gcc -Wall -Wextra -Wno-unused-parameter --sysroot=/compat/linux -02 -std=c99 -fPIC -shared -o build/override-linux.so src/override.c -ldl && chmod a+rX build/override-linux.so

ELF binary type "0" not known

sh : /compat/linux/opt/rh/devtoolset-11/root/usr/bin/gcc: exec format error

The port that fails is called "foreign-cdm".

You need brandelf, unless there is a problem with your Linux kernel module.
 
Nope. Please go back and see :

Well, I don't understand what You're doing. I for my part had enough strange failures back 10 or 20 years ago, so I started to read in all the Makefiles and Options, compute an exact dependency tree from them, then build all the prereqs individually (not relying on the make command building them implicitely), then deinstall all and install only those prereqs the port explicitely requires, and build only the port itself. And then there were no longer any strange library errors or whatever.
I suppose poudriere nowadays does something similar, give or take a few. I never looked into their stuff, as I was busy with mine.
 
If I understand this correctly, then You activated some nondefault options on the build of chromium (WIDEVINE?).

In that case, the problem is not that chromium fails to build, but a specific nondefault option that fails to build.
This happens often, because, obviousely, these options are not tested on every quarterly. Sometimes they need a little bit of local patching, sometimes they don't work at all.

This is not nice, but I don't see how it might be solved. What I do see, however, is an annoyance, when people state things like "Chromium does not compile", and do not bother to first try with the default settings.
 
Back
Top