Hello,

I have been struggling with this V8 build fail for a day or two now and any 
help on this would be much appreciated.

We use V8 version in our project.for a script process engine. It suddenly 
stopped working and build fails.

  CXX(target) 
/go/v8-3.28.71/out/native/obj.target/v8_snapshot/gen/experimental-libraries.o
  CXX(target) /go/v8-3.28.71/out/native/obj.target/v8_snapshot/geni/snapshot.o
  CXX(target) 
/go/v8-3.28.71/out/native/obj.target/v8_snapshot/src/snapshot-common.o
  AR(target) /go/v8-3.28.71/out/native/obj.target/tools/gyp/libv8_snapshot.a
  TOUCH /go/v8-3.28.71/out/native/obj.target/tools/gyp/v8.stamp
  CXX(target) /go/v8-3.28.71/out/native/obj.target/shell/samples/shell.o
  LINK(target) /go/v8-3.28.71/out/native/shell
  CXX(target) /go/v8-3.28.71/out/native/obj.target/process/samples/process.o
  LINK(target) /go/v8-3.28.71/out/native/process
  CXX(target) 
/go/v8-3.28.71/out/native/obj.target/lineprocessor/samples/lineprocessor.o
  LINK(target) /go/v8-3.28.71/out/native/lineprocessor
  ACTION src_d8_gyp_d8_js2c_target_d8_js2c 
/go/v8-3.28.71/out/native/obj/gen/d8-js.cc
  TOUCH /go/v8-3.28.71/out/native/obj.target/src/d8_js2c.stamp
  CXX(target) /go/v8-3.28.71/out/native/obj.target/d8/src/d8.o
  CXX(target) /go/v8-3.28.71/out/native/obj.target/d8/src/d8-posix.o
  CXX(target) /go/v8-3.28.71/out/native/obj.target/d8/src/d8-debug.o
  CXX(target) /go/v8-3.28.71/out/native/obj.target/d8/gen/d8-js.o
  LINK(target) /go/v8-3.28.71/out/native/d8
  TOUCH /go/v8-3.28.71/out/native/obj.target/testing/gtest_prod.stamp
  AR(target) /go/v8-3.28.71/out/native/obj.target/testing/libgtest.a
 [91mar: 
/go/v8-3.28.71/out/native/obj.target/gtest/testing/gtest/src/gtest-death-test.o:
 No such file or directory
 [0m [91mmake[1]: *** [/go/v8-3.28.71/out/native/obj.target/testing/libgtest.a] 
Error 1
 [0mmake[1]: Leaving directory `/go/v8-3.28.71/out'
 [91mmake: *** [native] Error 2
 [0m [91m+ V8_TMP_finish
 [0m [91m+ rm -rf /go/v8.tmp
 [0mThe command '/bin/sh -c /tmp/build.v8.sh' returned a non-zero code: 2
Build step 'Execute shell' marked build as failure
Archiving artifacts
Finished: FAILURE


Herewith, i am sharing my build.v8.sh and Docker file for your reference and 
any pointers on this would be helpful as we are not much familiar with the C++ 
GN way of code building here.


Thanks,

Mani

-- 
-- 
v8-users mailing list
v8-users@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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/045faaa3-f1e5-482d-9a58-aa3656e11a7b%40googlegroups.com.

Attachment: Dockerfile
Description: Binary data

#!/usr/bin/env bash

set -e -x -o pipefail

v8_pc=src/github.com/Runscope/script-processor/script-processor/v8/v8.pc

if [ -z "$WORKSPACE" ]
then
    WORKSPACE=$RUNSCOPE_HOME
    v8_pc=$RUNSCOPE_HOME/go/$v8_pc
else
    v8_pc=$WORKSPACE/$v8_pc
fi

if [ -n "$_SCRIPT_PROCESSOR_V8_PC" ]
then
  v8_pc=$_SCRIPT_PROCESSOR_V8_PC
fi

if [ -z "$WORKSPACE" ]
then
    cat <<_END_
*** $0: Aborting v8 build: neither \$WORKSPACE nor \$RUNSCOPE_HOME are set!
_END_
    exit 1
fi

VERSION=3.31.1
VERSION=3.28.71

BASE=$WORKSPACE/v8
BASE_VERSION=$BASE-$VERSION

CXXFLAGS="-Wno-unused-function"

if  go env | grep 'GOHOSTOS="darwin"'; then
	pushd /usr/local/lib
	if [ ! -e libgcc_s.10.5.dylib ]
	then
		sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib
	fi
	popd
fi

# We check if we're on El Capitan here (10.11) to see if we need to pass
# an extra flag to clang (via CXXFLAGS) because clang on El Capitan is more
# strict than previous versions
if command -v sw_vers
then
    productVersion=$(sw_vers -productVersion)
    if [[ $productVersion = 10.11.* ]]
    then
        CXXFLAGS="-Wno-inconsistent-missing-override -Wno-undefined-var-template"
    fi
fi

if command -v sw_vers
then
    productVersion=$(sw_vers -productVersion)
    if [[ $productVersion = 10.12.* ]]
    then
        CXXFLAGS="-Wno-inconsistent-missing-override -Wno-undefined-var-template"
    fi
fi

if command -v sw_vers
then
    productVersion=$(sw_vers -productVersion)
    if [[ $productVersion = 10.13.* ]]
    then
        CXXFLAGS="-Wno-inconsistent-missing-override -Wno-undefined-var-template"
    fi
fi

if [ ! -d $BASE_VERSION ]
then
    pushd $WORKSPACE

        V8_TMP=$WORKSPACE/v8.tmp

        if [ -e $V8_TMP ]
        then
            echo "*** $V8_TMP already exists; is another process already building v8? Aborting!"
            exit 1
        fi

        mkdir -p $V8_TMP

        function V8_TMP_finish {
            rm -rf $V8_TMP
        }
        trap V8_TMP_finish EXIT

        if [ ! -d depot_tools ]
        then
            git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
        fi
        export PATH=$WORKSPACE/depot_tools:$PATH

        pushd $V8_TMP

            fetch --nohooks v8

            pushd v8
                #git checkout branch-heads/$VERSION
		git pull origin $VERSION
                gclient sync
                git checkout $VERSION
            popd

        popd

        mv $V8_TMP/v8 $BASE_VERSION
        V8_TMP_finish

        pushd $BASE_VERSION
            # Build it
			pushd build
			        pwd
				ls -l
				# ./install-build-deps.sh
				git clone https://chromium.googlesource.com/external/gyp
			popd

	    cp /go/src/github.com/Runscope/script-processor/v8.h /go/v8-$VERSION/include/v8.h
	    # cp $WORKSPACE/src/github.com/Runscope/script-processor/v8.h $WORKSPACE/v8-$VERSION/include/v8.h
            CXXFLAGS="$CXXFLAGS" make i18nsupport=off native
        popd

    popd
fi

        cat <<_END_
# ° º ¤ ø . ¸ . ø ¤ º ° º ¤ ø
#
# If building v8 failed (because of a missing library), you
# can restart the build process by going into $BASE_VERSION and
# running: make i18nsupport=off native
#
# ° º ¤ ø . ¸ . ø ¤ º ° º ¤ ø
_END_

#librt='-lrt'
#start_group='-Wl,--start-group'
#end_group='-Wl,--end-group'

#libv8_base=$BASE/out/native/obj.target/tools/gyp/libv8_base.a
#libv8_libbase=$BASE/out/native/obj.target/tools/gyp/libv8_libbase.a
#libv8_snapshot=$BASE/out/native/obj.target/tools/gyp/libv8_snapshot.a

OUT_NATIVE="$BASE_VERSION/out/native"


libv8_base="`find $OUT_NATIVE -name 'libv8_base.a' | head -1`"
if [ ! -f $libv8_base ]; then
	echo >&2 "v8 build failed?"
	exit
fi

libv8_libbase="`find $OUT_NATIVE -name 'libv8_libbase.a' | head -1`"
if [ ! -f $libv8_libbase ]; then
	echo >&2 "v8 build failed?"
	exit
fi

libv8_snapshot=`find $OUT_NATIVE -name 'libv8_snapshot.a' | head -1`""
if [ ! -f $libv8_libsnapshot ]; then
	echo >&2 "v8 build failed?"
	exit
fi

# for Linux
librt=''
start_group=''
end_group=''
if go env | grep 'GOHOSTOS="linux"'; then
	librt='-lrt'
	start_group='-Wl,--start-group'
	end_group='-Wl,--end-group'
fi

# for Darwin
libstdcpp=''
if  go env | grep 'GOHOSTOS="darwin"'; then
	libstdcpp='-stdlib=libstdc++'
fi

cat <<_END_ > $v8_pc
Name: v8
Description: v8
Version: $VERSION
Cflags: $libstdcpp -I$BASE_VERSION/include
Libs: $libstdcpp $start_group $libv8_libbase $libv8_base $libv8_snapshot $end_group $librt
_END_

cat $v8_pc

Reply via email to