Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Build fixes from MSYS2/MinGW-w64 #8294

Closed
wants to merge 5 commits into from

Conversation

mingwandroid
Copy link

I work on the MSYS2 project and node.js is one of our packages. I'd like upstream my patches and would like to have a discussion about this set of changes first.

@mingwandroid
Copy link
Author

Could anyone take a look at this?

@trevnorris
Copy link

/cc @tjfontaine @orangemocha

@orangemocha
Copy link
Contributor

One issue about INTPTR. The rest LGTM, though someone who is more familiar might want to review the makefile changes msys2-contrib@58c2446

@refack
Copy link
Contributor

refack commented Sep 22, 2014

@mingwandroid I luv ya!!!
👍

@refack
Copy link
Contributor

refack commented Sep 22, 2014

@mingwandroid trying, but building openssl fails.
is there a HOWTO somewhere?

@mingwandroid
Copy link
Author

Good point on $(EXEEXT). I also need to check that one on Linux and OSX.

@mingwandroid
Copy link
Author

@refack This isn't all the patches needed for MSYS2/MinGW-w64, there'll be follow up pull requests once I get these ones in and the next ones into a pushable state. The (current) full set can be found at:

https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-nodejs

As for openssl, we use pacman from Arch Linux, so binary dependencies for openssl are used, though you can compile any dependency yourself using makepkg/makepkg-mingw.

HOWTO build node from source for and on MSYS2/MinGW-w64:

Install MSYS2 from http://msys2.github.io from
http://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-x86_64-20140910.exe
.. in a short path, all ASCII, no spaces (the default should be good)

Run the MSYS2 shell (from the installer or msys2_shell.bat)

Update packages database:

pacman -Sy

Install git, patch and MinGW-w64 native compilers:

pacman -S git patch mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain

Clone MSYS2's MinGW-w64 PKGBUILDs repository:

git clone https://github.com/Alexpux/MINGW-packages
cd MINGW-packages/mingw-w64-nodejs

Build the packages.

makepkg-mingw -sLf

Install them:

pacman -U mingw-w64-*.xz

Use:

/mingw64/bin/node

or:

/mingw64/bin/npm

(you can avoid needing to specify the full paths if you run mingw32_shell.bat or mingw64_shell.bat)

@refack
Copy link
Contributor

refack commented Sep 22, 2014

@mingwandroid I'm trying to build HEAD, and a few things have changed since 0.10 :)
I'll dig in the patches.

# Determine EXEEXT
EXEEXT=$(shell $(PYTHON) -c "import sysconfig; print(sysconfig.get_config_var('EXE'))")

NODE ?= ./node$(EXEEXT)

Choose a reason for hiding this comment

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

Want to double check. Will EXEEXT contain the dot (e.g. .exe, not just exe)?

@mingwandroid
Copy link
Author

It will contain the dot yes.

@trevnorris
Copy link

@tjfontaine @indutny Mind taking a look at the build stuff? LGTM but want your input as well.

@mingwandroid
Copy link
Author

Any more on this guys?

@indutny
Copy link
Member

indutny commented Oct 9, 2014

LGTM

@indutny
Copy link
Member

indutny commented Oct 9, 2014

Thank you, landed in node-forward/node@6f94b3d, node-forward/node@eccb101

@mingwandroid
Copy link
Author

Many thanks.

@mingwandroid
Copy link
Author

Out of interest, should my merge requests be done to node-forward/node in future?

@jasnell
Copy link
Member

jasnell commented Aug 13, 2015

Closing since it appears this already landed in io.js. We'll pick it up there. cc @joyent/node-tsc

@jasnell jasnell closed this Aug 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants