Repository navigation
node5: unable to build with '--with-intl=system-icu' #3801
Description
Activity
- addedbuildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
on Nov 12, 2015 /cc @nodejs/intl
- addedi18n-apiIssues and PRs related to Node.js internationalization support.Issues and PRs related to Node.js internationalization support.
on Nov 12, 2015 @jelmd can you tell me more about your environment? I tried both
masterandv5.xon ubuntu 14.04 ( afterapt-get install libicu-dev) and could not reproduce this.system-icujust callspkg-config. Can you trypkg-config icu-i18n --cflags --libsand report what it produces vs. what you would expect for ICU?Im Building the stuff on solaris 11. The output is
-I/export/scratch/build/root4build/usr/include -L/export/scratch/build/root4build/usr/lib/amd64 -licui18n -licuuc -licudataNot sure, why this is broken - build works with --with-intl=none. I do not know, what "pseudo-intelligence" is going on there. I don't even know, why this strange tool does such strange things. Isn't there a debug switch, where one can see, what strange thing it is trying todo/expects?
@jelmd what about
--with-intl=small-icu --download=all? does that work?How is ICU installed on this platform? I notice it says
host_arch a32but the library hasamd64in its name - are you cross compiling?I do not know, what "pseudo-intelligence" is going on there. I don't even know, why this strange tool does such strange things.
I don't follow you, sorry. No pseudo-intelligence here, but if there's a human-induced bug let's try to squash it.
Never tried with small-icu, because IMHO it doesn't make much sense - just implies more maintenance nightmares.
The ICU libs and includes are put as needed into DESTDIR=/export/scratch/build/root4build/ .
Pseudo-intelligence in the sense of black box, which does something, but no one can tell what, why, how and what the expected results are. E.g. I have no clue, what "hostarch ia32" implies or how this stuff deduces this value. As almost all modern *x, Solaris is able to execute 32 as well as 64bit binaries - nothing special here.
Finally it makes me a little bit nervous, that no-one seems to be able to explain "gyp: Dependency '/export/scratch/build/node-v5.0.0/tools/icu/icu-system.gyp:icui18n#host' not found while trying to load target /export/scratch/build/node-v5.0.0/deps/v8/tools/gyp/v8.gyp:v8_base#host". Another incarnation of autotools but this time even without any logs?
Never tried with small-icu,
Could you try it for comparison?
What is your exact
configurecommand line? I thinksystem-icumay not work for cross compilation.
edit we may need to support<something>-pkg-configas in hereCan you try replacing
tools/icu/icu-system.gypwith the following:{ 'targets': [ { 'target_name': 'icuuc', 'type': 'none', 'toolsets': [ 'host', 'target' ], }, { 'target_name': 'icui18n', 'type': 'none', 'toolsets': [ 'host', 'target' ], }, ], }As to your answer to how to debug
gyp, I am not sure. It was a process of trial and error for me.Yepp, haven't found any useful stuff wrt. gyp either - everything was superficial stuff, only.
Anyway, tried small-icu: beside that it takes "hours" to download it, it finally works.
After that I tried with your icu-system.gyp from above as well and heureka: it works like a charm :-) !
Thank you very much!!!
Shouldn't take hours— it's sourceforge mirrors. Anyway— welcome!
I'll open a PR.
- added a commit that references this issue
on Nov 17, 2015 - added a commit that references this issue
on Nov 30, 2015 - added a commit that references this issue
on Dec 4, 2015 - added 2 commits that reference this issue
on Dec 17, 2015 I tried to build node v20.10.0 with
system-icuon windows. But it seems not supported.> .\vcbuild.bat x64 ltcg system-icu Looking for Python Python found in C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python311\\python.exe Python 3.11.2 Looking for NASM Looking for Visual Studio 2022 Found MSVS version 17.0 configure --with-ltcg --with-intl=system-icu --dest-cpu=x64 Node.js configure: Found Python 3.11.2... Package icu-i18n was not found in the pkg-config search path. Perhaps you should add the directory containing `icu-i18n.pc' to the PKG_CONFIG_PATH environment variable Package 'icu-i18n', required by 'virtual:world', not found ERROR: Could not load pkg-config data for "icu-i18n". See above errors or the README.md. Failed to create vc project files.I tried to build node v20.10.0 with
system-icuon windows. But it seems not supported.> .\vcbuild.bat x64 ltcg system-icu Looking for Python Python found in C:\Users\Liu.D.H\AppData\Local\Programs\Python\Python311\\python.exe Python 3.11.2 Looking for NASM Looking for Visual Studio 2022 Found MSVS version 17.0 configure --with-ltcg --with-intl=system-icu --dest-cpu=x64 Node.js configure: Found Python 3.11.2... Package icu-i18n was not found in the pkg-config search path. Perhaps you should add the directory containing `icu-i18n.pc' to the PKG_CONFIG_PATH environment variable Package 'icu-i18n', required by 'virtual:world', not found ERROR: Could not load pkg-config data for "icu-i18n". See above errors or the README.md. Failed to create vc project files.Do you have the file icu-i18n.pc ? Is it on PKG_CONFIG_PATH ?
I am using windows, pkg-config and libicu-dev is not available.
I found windows 10/11 is bundled with a ms version of icu. But I don't know how to config the path of ic in config script.
I think you should file a new issue and link it here.
I am using windows, pkg-config and libicu-dev is not available.
I found windows 10/11 is bundled with a ms version of icu. But I don't know how to config the path of icu in config script.
The headers to compile against that ICU must be available. macOS also has an ICU but does not provide headers.
system-icu is there for the situation where your system provides an ICU that you can compile against. This is the case with Linux for example, and it is also the case on macos when you install icu via brew.sh.
I found this but I have not used it:
It looks like the files have different names.
node.js will expect the header files to be named the same way as with usual ICU.
perhaps if you create a custom .pc file you can make the build happen this way.
- added a commit that references this issue
on Jul 27, 2026
When I try to build node5 '--with-intl=system-icu' it fails with an obscure message shown below - any hints how to fix it?