Problems building on ubuntu x86

780 views
Skip to first unread message

David Xanatos

unread,
Mar 12, 2015, 9:04:52 AM3/12/15
to v8-u...@googlegroups.com
i have problems building the v8 engine on ubuntu x86

i get strange errors

david@ubuntu:~/test/v8$ make ia32.release library=shared
PYTHONPATH="/home/david/test/v8/tools/generate_shim_headers:/home/david/test/v8/build::/home/david/test/v8/build/gyp/pylib:" \
    GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=ia32 \
                   \
                   \
                  -S.ia32.release  -Dcomponent=shared_library -Dv8_enable_backtrace=1 -Darm_fpu=default -Darm_float_abi=default
make[1]: Entering directory `/home/david/test/v8/out'
  CC(target) /home/david/test/v8/out/ia32.release/obj.target/icudata/third_party/icu/linux/icudtl_dat.o
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 1: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: @8: not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 1: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: cannot open j
                                                                                                                                                            q��zi� d� v��GX.� 0@ y 2 0*p!: No such file
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 2: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: B� � : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 1: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: ELF : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 1: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: �: not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 2: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: Q ! �MQ�k�P@��PD @2�� ��@� : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 3: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: @ ! �@$��� : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 1: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: � : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 1: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: �� � �@: not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 3: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: � : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 8: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 9: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: A@� R � : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 1: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: �� : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 11: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: @D�E�� a    � L @ @�
n : not found
/home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: 12: /home/david/test/v8/third_party/llvm-build/Release+Asserts/bin/clang: Syntax error: "(" unexpected
make[1]: *** [/home/david/test/v8/out/ia32.release/obj.target/icudata/third_party/icu/linux/icudtl_dat.o] Error 2
make[1]: Leaving directory `/home/david/test/v8/out'
make: *** [ia32.release] Error 2
david@ubuntu:~/test/v8$



on ubuntu x64 all works as it should

whats wrong here?

Jochen Eisinger

unread,
Mar 13, 2015, 4:40:21 AM3/13/15
to v8-u...@googlegroups.com
The clang binary included with v8 is a 64bit binary.

If you want to compile on a 32bit host, you have to provide your own compiler (by specifying CC, CXX, CPP, and LINK variables to make)

best
-jochen

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jakob Kummerow

unread,
Mar 13, 2015, 5:41:00 AM3/13/15
to v8-u...@googlegroups.com
make ia32.release GYPFLAGS=-Dclang=0 should be enough to fall back to the system toolchain. (Maybe we should expose that as a Makefile option... but then it's rarely needed.)

Vedran Jukic

unread,
Mar 29, 2015, 6:27:51 AM3/29/15
to v8-u...@googlegroups.com
It is mandatory when you need to croscompile for ARM on 32 bit system where CXX and LINK are already pointing to the ARM compiler. So making the right 32bit clang executable for CXX(host) is mandatory - at least for those who lost faith not being able to compile for ARM on the 32 bit linux.

Gary Bi

unread,
Jun 23, 2015, 11:16:24 PM6/23/15
to v8-u...@googlegroups.com
Hi Jakob,

Using the command you mentioned make ia32.release GYPFLAGS=-Dclang=0, I got this error, any idea? Thanks!

user@ubuntu:~/webrtc-checkout/src/chromium/src/v8$ make ia32.release GYPFLAGS=-Dclang=0
make: *** No rule to make target `third_party/icu/icu.gypi', needed by `out/Makefile.ia32.release'.  Stop.
user@ubuntu:~/webrtc-checkout/src/chromium/src/v8$ vi Makefile
user@ubuntu:~/webrtc-checkout/src/chromium/src/v8$ make ia32.release GYPFLAGS=-Dclang=0
make: *** No rule to make target `third_party/icu/icu.gypi', needed by `out/Makefile.ia32.release'.  Stop.

Louis Santillan

unread,
Jun 24, 2015, 12:47:36 AM6/24/15
to v8-u...@googlegroups.com
You appear to not have an icu/i18n library installed. You can disable
icu in your build by adding `i18nsupport=off` to you `make` line or
you can install an icu lib. See [0] for more info.

[0] https://code.google.com/p/v8-wiki/wiki/I18NSupport

Jakob Kummerow

unread,
Jun 24, 2015, 4:10:33 AM6/24/15
to v8-u...@googlegroups.com
On Wed, Jun 24, 2015 at 5:16 AM, Gary Bi <w13...@gmail.com> wrote:
Hi Jakob,

Using the command you mentioned make ia32.release GYPFLAGS=-Dclang=0, I got this error, any idea? Thanks!

user@ubuntu:~/webrtc-checkout/src/chromium/src/v8$ make ia32.release GYPFLAGS=-Dclang=0
make: *** No rule to make target `third_party/icu/icu.gypi', needed by `out/Makefile.ia32.release'.  Stop.

Looks like you're trying to build standalone V8 inside a Chromium checkout. That won't work, because third-party dependencies will be where the Chromium build expects them rather than where the standalone V8 build expects them. You can probably work around it by manually copying things (at least icu, maybe more), but that's going to be brittle because you'll miss out on automatic updates. Not sure whether symlinks would work.
Or you could just get a standalone V8 checkout. If you have depot_tools installed, it's as easy as "fetch v8" (check our wiki page for details).

Jakob Kummerow

unread,
Jun 24, 2015, 4:11:27 AM6/24/15
to v8-u...@googlegroups.com
On Wed, Jun 24, 2015 at 6:47 AM, Louis Santillan <lpsa...@gmail.com> wrote:
You appear to not have an icu/i18n library installed. 

The V8 build doesn't require icu to be "installed", it just requires a proper checkout.

Gary Bi

unread,
Jun 24, 2015, 6:31:12 AM6/24/15
to v8-u...@googlegroups.com

Hi Jakob,
I fetched the v8 codes into my home /home/user/v8, then I copy it to chromium sub-folder, when running the command: 

make ia32.release  GYPFLAGS=-Dclang=0

I got a lot of compiling errors, it seems they are related to C++ template. I also tries install_build_deps.sh, still same errors.

Any new thoughts? Thanks!

make[1]: Entering directory `/home/user/webrtc-checkout/src/chromium/src/v8/out'
  CXX(target) /home/user/webrtc-checkout/src/chromium/src/v8/out/ia32.release/obj.target/v8_base/src/accessors.o
In file included from .././src/v8.h:29:0,
                 from ../src/accessors.cc:5:
.././include/v8.h:335:1: error: expected unqualified-id before ‘using’
.././include/v8.h:467:1: error: expected unqualified-id before ‘using’
.././include/v8.h:498:48: error: ‘Handle’ does not name a type
.././include/v8.h:498:48: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
.././include/v8.h:498:54: error: expected ‘,’ or ‘...’ before ‘<’ token
.././include/v8.h:519:54: error: ‘Handle’ does not name a type
.././include/v8.h:519:54: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
.././include/v8.h:519:60: error: expected ‘,’ or ‘...’ before ‘<’ token
.././include/v8.h:532:54: error: ‘Handle’ does not name a type
.././include/v8.h:532:54: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
.././include/v8.h:532:60: error: expected ‘,’ or ‘...’ before ‘<’ token
.././include/v8.h: In member function ‘bool v8::PersistentBase<T>::operator==(int) const’:
.././include/v8.h:521:65: error: ‘that’ was not declared in this scope
.././include/v8.h: In member function ‘bool v8::PersistentBase<T>::operator!=(int) const’:
.././include/v8.h:533:24: error: ‘that’ was not declared in this scope
.././include/v8.h: At global scope:
.././include/v8.h:699:61: error: ‘Handle’ has not been declared
.././include/v8.h:699:67: error: expected ‘,’ or ‘...’ before ‘<’ token
.././include/v8.h: In constructor ‘v8::Persistent<T, M>::Persistent(v8::Isolate*, int)’:

Jakob Kummerow

unread,
Jun 24, 2015, 7:25:00 AM6/24/15
to v8-u...@googlegroups.com
On Wed, Jun 24, 2015 at 12:31 PM, Gary Bi <w13...@gmail.com> wrote:
then I copy it to chromium sub-folder

Why?

Essentially, you have two options:
(1) Follow the instructions at https://code.google.com/p/v8-wiki/wiki/UsingGit and https://code.google.com/p/v8-wiki/wiki/BuildingWithGYP (notice how neither of them mentions Chromium checkouts), and get help when something doesn't work (which is very unlikely, because those workflows are tested).
(2) Do something else, and if that doesn't work, figure it out yourself.
Reply all
Reply to author
Forward
0 new messages