www/chromium 25.0.1364.97 build fails

cpm@

Moderator
Moderator
Developer
Hi

I had the same problem that occurs in the following message, when trying to upgrade to the browser latest version. Seeing that problem is that a lot of object files were compiled with -fno-stack-protector, so if disable gcc(1) stack-smashing protector (SSP) in Makefile solves problem.

Adding in /usr/ports/www/chromium/Makefile:
Code:
CFLAGS+=        -Wno-error [B]-fno-stack-protector[/B]

*EDIT*

Next error reported:
Code:
  CXX(target) out/Release/obj.target/media/media/base/audio_splicer.o
media/base/audio_splicer.cc: In member function 'bool media::AudioSplicer::AddInput(const scoped_refptr<media::Buffer>&)':
media/base/audio_splicer.cc:63:38: error: call of overloaded 'abs(int64)' is ambiguous
media/base/audio_splicer.cc:63:38: note: candidates are:
/usr/local/lib/gcc46/gcc/i386-portbld-freebsd9.1/4.6.3/include-fixed/stdlib.h:100:5: note: int abs(int)
/usr/local/lib/gcc46/include/c++/cstdlib:139:3: note: long int std::abs(long int)
gmake: *** [out/Release/obj.target/media/media/base/audio_splicer.o] Error 1
*** [do-build] Error code 1

Stop in /usr/ports/www/chromium.
*** [build] Error code 1

Stop in /usr/ports/www/chromium.

Current error 'call of abs is ambiguous' in media/base/audio_splicer.o as the compiler considers function name std::abs(int64) therefore reports ambiguities. In order to the port build properly, following patch resolves the issue:
Code:
--- audio_splicer.cc.orig       2013-02-25 14:38:27.000000000 +0100
+++ audio_splicer.cc    2013-02-25 14:31:52.000000000 +0100
@@ -60,7 +60,7 @@
   base::TimeDelta expected_timestamp = output_timestamp_helper_.GetTimestamp();
   base::TimeDelta delta = timestamp - expected_timestamp;
 
-  if (std::abs(delta.InMilliseconds()) > kMaxTimeDeltaInMilliseconds) {
+  if (std::labs(delta.InMilliseconds()) > kMaxTimeDeltaInMilliseconds) {
     DVLOG(1) << "Timestamp delta too large: " << delta.InMicroseconds() << "us";
     return false;
   }
@@ -69,7 +69,7 @@
   if (delta != base::TimeDelta())
     bytes_to_fill = output_timestamp_helper_.GetBytesToTarget(timestamp);
 
-  if (bytes_to_fill == 0 || std::abs(bytes_to_fill) < min_gap_size_) {
+  if (bytes_to_fill == 0 || std::labs(bytes_to_fill) < min_gap_size_) {
     AddOutputBuffer(input);
     return true;
   }

After that www/chromium builds successfully on 9.1-RELEASE/i386.

Hope that helps to other users ;)
 
Hello.

Could you please contact the maintainer about the issue?

It seems there are no up-to-date package for 8-STABLE and no package at all for 9-STABLE.

Perhaps all newer versions have been failing to build for that reason.
 
Beastie said:
Hello.

Could you please contact the maintainer about the issue?

It seems there are no up-to-date package for 8-STABLE and no package at all for 9-STABLE.

Perhaps all newer versions have been failing to build for that reason.

I will do it, but before I want test rebuild again. Thanks for the announcement :e
 
I've recently updated Chromium to that version on 9.1-STABLE, 9.1-RELEASE and 10.0-CURRENT. All the compilations went flawlessly.
 
Remaining problem for limited environment:

If building with base Clang (at least stable/9, i386) and setting CPUTYPE somewhere, at least corei7, build will fail with
Code:
_mm_crc32_u64 is not defined

(Sorry, forgotton to keep build log)

In this case, unsetting CPUTYPE will help. In other PC,
Code:
CPUTYPE=core2
was OK,
but I cannot warrant for other environment.

(Older version of www/chromium was OK even if
Code:
CPUTYPE=corei7
so I was confused)
 
@T-Aoki

Use this test program from Roman Divacky. It's the LLVM CPU autodetection code, it will print the name of your CPU, compiles with gcc and clang on your machine: http://lev.vlakno.cz/~rdivacky/Host.cpp.

Furthermore, you should using the most approaching value supported in bsd.cpu.mk on HEAD.
Code:
CPUTYPE?= core2

A list of supported processors can be found in /usr/share/examples/etc/make.conf. For more information reads make.conf(5).
 
Last edited by a moderator:
@cpu82
cpu82 said:
Use this test program from Roman Divacky. It's the LLVM CPU autodetection code, it will print the name of your CPU, compiles with gcc and clang on your machine, located in /usr/src/contrib/llvm/lib/Support/Host.cpp.

It looks a part of llvm, not standalone program. (As no main() in it)
Do you mean http://lev.vlakno.cz/~rdivacky/Host.cpp?

If so, its output is:
Code:
cpu = sandybridge

Also, I made a local copy of /usr/src/contrib/llvm/lib/Support/Host.cpp and copied main() from http://lev.vlakno.cz/~rdivacky/Host.cpp. (Also needed to gather some of included files to proper local directory)

Its output is:
Code:
cpu = corei7-avx

cpu82 said:
Furthermore, you should using the most approaching value supported in bsd.cpu.mk on HEAD.
Code:
CPUTYPE?= core2

A list of supported processors can be found in /usr/share/examples/etc/make.conf. For more information reads make.conf(5).

Formerly, I thought CPU types defined in bsd.cpu.mk or /usr/share/examples/etc/make.conf are needed to be supported both in base gcc and base clang, and also I found /usr/src/contrib/llvm/lib/Target/X86/X86.td containing corei7. So I thought I can use
Code:
CPUTYPE=corei7
in my /usr/local/etc/pkgtools.conf and got trouble this time. (Yes, I'm a user of portupgrade)

Thanks.
 
Last edited by a moderator:
My apologizes, you needed to add all the required compiler flags to able compiled /usr/src/contrib/llvm/lib/Support/Host.cpp, but the other Host.cpp compiles "out of the box". By the way, llvm/lib/Support/ directory contains the source code that corresponds to the header files located in llvm/include/llvm/ADT/ and llvm/include/llvm/Support/.

My CPU processor information:
Code:
[CMD="#"]grep CPU: /var/run/dmesg.boot[/CMD]
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2400.14-MHz 686-class CPU)

Running test program:
Code:
[CMD="#"]clang++ Host.cpp -o Host[/CMD]
[CMD="#"]./Host[/CMD]
cpu = pentium4

Before, you could using CPUTYPE?=native and let the compiler decides what's best. Now, simply is not supported.
 
Back
Top