Trident 18.12 Prerelease 2: Chromium Issue


Hello Guys

Upon upgrade to latest build I found chromium does not start up because environ external definition could not be found. While really the C library containing the symbol is on the system because a simple C program compiles, links and runs printing the environment successfully.

This is the runtime linkage error: /usr/local/lib/ Undefined symbol “environ”

When trying to rebuild port compilation fails due not finding appropriate x86intrin.h:

…/…/third_party/angle/src/common/platform.h:91:10: fatal error: ‘x86intrin.h’ file not found

which is located as follows upon GCC8 installtion from pkg:


Even when forcing to find it by creating symlink compilatin fails because a bunch of intrinsics are not declared.

Hopefully fixed soon:


The head which I am trying to build is on this commit as shown above: 7f15c5c73affe2c701ff2b763064e60b791e2c3a

Does anyone know what pkg is missing so that www/chromium build succeeds?


@beanpole135 went through the commit log. Nothing shows up. he did a port sync, and a build is doing it’s thing.

time will tell


Sorry, I was looking at trueos-master where the referenced above commit is there but not on trueos-stable-18.12


Glad someone else pointed this out. I noticed it when I installed the OS last week myself.



Thanks for referencing this!

I commented there to request re-opening the bug since resolution is clearly not reached yet…

I've tried relinking devel/glib20 with GNU ld instead of lld but still the environ
symbol is not found.

Very weird bug, the symbol should be part of libc and its here:
$ ldd /usr/local/lib/
/usr/local/lib/ => /usr/local/lib/ (0x800e00000) => /usr/local/lib/ (0x800efe000) => /lib/ (0x800fa0000) => /usr/local/lib/ (0x8007dd000) => /lib/ (0x800249000)



Yes, as the first test I did to verify the clib is complete I compiled, linked and ran the following successfully:

I rebuilt and reinstalled devel/glib2.0 as well but it didn’t help.

I could not rebuild www/chromium because of stumbling into “x86intrin.h not found” compilation error.

#include <stdio.h>
#include <stddef.h>

extern char** environ;

int main(int argc, char *argv[])
int count = 0;

while(environ[count] != NULL)

printf("[%s] :: ", environ[count]);

return 0;

[ ~] cc test_env.c [~] ./a.out

[LC_ALL=en_US.UTF-8] …

ldconfig output

[~]$ sudo ldconfig -r|grep glib
164:-lpyglib-2.0-python2.7.0 => /usr/local/lib/
186:-ljson-glib-1.0.0 => /usr/local/lib/
395:-lglib-2.0.0 => /usr/local/lib/
439:-ldbus-glib-1.2 => /usr/local/lib/
554:-lavahi-glib.1 => /usr/local/lib/
726:-lpulse-mainloop-glib.0 => /usr/local/lib/
765:-lpoppler-glib.8 => /usr/local/lib/

[ ~]$ sudo ldconfig -r|grep “”
33:-lc.7 => /lib/

I'm able build chromium-68.0.3440.106_7 from ports under 

# pkg install `pkg rquery '%o %n' | grep ^base | grep development | awk '{print $2}'
# compiler-bootstrap llvm60
# cd /usr/ports; git log|head -3
git log | head -3
commit 7f15c5c73affe2c701ff2b763064e60b791e2c3a
Author: Kris Moore <>
Date:   Sun Dec 30 15:53:21 2018 -0500



I have those and yet:

[~]$ sudo pkg install pkg rquery '%o %n' | grep ^base | grep development | awk '{print $2}'
Updating Trident repository catalogue…
Trident repository is up to date.
All repositories are up to date.
Checking integrity… done (0 conflicting)
The most recent version of packages are already installed

In file included from …/…/third_party/angle/src/common/string_utils.cpp:18:
…/…/third_party/angle/src/common/platform.h:91:10: fatal error: ‘x86intrin.h’ file not found
#include <x86intrin.h>

# find /usr/ -name x86intrin.h

# pkg install llvm60 llvm70



llvm60 is there but llvm70 is missing

[~]] sudo pkg install llvm60 Updating Trident repository catalogue... Trident repository is up to date. All repositories are up to date. Checking integrity... done (0 conflicting) The most recent version of packages are already installed [~] sudo pkg install llvm70
Updating Trident repository catalogue…
Trident repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
llvm70: 7.0.0_1

Number of packages to be installed: 1

The process will require 875 MiB more space.
167 MiB to be downloaded.

It is not that.

This is suspiciously empty:

ls -lrt /usr/lib/clang/6.0.1/include/
total 1
drwxr-xr-x 2 root wheel 2 Dec 30 21:04 sanitizer

How did you install 18.12 prelease 2?
I did a simple trueos-update upgrade and watched it happen. Did you do anything else as post-upgrade step?
(because sounds like something was not fully installed after upgrade)


ok , I was able to proceed with builld by doing compiler-bootstrap llvm70
apparently clang was upgraded to 7.0.1 but was not switched to on the system

The devs may be at llvm70:

# pkg which /usr/lib/clang/7.0.1/include/x86intrin.h
/usr/lib/clang/7.0.1/include/x86intrin.h was installed by package OS-runtime-development-13.0.20181219130325
# compiler-bootstrap llvm70
# cc -v
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-portbld-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin



Looking at compiler-bootstrap i see default is llvm60 but clang/6.0.1/include looks purged after upgrade . I guess script should default to llvm70 if llvm60 is gone.

Script to go through and create sym-links to ports version of LLVM


The pull request raised to fix the script:


As for runtime linkage error it seems to be rooted somewhere in how devel/glib20 is built and linked. According to objdump and nm definition for ‘environ’ symbol is not linked in (shown as UNDF) but it is perfectly in place in a simple printenv test binary.

When I inspected make build log I only see -L/usr/local/lib but no -L/lib which might be suspicious because libc is located in /lib

I added some of these details to the previously referenced FreeBSD bug ticket above

This fugly hack:
# pkg install llvm50
# compiler-bootstrap llvm50
And then relink chrome.
# rm /usr/ports/www/chromium/work/.stage_done.chromium._usr_local
# rm /usr/ports/www/chromium/work/.build_done.chromium._usr_local
# rm /usr/ports/www/chromium/work/.package_done.chromium._usr_local
# touch /usr/ports/www/chromium/work/chromium-68.0.3440.106/out/Release/obj/url/url/url_constants.o
# cd /usr/ports/www/chromium; make package



Compiler / linker downgrade seems risky
When I get home I’ll check out the port linker scripts that were mentioned on FreeBSD bug tracker, whether it is possible to fix those up and make compatible with FreeBSD