# chromium build failed



## streetmagic (Jul 19, 2017)

Hi Friends,

Build of Chromium port failed on my PC.

I have not found any reported similar issue(s) in the forum/Internet, so I suspect that I'm doing something in a wrong way and an answer on my issue is trivial. But I'm a newcomer  to the FreeBSD land and can't fix the issue all alone.

Environment:

```
$ freebsd-version -ku; uname -apKU
11.0-RELEASE-p1
11.0-RELEASE-p1
FreeBSD msifree 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64 amd64 1100122 1100122
```

Build:

```
# make install clean

To build Chromium, you should have around 2 GB of memory
and a fair amount of free diskspace (~ 3.7GB).

Make sure you have Python build with the SEM option ON
(default in python27-2.7.8 since r361735)
===>  License BSD3CLAUSE LGPL21 MPL accepted by the user
===>  Found saved configuration for chromium-52.0.2743.116
===>   chromium-52.0.2743.116 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by chromium-52.0.2743.116 for building
===>  Extracting for chromium-52.0.2743.116
=> SHA256 Checksum OK for chromium-52.0.2743.116.tar.xz.
===>  Patching for chromium-52.0.2743.116
===>  Applying extra patch /usr/ports/www/chromium/files/extra-patch-clang
===>  Applying FreeBSD patches for chromium-52.0.2743.116
No such line 363 in input file, ignoring
No such line 931 in input file, ignoring
No such line 736 in input file, ignoring
===>   chromium-52.0.2743.116 depends on file: /usr/local/bin/gperf - found
===>   chromium-52.0.2743.116 depends on executable: bash - found
===>   chromium-52.0.2743.116 depends on executable: yasm - found
===>   chromium-52.0.2743.116 depends on executable: flock - found
===>   chromium-52.0.2743.116 depends on file: /usr/local/include/linux/videodev2.h - found
===>   chromium-52.0.2743.116 depends on file: /usr/local/share/usbids/usb.ids - found
===>   chromium-52.0.2743.116 depends on package: py27-Jinja2>0 - not found
===>  License BSD3CLAUSE accepted by the user
===>  Found saved configuration for py27-Jinja2-2.8
===>   py27-Jinja2-2.8 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by py27-Jinja2-2.8 for building
===>  Extracting for py27-Jinja2-2.8
=> SHA256 Checksum OK for Jinja2-2.8.tar.gz.
===>  Patching for py27-Jinja2-2.8
===>   py27-Jinja2-2.8 depends on package: py27-setuptools27>0 - not found
===>  Installing for py27-setuptools27-20.0
===>   py27-setuptools27-20.0 depends on file: /usr/local/bin/python2.7 - found
===>  Checking if py27-setuptools27 already installed
===>   Registering installation for py27-setuptools27-20.0 as automatic
Installing py27-setuptools27-20.0...
pkg-static: py27-setuptools27-20.0 conflicts with py27-setuptools-36.0.1 (installs files into the same place).  Problematic file: /usr/local/lib/python2.7/site-packages/easy-install.pth.dist
*** Error code 70

Stop.
make[4]: stopped in /usr/ports/devel/py-setuptools27
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/devel/py-Jinja2
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/devel/py-Jinja2
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/chromium
*** Error code 1

Stop.
make: stopped in /usr/ports/www/chromium
```

Thanks in advance for your help.


----------



## drhowarddrfine (Jul 19, 2017)

You are installing an out of date version of www/chromium. It is now at version 59 and you are installing version 52. So the old version also wants an older version of py27-setuptools and that is the problem here.

Install the current version of chromium.

Where did you get version 52 from? Is your ports tree up to date?


----------



## streetmagic (Jul 19, 2017)

OK, I've updated ports, but now the build failed by other reason:

```
# make install clean
===>   chromium-59.0.3071.115_1 depends on executable: gperf - found
===>   chromium-59.0.3071.115_1 depends on executable: clang40 - found
===>   chromium-59.0.3071.115_1 depends on executable: yasm - found
===>   chromium-59.0.3071.115_1 depends on executable: python - found
===>   chromium-59.0.3071.115_1 depends on package: ffmpeg>=3.2.2,1 - found
===>   chromium-59.0.3071.115_1 depends on executable: bash - found
===>   chromium-59.0.3071.115_1 depends on executable: flock - found
===>   chromium-59.0.3071.115_1 depends on executable: node - not found
===>   node-8.1.4 depends on executable: gmake - found
===>   node-8.1.4 depends on file: /usr/local/bin/python2.7 - found
===>   node-8.1.4 depends on executable: python2 - found
===>   node-8.1.4 depends on package: pkgconf>=1.3.0_1 - found
===>   node-8.1.4 depends on shared library: libcares.so - found (/usr/local/lib/libcares.so)
===>   node-8.1.4 depends on shared library: libuv.so - not found
===>   libuv-1.13.1 depends on executable: autoconf-2.69 - not found
===>   autoconf-2.69_1 depends on executable: gm4 - not found
===>   m4-1.4.18,1 depends on executable: makeinfo - not found
===>   texinfo-6.4_1,1 depends on executable: help2man - not found
===>   help2man-1.47.4 depends on package: p5-Locale-gettext>=0 - not found
===>   p5-Locale-gettext-1.07 depends on executable: msgfmt - found
===>   p5-Locale-gettext-1.07 depends on package: perl5>=5.24<5.25 - found
===>   p5-Locale-gettext-1.07 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>  Configuring for p5-Locale-gettext-1.07
env: /usr/local/bin/perl5.24.2: No such file or directory
*** Error code 127

Stop.
make[12]: stopped in /usr/ports/devel/p5-Locale-gettext
*** Error code 1

Stop.
make[11]: stopped in /usr/ports/misc/help2man
*** Error code 1

Stop.
make[10]: stopped in /usr/ports/misc/help2man
*** Error code 1

Stop.
make[9]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[8]: stopped in /usr/ports/print/texinfo
*** Error code 1

Stop.
make[7]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/devel/m4
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/devel/autoconf
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/devel/libuv
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/www/node
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/www/node
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/chromium
*** Error code 1

Stop.
make: stopped in /usr/ports/www/chromium
```


```
# perl5 --version

This is perl 5, version 24, subversion 1 (v5.24.1) built for amd64-freebsd-thread-multi
```


```
# pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
# pkg search perl5
perl5-5.24.1_1                 Practical Extraction and Report Language
perl5-devel-5.27.1.72          Practical Extraction and Report Language
perl5.22-5.22.3_1              Practical Extraction and Report Language
perl5.26-5.26.0                Practical Extraction and Report Language
```


----------



## bookwormep (Jul 19, 2017)

I have tried to install www/chromium during a test of the new FreeBSD-11.1-RC3, with no luck. Maybe just try some other web-browser until the upstream patch fixing chromium is ready?


----------



## Deleted member 30996 (Jul 19, 2017)

streetmagic said:


> `$ freebsd-version -ku; uname -apKU
> 11.0-RELEASE-p1
> 11.0-RELEASE-p1
> FreeBSD msifree 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64 amd64 1100122 1100122`



You're at FreeBSD 11.0-RELEASE-p1 while the current version is FreeBSD 11.0-RELEASE-p9. You should run
`freebsd-update fetch
freebsd-update install`

to get issued patches, from a security point alone.


----------



## streetmagic (Jul 20, 2017)

Thank you for all your answers.
P.S. I fixed the issue last night by a tiny hack:
`ln -s /usr/local/bin/perl5 /usr/local/bin/perl5.24.2`


----------



## drhowarddrfine (Jul 20, 2017)

That would not be necessary if you just upgraded your system and then your software and it's never a good idea to use a hack.


----------



## streetmagic (Jul 20, 2017)

drhowarddrfine said:


> That would not be necessary if you just upgraded your system and then your software and it's never a good idea to use a hack.


Yes, I agree. But I just found workaround early than received a correct solution.


----------



## bookwormep (Jul 21, 2017)

Since testing the 11.1-RC3, I decided to go ahead and test your "tiny hack." This chromium build will take a while on my older hardware, but it looks good so far! Nice.


----------



## drhowarddrfine (Jul 22, 2017)

bookwormep Are you having the exact same problem as he? You shouldn't so you shouldn't need or use the hack.


----------



## bookwormep (Jul 22, 2017)

Actually, yes, the original build process stopped with error code 127 on the p5-Locale-gettext-1.07  The env:  /usr/local/bin/perl5.24.2 could not find file or directory. So, using a symbolic link - "tiny hack" worked.

EDIT: However, symbolic links must be used very carefully - and with good reason. Many examples of misuse and unintended consequences are given on this forum and elsewhere.
I took it upon myself to use an old "test machine" (not unlike a virtual machine) for the purposes of testing untested software, distributions, etc. Dr. HowardFine is right, of course, my actions taken are "experimental" in nature, and not recommended for regular users who want a stable FreeBSD machine; using proper actions and procedures - my apology.

Edit2: The chromium build was completed after processing for two days (Intel Pentium 4 CPU).
 However, after numerous attempts to troubleshoot, it NEVER launched. I will try again after the full 11.1-RELEASE becomes available. BTW, I used www/Firefox as an alternative web-browser, and it worked like a charm.


----------



## monwarez (Jul 30, 2017)

I would say that a correct solution would be to use a clean environment for building ports , such as ports-mgmt/poudriere or ports-mgmt/synth or other alternative that use a clean environment. It will get reproducible build, and if the port does not build in this clean environment, then there will be an issue in this port.


----------



## bookwormep (Jul 31, 2017)

Fresh install of the FreeBSD11.1-RELEASE and installed chromium for the sake of time.
Segmentation fault as usual; but then ran:


```
$ ktrace chrome
```
 and followed with: 
	
	



```
$ kdump
```

I found several messages: "No file or directory" and they occurred on:

/usr/lib/libICE.so.6... /usr/lib/libSM.so.6../usr/lib/libatspi.so.0
/usr/lib/liborc-0.4.so.0../lib/librt.so.1...and others.

https://lists.freebsd.org/pipermail/freebsd-ports/2014-December/096961.html

"www/webkit-gtk3 broken on FreeBSD-8.4...." by truckman; concluded after examining results from his test of this port - that mixing different versions of C++, namely: (-.so.6) and (-.so.0) within the same executable, generally, produces crashes.


----------



## drhowarddrfine (Jul 31, 2017)

I would ignore everything in that link as it doesn't apply here. If you have a fresh install, none of this should be happening. I just reinstalled chromium yesterday without issue.

So the question is, what is the output of the error you received when you tried installing chromium this time?


----------



## Datapanic (Jul 31, 2017)

I am building chromium in a poudriere jail and will test this out when it's done - maybe 12 or so hours from now...


----------



## drhowarddrfine (Jul 31, 2017)

Datapanic You're wasting your time. There is nothing wrong with building or installing the current chromium.


----------



## bookwormep (Jul 31, 2017)

Really? Sorry, Dr.HowardFine you just can't make such accusations. The kdump shows quite 
clearly that chrome has mixed versions within it's executable and crashes, everytime!


----------



## drhowarddrfine (Jul 31, 2017)

bookwormep Of course I can! While you show those lib files as being missing and a cause for chromium crashing, I don't any of those files on my workstation and am happily typing on chromium right now, and have been for years. What I am saying is, there is something more wrong with your setup than there is with chromium.

I just did a ktrace on my system and it completed with no errors reported.


----------



## bookwormep (Aug 1, 2017)

Yes, on this latter point you must be correct. This "older hardware" test machine is unreliable, I have to unload modules for a successful boot at times.

DrHowardFine you spoke to other users on the topic of ports updating and the GL/Mesa ports merger back in May of this year. ( https://forums.freebsd.org/threads/60921/ )
Do you know something about this affecting www/chromium. Are you willing to shed some light on this aspect?

MonWarez you are stating in your post above that an alternative (but clean ports) methodology should be used?


----------



## drhowarddrfine (Aug 1, 2017)

That was an issue unrelated to this.


----------



## monwarez (Aug 1, 2017)

bookwormep said:


> ...
> 
> MonWarez you are stating in your post above that an alternative (but clean ports) methodology should be used?



Yes the problem with building with an unknown environment is that some configuration tools may pick up some functionality (like if there is XXX installed in the system then enable this feature). When a configuration stage do that, you will end up with a slightly different version of the program.That could be enough to have a broken program (maybe there is a need of a patch, or the program could also just not build).


----------

