Bug 12876 - nodejs fails to build when host-icu has been built before
Summary: nodejs fails to build when host-icu has been built before
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2020.02
Hardware: All Linux
: P5 critical
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 12921 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-10 14:51 UTC by yogesh kumar sharma
Modified: 2020-08-08 22:18 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yogesh kumar sharma 2020-05-10 14:51:11 UTC
while make on buildroot following Error is coming. here is log

  /home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/bin/ccache /usr/bin/g++ -o /home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/tzgnames.o ../deps/icu-small/source/i18n/tzgnames.cpp '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DU_I18N_IMPLEMENTATION=1' '-DU_ATTRIBUTE_DEPRECATED=' '-D_CRT_SECURE_NO_DEPRECATE=' '-DU_STATIC_IMPLEMENTATION=1' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include/openssl -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-deprecated-declarations -Wno-strict-aliasing -O3 -fno-omit-frame-pointer -fno-exceptions -std=gnu++1y -frtti -MMD -MF /home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/.deps//home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/tzgnames.o.d.raw -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include -O2 -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include -c
  /home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/bin/ccache /usr/bin/g++ -o /home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/rbt_pars.o ../deps/icu-small/source/i18n/rbt_pars.cpp '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D__STDC_FORMAT_MACROS' '-DU_I18N_IMPLEMENTATION=1' '-DU_ATTRIBUTE_DEPRECATED=' '-D_CRT_SECURE_NO_DEPRECATE=' '-DU_STATIC_IMPLEMENTATION=1' '-DUCONFIG_NO_SERVICE=1' '-DU_ENABLE_DYLOAD=0' '-DU_HAVE_STD_STRING=1' '-DUCONFIG_NO_BREAK_ITERATION=0' -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include/openssl -I../deps/icu-small/source/i18n -I../deps/icu-small/source/common  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -Wno-deprecated-declarations -Wno-strict-aliasing -O3 -fno-omit-frame-pointer -fno-exceptions -std=gnu++1y -frtti -MMD -MF /home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/.deps//home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/rbt_pars.o.d.raw -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include -O2 -I/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/host/include -c
In file included from ../deps/icu-small/source/i18n/rbt_pars.cpp:43:0:
../deps/icu-small/source/common/putilimp.h:226:20: error: missing binary operator before token "("
 #elif __has_builtin(__c11_atomic_load) && \
                    ^
In file included from ../deps/icu-small/source/common/umutex.h:31:0,
                 from ../deps/icu-small/source/common/mutex.h:27,
                 from ../deps/icu-small/source/i18n/tzgnames.cpp:26:
../deps/icu-small/source/common/putilimp.h:226:20: error: missing binary operator before token "("
 #elif __has_builtin(__c11_atomic_load) && \
                    ^
tools/icu/icui18n.target.mk:337: recipe for target '/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/rbt_pars.o' failed
make[2]: *** [/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/rbt_pars.o] Error 1
make[2]: *** Waiting for unfinished jobs....
tools/icu/icui18n.target.mk:337: recipe for target '/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/tzgnames.o' failed
make[2]: *** [/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/out/Release/obj.target/icui18n/deps/icu-small/source/i18n/tzgnames.o] Error 1
Makefile:101: recipe for target 'node' failed
make[1]: *** [node] Error 2
make[1]: Leaving directory '/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1'
package/pkg-generic.mk:266: recipe for target '/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/.stamp_built' failed
make: *** [/home/linuxguru/Desktop/buildroot/buildroot-2020.02/output/build/host-nodejs-12.16.1/.stamp_built] Error 2


uname -a
Linux ptinstitute 5.3.0-51-generic #44~18.04.2-Ubuntu SMP Thu Apr 23 14:27:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Comment 1 Fabrice Fontaine 2020-05-10 15:23:47 UTC
I think that the following patch should fix your build failure:
https://patchwork.ozlabs.org/project/buildroot/patch/20200218031521.32988-1-james.hilliard1@gmail.com

However, it was not yet merged.
Can you confirm that this patch fix your issue?

Best Regards,

Fabrice
Comment 2 yogesh kumar sharma 2020-05-10 17:12:37 UTC
(In reply to Fabrice Fontaine from comment #1)
it not solve the issue. 
what i did was i opened file nodejs.mk and added the line suggested like this 

(cd $(@D); \
                $(HOST_CONFIGURE_OPTS) \
                PATH=$(@D)/bin:$(BR_PATH) \
                PYTHON=$(HOST_DIR)/bin/python2 \
                $(HOST_DIR)/bin/python2 ./configure \
                --prefix=$(HOST_DIR) \
                --without-snapshot \
                --without-dtrace \
                --without-etw \
                --shared-openssl \
                --shared-openssl-includes=$(HOST_DIR)/include/openssl \
                --shared-openssl-libpath=$(HOST_DIR)/lib \
                --shared-zlib \
                --shared-zlib-includes=$(HOST_ZLIB_SRCDIR) \
                --shared-zlib-libpath=$(HOST_DIR)/lib \
                --no-cross-compiling \
                --with-intl=small-icu \

is that ok? or i have to add through patch. Actual i am not aware of how to add patch in buildroot.
Comment 3 Markus Zehnder 2020-05-18 17:38:02 UTC
(In reply to Fabrice Fontaine from comment #1)
Thanks Fabrice!
I had the exact same issue with Buildroot 2020.02.2 and the linked patch solved it.
Please include it in the next release.

Best regards,
Markus
Comment 4 yogesh kumar sharma 2020-05-19 16:37:01 UTC
(In reply to Markus Zehnder from comment #3)
can you suggest the steps you followed to solve or you can share some link where i get the procedure to apply patch. 

how to apply this patch to buildroot?
Thanks in advance
Comment 5 Peter Seiderer 2020-05-19 19:07:40 UTC
(In reply to yogesh kumar sharma from comment #4)

    $ wget https://buildroot.org/downloads/buildroot-2020.02.2.tar.bz2
    $ wget -O v5-1-1-package-nodejs-Use-zlib-headers-from-HOST_ZLIB_SRCDIR-for-host-nodejs.patch https://patchwork.ozlabs.org/project/buildroot/patch/20200218031521.32988-1-james.hilliard1@gmail.com/mbox/
    $ tar -xvjf buildroot-2020.02.2.tar.bz2
    $ cd buildroot-2020.02.2
    $ patch -p 1 < ../v5-1-1-package-nodejs-Use-zlib-headers-from-HOST_ZLIB_SRCDIR-for-host-nodejs.patch

Do not forget to do an complete re-build of at least the host-nodejs package, best by removing the existing host-nodejs build directory, e.g.:

    $ rm -rf output/build/host-nodejs-12.16.1

or a global re-build

     $ make clean && make
Comment 6 Thomas Petazzoni 2020-05-20 10:30:48 UTC
*** Bug 12921 has been marked as a duplicate of this bug. ***