Bug 210150

Summary: www/chromium: Build fails on 9.3 for missing type_traits include
Product: Ports & Packages Reporter: Alan Polinsky <polinsky>
Component: Individual Port(s)Assignee: freebsd-chromium (Nobody) <chromium>
Status: Closed FIXED    
Severity: Affects Many People CC: cpm, polinsky, rene
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (chromium)
Hardware: Any   
OS: Any   

Description Alan Polinsky 2016-06-08 21:19:51 UTC
The latest port of chromium compiles fine on my FreeBSD 10.2 machine, but bombs out on my FreeBSD 9.3 with the error:

In file included from ../../third_party/zlib/google/compression_utils.cc:13:                                                                        
../../base/bit_cast.h:9:10: fatal error: 'type_traits' file not found     
#include <type_traits>                                                    
         ^                                                                
1 error generated.                                                        
ninja: build stopped: subcommand failed.                                  
*** [do-build] Error code 1                                               

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

Alan
Comment 1 Alan Polinsky 2016-06-15 09:57:22 UTC
I tried to compile the port on my 9.3 machine with the latest patches and got the following result:

Updating projects from gyp files...
[27763 refs]
gyp: Call to 'python ../build/util/version.py -f ../chrome/VERSION -t "@BUILD@.@PATCH_HI@.@PATCH_LO@" -e "PATCH_HI=int(PATCH)/256" -e "PATCH_LO=int(PATCH)%256"' returned exit status 0 while in chrome/chrome.gyp.
[69570 refs]
*** [do-configure] Error code 1
Comment 2 Rene Ladan freebsd_committer freebsd_triage 2016-06-15 10:02:41 UTC
Is this on i386 or amd64?
What is the subversion/git revision number / date of your portsnap update?
Comment 3 Alan Polinsky 2016-06-15 16:59:29 UTC
(In reply to Rene Ladan from comment #2)
It's an i386 machine. This is the distinfo:

TIMESTAMP = 1465247626
SHA256 (chromium-51.0.2704.84.tar.xz) = 33a3fe1cb8fa5be7b35aa8ae00c8b0a6dc
90975bfa9aea9865180b57b0a4dc6a
SIZE (chromium-51.0.2704.84.tar.xz) = 448556852
SHA256 (chromium-51.0.2704.84-testdata.tar.xz) = f74796ad850f874df407dd624
eeb3a887d6d4fff312c79d4269f370f179490a1
SIZE (chromium-51.0.2704.84-testdata.tar.xz) = 121441480


Alan
Comment 4 Carlos J. Puga Medina freebsd_committer freebsd_triage 2016-07-15 11:51:56 UTC
Can you reproduce this error with chromium-51.0.2704.106 release?
Comment 5 Alan Polinsky 2016-07-18 17:20:15 UTC
I just tried with the suggested port and got the following error:

In file included from ../../third_party/zlib/google/compression_utils.cc:13:
../../base/bit_cast.h:9:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^
1 error generated.
ninja: build stopped: subcommand failed.
*** [do-build] Error code 1
Comment 6 Rene Ladan freebsd_committer freebsd_triage 2016-07-22 20:07:19 UTC
I build-tested Chromium 51.0.2174.106 with the default options in a clean and up-to-date 9.3-i386 jail (9.3-RELEASE-p44), it builds fine there.
Comment 7 Alan Polinsky 2016-07-22 21:15:13 UTC
Could you include your env? Perhaps I have not included a required library in my search path. 

Alan
Comment 8 Rene Ladan freebsd_committer freebsd_triage 2016-07-22 21:20:22 UTC
It looks more like you are missing an include path, not a library path.

Here is my env from the host running poudriere (which might rewrite it):
# env
TERM=screen
BLOCKSIZE=K
MAIL=/var/mail/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
SHELL=/bin/csh
HOME=/root
USER=root
HOSTTYPE=FreeBSD
VENDOR=amd
OSTYPE=FreeBSD
MACHTYPE=x86_64
SHLVL=1
PWD=/usr/obj/usr/src/repo
LOGNAME=root
GROUP=wheel
HOST=poudriere-vbox
REMOTEHOST=freenas.fritz.box
EDITOR=vi
PAGER=more

so nothing special here
Comment 9 Alan Polinsky 2016-07-24 16:52:37 UTC
My environment is similar to yours, so that is obviously not the issue. To the best of my knowledge, the machine is reasonably up to date so that is not the issue. I am not sure how to modify the 'include' path. This is what I find when I do a 'locate' on type_traits.h:

root@freebsd9:~ # locate type_traits.h
/usr/include/c++/4.2/bits/cpp_type_traits.h
/usr/include/c++/4.2/ext/type_traits.h      
/usr/local/include/google/protobuf/stubs/type_traits.h                
/usr/local/include/sigc++-2.0/sigc++/type_traits.h
/usr/local/lib/gcc48/include/c++/bits/cpp_type_traits.h
/usr/local/lib/gcc48/include/c++/ext/type_traits.h
/usr/local/llvm33/include/llvm/Support/type_traits.h
/usr/local/llvm35/include/llvm/Support/type_traits.h
/usr/local/llvm36/include/llvm/Support/type_traits.h
/usr/local/llvm38/include/llvm/Support/type_traits.h

Alan
Comment 10 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-01-18 22:18:08 UTC
FreeBSD 9.3 has passed its EoL date. Please upgrade to a supported release.

https://lists.freebsd.org/pipermail/freebsd-announce/2017-January/001779.html