Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Allow customization of GYP_DEFINES#229

Closed
teradiot wants to merge 1 commit intorubyjs:masterfrom
teradiot:GYP_DEFINES
Closed

Allow customization of GYP_DEFINES#229
teradiot wants to merge 1 commit intorubyjs:masterfrom
teradiot:GYP_DEFINES

Conversation

@teradiot
Copy link
Copy Markdown

@teradiot teradiot commented Dec 7, 2016

No description provided.

@ignisf
Copy link
Copy Markdown
Collaborator

ignisf commented Jan 7, 2017

Hello,

Sorry for taking so much time to get to your PR. What is the behaviour you're looking for? Having the GYP_DEFINES environment variable be taken into account when building libv8?

@ignisf ignisf self-assigned this Jan 7, 2017
@ignisf ignisf self-requested a review January 7, 2017 00:52
@teradiot
Copy link
Copy Markdown
Author

teradiot commented Jan 7, 2017

Sorry for not explaining enough.

I encountered the following error when I built libv8 from source on Alpine Linux.

Building v8 with env CXX=g\+\+ LINK=g\+\+ /usr/bin/make x64.release i18nsupport=off werror=no GYP_DEFINES="v8_use_external_startup_data=0 linux_use_bundled_gold=0 clang=0"
PYTHONPATH="/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/tools/generate_shim_headers:/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/gypfiles::/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/tools/gyp/pylib:" \
GYP_GENERATORS=make \
tools/gyp/gyp --generator-output="out" gypfiles/all.gyp \
              -Igypfiles/standalone.gypi --depth=. \
              -Dv8_target_arch=x64 \
               -Dtarget_arch=x64 \
               \
              -S.x64.release  -Dv8_enable_backtrace=1 -Dwerror='' -Dv8_enable_i18n_support=0 -Darm_fpu=default -Darm_float_abi=default
make[1]: Entering directory '/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/out'
  CXX(target) /usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o
g++: error trying to exec '/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/third_party/binutils/Linux_x64/Release/bin/as': execv: No such file or directory
src/v8_base.target.x64.release.mk:555: recipe for target '/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o' failed
make[1]: *** [/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o] Error 1
make[1]: Leaving directory '/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/out'
Makefile:314: recipe for target 'x64.release' failed
make: *** [x64.release] Error 2
/usr/local/bundle/gems/libv8-5.3.332.38.3/ext/libv8/location.rb:41:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/usr/local/bundle/gems/libv8-5.3.332.38.3/vendor/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
        from /usr/local/bundle/gems/libv8-5.3.332.38.3/ext/libv8/location.rb:40:in `each'
        from /usr/local/bundle/gems/libv8-5.3.332.38.3/ext/libv8/location.rb:40:in `verify_installation!'
        from /usr/local/bundle/gems/libv8-5.3.332.38.3/ext/libv8/location.rb:26:in `install!'
        from extconf.rb:7:in `<main>'
ERROR:  Error installing libv8-5.3.332.38.3.gem:
        ERROR: Failed to build gem native extension.

Details are here.
Https://gist.github.com/teradiot/d76ded67ad915b11d9ff125100cc0cee/a6aa33e0c25d66e7bf659998276ed0a9f72ff3b6

I solved this problem by setting GYP_DEFINES.

export GYP_DEFINES="linux_use_bundled_binutils=0 linux_use_bundled_gold=0"

https://gist.github.com/teradiot/d76ded67ad915b11d9ff125100cc0cee/revisions

So I need to be able to set GYP_DEFINES when building libv8.

ignisf added a commit that referenced this pull request Feb 27, 2017
@ignisf ignisf closed this in b2e833b Feb 27, 2017
ignisf added a commit that referenced this pull request Feb 27, 2017
ignisf added a commit that referenced this pull request Feb 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants