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

Enable npm install from source - #2288

Merged
lucaswoj merged 1 commit into
masterfrom
npm-build
Sep 15, 2015
Merged

lucaswoj merged 1 commit into
masterfrom
npm-build

Conversation

@lucaswoj

@lucaswoj lucaswoj commented Sep 9, 2015

Copy link
Copy Markdown
Contributor

Comment thread configure

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a better way to do this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe check for local mason as a git repo (submodule) if there's an earlier snippet somewhere initializing the mason submodule?

if [ -d "`pwd`/.mason" && -s "`pwd`/.mason/.git" ]; then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this line: export MASON_DIR="$(dirname $(readlink $(which mason)))". Are these gymnastics really necessary to use a global mason install?

@lucaswoj lucaswoj changed the title Enable npm install from source Enable npm install from source [DO NOT MERGE] Sep 9, 2015
@lucaswoj

lucaswoj commented Sep 9, 2015

Copy link
Copy Markdown
Contributor Author

This is ready to go from my perspective but we're waiting until after the next iOS release to merge this because of the geojsonvt version bump.

@1ec5 1ec5 added the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Sep 9, 2015
@mikemorris

Copy link
Copy Markdown
Contributor

With iOS and Android released, this should be 🏁 to merge @lucaswoj!

@mikemorris mikemorris added the Node.js node-mapbox-gl-native label Sep 15, 2015
@incanus

incanus commented Sep 15, 2015

Copy link
Copy Markdown
Contributor

Correction: Android is release-branched but not yet out; however master is clear to merge as long as you aren’t anticipating any critical fixes very soon there that build upon this merge and that also apply to Android (which seems doubtful).

@mikemorris mikemorris changed the title Enable npm install from source [DO NOT MERGE] Enable npm install from source Sep 15, 2015
@mikemorris mikemorris removed the ⚠️ DO NOT MERGE Work in progress, proof of concept, or on hold label Sep 15, 2015
 - Allow node bindings to be built if git submodules cannot be checked out
 - Made geojsonvt a mason package instead of a git submodule
 - Use globally installed mason if it cannot be checked out via git submodules
@lucaswoj

Copy link
Copy Markdown
Contributor Author

Squashed into one commit, will merge when Travis gives the ✅

lucaswoj pushed a commit that referenced this pull request Sep 15, 2015
Enable npm install from source
@lucaswoj
lucaswoj merged commit 20d9526 into master Sep 15, 2015
@bleege

bleege commented Sep 16, 2015

Copy link
Copy Markdown
Contributor

This broke Android builds. Running make android now results in...

deps/run_gyp geojsonvt.gyp -Iconfig.gypi --depth=. -Goutput_dir=. --generator-output=./build -f make
make -C build install
  CXX(target) Release/obj.target/geojsonvt/src/geojsonvt.o
  CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_clip.o
  CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_convert.o
  CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_simplify.o
  CXX(target) Release/obj.target/geojsonvt/src/geojsonvt_tile.o
  LIBTOOL-STATIC Release/libgeojsonvt.a
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt.o is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_clip.o is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_convert.o is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_simplify.o is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: Release/obj.target/geojsonvt/src/geojsonvt_tile.o is not an object file (not allowed in a library)
make[3]: *** [Release/libgeojsonvt.a] Error 1
make[2]: *** [install] Error 2
make[1]: *** [config/android-arm-v7.gypi] Error 2
make: *** [android-lib] Error 2

@mikemorris

Copy link
Copy Markdown
Contributor

@bleege Did you cherry-pick this into the release branch and have problems or is this locally for you on master? Travis was green on Android builds when we merged this...

@bleege

bleege commented Sep 16, 2015

Copy link
Copy Markdown
Contributor

@mikemorris Nope. I just switched to https://github.com/mapbox/mapbox-gl-native/tree/2018-shared-sqlite first and saw that it failed. I then nuked my entire local copy and re-cloned, ran the git submodule init and git submodule update commands, and then ran make clean and finally make android. Same issue.

@bleege

bleege commented Sep 16, 2015

Copy link
Copy Markdown
Contributor

To help test, I did a partial revert in the https://github.com/mapbox/mapbox-gl-native/tree/2018-shared-sqlite branch to get things compile so that I can test #2018. I'll wait for the SF folks to come on line later today before merging this into master as they'll probably have a way to fix things properly using the new way.

I should also clarify, I ❤️ the direction of this to get away from git submodules and use Mason to roll dependencies. I'm constantly stomping on git submodules so am looking forward to getting this working.

@jfirebaugh
jfirebaugh deleted the npm-build branch September 16, 2015 18:01
AndwareSsj pushed a commit to AndwareSsj/mapbox-gl-native that referenced this pull request Nov 6, 2015
Enable npm install from source
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Node.js node-mapbox-gl-native

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix npm install from source

6 participants