ninja compile error, pls help.

757 views
Skip to first unread message

Jian Zhu

unread,
Dec 15, 2015, 11:58:53 PM12/15/15
to Chromium-dev
Hi,all:
  I am a newbie to chromium. I want to do some test about the quic in chromium, so i first try to get and build the project code as said in following page:
  https://www.chromium.org/quic/playing-with-quic
  http://www.chromium.org/developers/how-tos/get-the-code
 
  when performing the step in second page:
"

$ ninja -C out/Default chrome

"
  some error occured. Some examples are as below:
  ../../third_party/pdfium/
fpdfsdk/src/pdfwindow/../../include/pdfwindow/../../../core/include/fpdfapi/../fxcrt/../../../third_party/base/numerics/safe_conversions.h:8:10: fatal error: 'limits' file not found 
  ../../third_party/pdfium/fpdfsdk/src/pdfwindow/../../../core/include/fxcrt/../../../third_party/base/numerics/safe_math_impl.h:10:10: fatal error: 'cmath' file not found

  The error seems to be due to that the system library file can't be found when using ninja building project.
  My os is ubuntu 12.04 LTS.  I try to upgrade my gcc from 4.6.2 to 5.2.0, the error is still there.
 
  I am so unfamiliar with ninja buld tool, can anyone kindly give me some help.
  Thanks~

Jian Zhu

unread,
Dec 16, 2015, 12:06:58 AM12/16/15
to Chromium-dev
appending some more outpup error information:
the error begins at the 34 file compiling with output as below:

[34/20884] CXX obj/base/process/process/kill_posix.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/prefs/pre
f_store.o.d -DBASE_PREFS_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DENABLE_M
DNS=1 -DENABLE_NOTIFICATIONS -DENABLE_PEPPER_CDMS -DENABLE_PLUGINS=1 -DENABLE_PRINTING=1 -DE
NABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DDONT_EMBED_BUILD_MET
ADATA -DUSE_UDEV -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUS
E_CAIRO=1 -DUSE_CLIPBOARD_AURAX11=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_GLIB=1 -DUSE_OPENSSL=
1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DENABLE_WEBRTC=1 -DENABLE_EXTENSIONS=1 -DENABLE_CONFIGURATI
ON_POLICY -DENABLE_TASK_MANAGER=1 -DENABLE_THEMES=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DEN
ABLE_SESSION_SERVICE=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS
=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_ON
E_CLICK_SIGNIN -DENABLE_HIDPI=1 -DENABLE_TOPCHROME_MD=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DENA
BLE_BACKGROUND=1 -DENABLE_PRE_SYNC_BACKUP -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BR
OWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIA
L_TESTING_ENABLED -DCR_CLANG_REVISION=245402-1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D
_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_DEBUG -DDYNAMIC_ANNOT
ATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -I../.. -Igen -I/usr/inc
lude/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fno-strict-aliasing --param=ssp-
buffer-size=4 -fstack-protector -m64 -march=x86-64 -funwind-tables -fPIC -pipe -pthread -B..
/../third_party/binutils/Linux_x64/Release/bin -fcolor-diagnostics -Wall -Wsign-compare -Wen
dif-labels -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowin
g -Wno-char-subscripts -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-in
ternal-declaration -Wno-reserved-user-defined-literal -Wno-inconsistent-missing-override -Wn
o-shift-negative-value -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-buil
d/Release+Asserts/lib/libFindBadConstructs.so -Xclang -plugin-arg-find-bad-constructs -Xclan
g check-templates -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-
conversion -O0 -g2 -gsplit-dwarf -fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-un
defined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11 -fno-rtti -fno-exce
ptions -c ../../base/prefs/pref_store.cc -o obj/base/prefs/pref_store.o
In file included from ../../base/prefs/pref_store.cc:5:
../../base/prefs/pref_store.h:8:10: fatal error: 'string' file not found
#include <string>

Ilya Sherman

unread,
Dec 16, 2015, 12:11:57 AM12/16/15
to everys...@gmail.com, Chromium-dev
Are your system library files in a non-standard location?

This information might not help, but:
(1) You can demystify a lot of what ninja is doing by viewing the out/Default/build.ninja file.
(2) If you haven't run it already, running ./build/install-build-deps.sh might help.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Jian Zhu

unread,
Dec 16, 2015, 12:26:17 AM12/16/15
to Chromium-dev, everys...@gmail.com
llya, thanks to your reply very much.
I have run ./build/install-build-deps.sh and it seems no error occurs with the output information:
No missing packages, and the packages are up-to-date.
Reading package lists... Done
Finding missing packages...
Packages required:  libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386 libfontconfig1:i386 libgconf-2-4:i386 libgl1-mesa-glx:i386 libglib2.0-0:i386 libgpm2:i386 libgtk2.0-0:i386 libncurses5:i386 libnss3:i386 libpango1.0-0:i386 libssl1.0.0:i386 libtinfo-dev:i386 libudev0:i386 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386 libxrandr2:i386 libxss1:i386 libxtst6:i386 linux-libc-dev:i386 ant apache2.2-bin appmenu-gtk autoconf bison cdbs cmake curl devscripts dpkg-dev elfutils fakeroot flex fonts-thai-tlwg g++ g++-4.6-multilib g++-arm-linux-gnueabihf g++-mingw-w64-i686 gawk git-core git-svn gperf intltool language-pack-da language-pack-fr language-pack-he language-pack-zh-hant lib32gcc1 lib32ncurses5-dev lib32stdc++6 lib32z1-dev libapache2-mod-php5 libasound2 libasound2-dev libatk1.0-0 libatk1.0-dbg libav-tools libbluetooth-dev libbrlapi-dev libbrlapi0.5 libbz2-1.0 libbz2-dev libc6 libc6-dbg libc6-dev-armhf-cross libc6-i386 libcairo2 libcairo2-dbg libcairo2-dev libcap-dev libcap2 libcups2 libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev libexif12 libexpat1 libfontconfig1 libfontconfig1-dbg libfreetype6 libgbm-dev libgconf2-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-0 libglib2.0-0-dbg libglib2.0-dev libglu1-mesa-dev libgnome-keyring-dev libgnome-keyring0 libgtk2.0-0 libgtk2.0-0-dbg libgtk2.0-dev libjpeg-dev libkrb5-dev libnspr4 libnspr4-dbg libnspr4-dev libnss3 libnss3-dbg libnss3-dev libpam0g libpam0g-dev libpango1.0-0 libpango1.0-0-dbg libpci-dev libpci3 libpcre3 libpcre3-dbg libpixman-1-0 libpixman-1-0-dbg libpng12-0 libpulse-dev libpulse0 libsctp-dev libspeechd-dev libspeechd2 libsqlite3-0 libsqlite3-0-dbg libsqlite3-dev libssl-dev libstdc++6 libstdc++6-4.6-dbg libtinfo-dev libtool libudev-dev libudev0 libwww-perl libx11-6 libx11-6-dbg libxau6 libxau6-dbg libxcb1 libxcb1-dbg libxcomposite1 libxcomposite1-dbg libxcursor1 libxcursor1-dbg libxdamage1 libxdamage1-dbg libxdmcp6 libxdmcp6-dbg libxext6 libxext6-dbg libxfixes3 libxfixes3-dbg libxi6 libxi6-dbg libxinerama1 libxinerama1-dbg libxkbcommon-dev libxrandr2 libxrandr2-dbg libxrender1 libxrender1-dbg libxslt1-dev libxss-dev libxt-dev libxtst-dev libxtst6 libxtst6-dbg linux-libc-dev-armhf-cross mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-crypto python-dev python-numpy python-opencv python-openssl python-psutil python-yaml realpath rpm ruby subversion texinfo ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho ttf-mscorefonts-installer wdiff xfonts-mathml xsltproc xutils-dev xvfb zip zlib1g zlib1g-dbg

My internet connection is using company proxy, So i can't run the command "gclient sync" successfully and i have to copy the chromium project code(~24G) from my partner.
I am not sure
running ./build/install-build-deps.sh successfully, Can you give me some method to check whether the script run successfully?

Ilya Sherman

unread,
Dec 16, 2015, 12:47:58 AM12/16/15
to everys...@gmail.com, Chromium-dev
That looks like ./build/install-build-deps.sh is indeed running successfully.

You could try running these commands, inspired by [1], to figure out where clang is looking for your header file includes:
$ touch a.c
$ third_party/llvm-build/Release+Asserts/bin/clang -v -E a.c

On my system, the <string> header is found in /usr/include.

Jian Zhu

unread,
Dec 16, 2015, 6:38:49 AM12/16/15
to Chromium-dev, everys...@gmail.com
IIya, thank you so much.
The error is due to my gcc compiler and the internet proxy in my company. After I reinstall the latest gcc and do some configuration, I successfully finish the compling.
However I came across another question when i test quic as below page:
http://www.chromium.org/quic/playing-with-quic

After i wget "https://www.example.org", i can't find the content asked to manually edited as below:
  • remove "Transfer-Encoding: chunked"
  • remove "Alternate-Protocol: ..."  (the example config calls for port 6121 below)
  • add X-Original-Url: https://www.example.org/

if i don't manually edith index.html, some failure happened when performing quic test. In the quic_client side, it outputs as below:

./out/Default/quic_client --host=127.0.0.1 --port=6121 https://www.example.org/
Connected to 127.0.0.1:6121
Request:
headers:
 :authority: www.example.org
 :method: GET
 :path: /
 :scheme: https
body:

Response:
headers: HTTP/1.1 500 OK
status: 500
content-length: 3

body: bad
Request failed (500).


In the quic_server side, it outputs as below:
./out/Default/quic_server --quic_in_memory_cache_dir=/tmp/quic-data/www.example.org --certificate_file=net/tools/quic/certs/out/leaf_cert.pem  --key_file=net/tools/quic/certs/out/leaf_cert.pkcs8
[1216/052728:WARNING:quic_framer.cc(593)] Unable to process packet header.  Stopping parsing.

Can you kindly give some more help on the test of quic?
Reply all
Reply to author
Forward
0 new messages