Repository navigation
[Bug] nodejs on FreeBSD may need to be patched #900
Description
Activity
That definitely seems way out of scope for
nvm- using a slightly different make binary is one thing, but applying patches isn't something I'm comfortable with. Perhaps you could convince node itself to fix it?- addedinstalling nodeIssues with installing node/io.js versions.Issues with installing node/io.js versions.feature requestsI want a new feature in nvm!I want a new feature in nvm!
on Nov 9, 2015 I sent a issue ticket here nodejs/node#3716 hope we can find a good way to figure it out!
BTW, clang LLVM is really fast! 👍
Compilation time spent by clang LLVM:
real 1m49.474s
user 14m51.253s
sys 2m0.750sCompilation time spent by clang GCC:
real 2m23.481s
user 20m24.823s
sys 2m54.503s@PeterDaveHello as a separate issue/PR, could you look into using the faster approach on all compilations, via feature detection? If we can speed up source compilation, "build from source" tests might not time out, and then I could support building everything from source :-D
@ljharb what do you mean all compilations actually? All versions of nodejs? Maybe we can open another issue ticket to discuss with that, I'll be happy to help in my capacity.
BTW,
nvm install 0.10can build and install node with success:~/.nvm/src/node-v0.10.40 $ ./out/Release/node --version v0.10.40nvm install 0.8,nvm install 0.6can build node with success but failed on installing npm:Installing npm... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 193 100 193 0 0 218 0 --:--:-- --:--:-- --:--:-- 218 100 6263 100 6263 0 0 1931 0 0:00:03 0:00:03 --:--:-- 3532 tar=/usr/bin/tar version: bsdtar 3.1.2 - libarchive 3.1.2 fetching: { curl: (3) [globbing] unmatched brace in column 1 cd: /tmp/npm.56710/*: No such file or directory It failedand v0.11 has similar problem as v0.12
- changed the title
[-][Bug] nodejs on FreeBSD(10.1) need to be patched[/-][+][Bug] nodejs on FreeBSD need to be patched[/+]on Nov 9, 2015 @PeterDaveHello yes - if clang LLVM is that much faster than gcc, then we should build with that whenever possible on every platform for every version
Okay, #902
- changed the title
[-][Bug] nodejs on FreeBSD need to be patched[/-][+][Bug] nodejs on FreeBSD may need to be patched[/+]on Mar 25, 2017 - added a commit that references this issue
on Mar 28, 2017 - added a commit that references this issue
on Mar 30, 2017 - added a commit that references this issue
on Apr 9, 2018 Just want to pop in here and mention that this affects NetBSD, too.
At the moment, trying to
nvm install stableon NetBSD fails because it is usingmakeinstead ofgmake, but even if/when it is added to the NVM_OS options and the right make is invoked, we'd still also need the patch from pkgsrc.
This may be a hard work, I hope not.
FreeBSD version via
uname -a:nvm version:
I found that I cannot do
$ nvm install 0.12on FreeBSD 10.1 amd64 with success, and the error messages came from compiler, both clang LLVM or gcc will have the same problem, and this is not nvm's problem but nvm looks to support FreeBSD in the codes:https://github.com/creationix/nvm/blob/master/nvm.sh#L936
https://github.com/creationix/nvm/blob/master/nvm.sh#L1230-L1233
So I think we should do something to work around.
The error message:
I remember that I installed it from ports and pkg with success before, so I copied the patch from FreeBSD's ports system
(https://www.freshports.org/www/node/files/patch-deps_v8_src_base_platform_platform-posix.cc)
Apply the patches:
After the patches applied, there is no problem anymore!