SAP Commerce Cloud 2105 Installation on MAC OS Build Error: The command failed with exit code 127 - failed-installation

I'm trying to setup SAP Commerce Cloud v2105 project in my MAC OS machine for Spartacus development.
I'm using this guide: https://sap.github.io/spartacus-docs/installing-sap-commerce-cloud-2105/
So far I have installed the pre-requisites:
JDK 11 => soon changed it to SAP Machine JDK 11 based on this: SAP Commerce Cloud with Spartacus installation error
NodeJS version 12
Angular CLI version 10
Setup JAVA_HOME
Everything is going well until i got this error while running the command:
./install.sh -r cx-for-spa initialize
Error
> Task :recipes:cx-for-spa:buildSystem FAILED
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/programmer/Documents/projects/commercloud/installer/recipes/cx-for-spa/build.gradle' line: 604
* What went wrong:
Execution failed for task ':recipes:cx-for-spa:buildSystem'.
> external process returned non-zero exit code, command: [sh, -c, export PLATFORM_HOME="/Users/programmer/Documents/projects/commercloud/hybris/bin/platform" && export ANT_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" && export ANT_HOME="/Users/programmer/Documents/projects/commercloud/hybris/bin/platform/apache-ant" && chmod +x "/Users/programmer/Documents/projects/commercloud/hybris/bin/platform/apache-ant/bin/ant" && export PATH="$ANT_HOME/bin:$PATH" && ant clean all]
Stacktrace
[exec]
[exec]
[exec] Running "pnpm install" in /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp
[exec]
[exec]
[exec] The command failed:
[exec] /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm install --no-prefer-frozen-lockfile --strict-peer-dependencies
[exec] ERROR: Error: The command failed with exit code 127
[exec]
[exec] Trying again (attempt #2)...
[exec]
[exec] Deleting the "node_modules" folder
[exec]
[exec] The command failed:
[exec] /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm install --no-prefer-frozen-lockfile --strict-peer-dependencies
[exec] ERROR: Error: The command failed with exit code 127
[exec]
[exec] Trying again (attempt #3)...
[exec]
[exec] Deleting the "node_modules" folder
[exec]
[exec] The command failed:
[exec] /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm install --no-prefer-frozen-lockfile --strict-peer-dependencies
[exec] ERROR: Error: The command failed with exit code 127
[exec]
[exec] /bin/sh: /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm: No such file or directory
[exec] /bin/sh: /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm: No such file or directory
[exec] /bin/sh: /Users/programmer/Documents/projects/commercloud/hybris/bin/modules/smartedit/smartedittools/common/temp/pnpm-local/node_modules/.bin/pnpm: No such file or directory
[exec] Giving up after 3 attempts
[exec]
[exec]
[exec] ERROR: The command failed with exit code 127
[exec]
What I tried to far
Solution #1 - removed NodeJS and NPM and redid everything
Reference: https://answers.sap.com/questions/12762725/hybris-63-sapaomsomb2bb2c-ant-clean-all-error.html?childToView=12794099 - DIDN'T WORK
Solution #2 - manually removed node_modules on the pnpm directory, but only shortcut found and no node_modules folder found
Solution #3 - reinstalled Angular CLI - DIDN'T WORK
Solution #4 - This solution => SAP Commerce Cloud with Spartacus installation error - DIDN'T WORK
Solution #5 - commented out all extensions related to smartedit on the build.gradle file - DIDN'T WORK
Solution #6 - Uninstalled Visual Studio code as it might cause conflict - DIDN'T WORK
Solution #7 - Commented the build parallel flag
Reference: Build failed.Step 2: Build and initialize the new recipe. Initialize the system - DIDN'T WORK
Just asking here, there might be people out there who experienced the same issues.

Try this:
Change the pnpm version to 5.18.10 on "bin\modules\smartedit\smartedittools\common\config\rush.tpl.json";
Delete .pnpm-store under your Windows $HOME;
Trigger commerce build

The problem in your setup is that you are missing some pre-reqs for SmartEdit extensions.
Try running ant npminstall to enable full build
(https://help.sap.com/docs/SAP_COMMERCE/9d346683b0084da2938be8a285c0c27a/6d55d5fba206425b9acecda9f2311483.html?version=1905&locale=en-US)
But, I suggest you to not include smartedit extensions in local env.
I am using, also, a SAP Commerce 2105 with Spartacus, and I am injecting Smartedit extensions only at cloud envs.
I think SmartEdit is really heavy to include at local envs.

Related

Why is dh_autoreconf_clean patching ltmain.sh?

.. and why does it break my packaging build?
I am trying to build .deb packages for the latest git version of VLC.
Namely, I'm taking the "/debian" directory from my distros (ubuntu 15.10) source package for VLC (2.2.1) and copying/applying this to the latest git pull of VLC (which I am able to compile without problems).
When I run "debuild -b -uc -us" (works for VLC 2.2.1) for the git version, I get:
dpkg-buildpackage: host architecture amd64
fakeroot debian/rules clean
dh clean --parallel --with autoreconf
dh_autoreconf_clean
patching file ./autotools/ltmain.sh
Hunk #1 FAILED at 5800.
Hunk #2 FAILED at 6168.
2 out of 2 hunks FAILED -- saving rejects to file ./autotools /ltmain.sh.rej
dh_autoreconf_clean: patch -R -f --no-backup-if-mismatch -i /usr/share/dh-autoreconf/ltmain-as-needed.diff ./autotools/ltmain.sh
returned exit code 1
debian/rules:246: recipe for target 'clean' failed
make: *** [clean] Error 25
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
debuild: fatal error at line 1374:
dpkg-buildpackage -rfakeroot -D -us -uc -b failed
Building debian packages is nasty and the information is a bit scarce.
Any idea where such an error message might come from and why?
I had a similar problem, and was unable to find anything on Google except this question.
I deleted two files present in the Debian file I used, autoreconf.after and autoreconf.before.

Error while running libcurl7.43.0 make in CentOS 5.11

Before I was using libculr-7.42.1 but due to CVE-2015-3236 and CVE-2015-3237, I plan to upgrade to libculr-7.43.0 which fixes the above mentioned vulnerabilities.
After upgrade It was building fine(make) in my dev-vm which is running in CentOS-6.4. But when I started building in QA mechanic which is running CentOS-5.11 giving following exception. Is there anything to to address for lower version of CentOS.
[exec] vtls/openssl.c: In function 'ssl_msg_type': [exec]
vtls/openssl.c:1430: error: 'SSL3_MT_NEWSESSION_TICKET' undeclared
(first use in this function) [exec] vtls/openssl.c:1430: error: (Each
undeclared identifier is reported only once [exec]
vtls/openssl.c:1430: error: for each function it appears in.) [exec]
make[1]: * [vtls/libcurl_la-openssl.lo] Error 1 [exec] make: *
[install-recursive] Error 1
................................................ [exec] Result: 2
Any suggestion is highly appreciable. Thanks in advance.
Looks like there were few naming conflict with OpenSSL old version(< ~ 0.9.8f). Regarding this I raised an issue and they fixed it.
More here https://github.com/bagder/curl/issues/323#issuecomment-114492795
EDIT:
It got fixed in curl-7.44.0 (released on 12-Aug-15)

Building Mono from Source (not git) Fails with mcs: Command not found

Building mono from downloaded source on an Android device. Ran make get-monolite-latest and still get the following errors
make[2]: Entering directory `/bld/mono/mono-4.0.0/runtime'
if test -w /bld/mono/mono-4.0.0/mcs; then :; else chmod -R +w /bld/mono/mono-4.0.0/mcs; fi
cd /bld/mono/mono-4.0.0/mcs && make --no-print-directory -s NO_DIR_CHECK=1 PROFILES='binary_reference_assemblies net_4_5 xbuild_12 xbuild_14 monodroid ' CC='gcc --sysroot=/usr/gcc-4.9.2/sysroot' all-profiles
make[6]: mcs: Command not found
make[6]: *** [build/deps/basic-profile-check.exe] Error 127
*** The compiler 'mcs' doesn't appear to be usable.
*** Trying the 'monolite' directory.
Illegal instruction
make[8]: *** [build/deps/basic-profile-check.exe] Error 132
*** The contents of your 'monolite' directory may be out-of-date
*** You may want to try 'make get-monolite-latest'
I've found what I think is the mcs executable in runtime/_tmpdir/bin, but copying it to where the build seems to be looking for it doesn't help.
How do I resolve this?
As the error message suggests: You may want to try the command 'make get-monolite-latest'
You need a certain mono version for building mono 4, I think it was >= 3.8 or so. The monolite should help out in this case.

Building avahi for use in the Oracle jvm (error: jni.h not found)

This is a follow up to the following question: Compile errors when defining a macro to convert a case class instance into a map and back
The answer there resolved my initial problem -- I was not installing the dependencies. However, now I have a problem because ant clean all is still not able to find jni.h. This is possibly because the instructions say to install open jdk 6. Is there a workaround for Oracle jdk 7. Here is the error that I'm getting:
myUser#ubuntu:~/Downloads/avahi4j-0.1$ ant clean all
Buildfile: /home/myUser/Downloads/avahi4j-0.1/build.xml
clean:
[exec] make: Entering directory `/home/myUser/Downloads/avahi4j-0.1/src'
[exec] rm -f avahi4j_Client.o avahi4j_EntryGroup.o avahi4j_Avahi4JConstants.o thread-watch.o avahi4j_ServiceBrowser.o avahi4j_ServiceResolver.o avahi4j_RecordBrowser.o libavahi4j.so ./*~
[exec] make: Leaving directory `/home/myUser/Downloads/avahi4j-0.1/src'
[delete] Deleting directory /home/myUser/Downloads/avahi4j-0.1/classes
init:
[mkdir] Created dir: /home/myUser/Downloads/avahi4j-0.1/classes
jnilib:
[exec] make: Entering directory `/home/myUser/Downloads/avahi4j-0.1/src'
[exec] gcc -I. -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux/ -I/usr/include/avahi-common -O3 -fPIC -DVER_MAJ="0" -DVER_MIN="1" -c -o avahi4j_Client.o avahi4j_Client.c
[exec] make: Leaving directory `/home/myUser/Downloads/avahi4j-0.1/src'
[exec] avahi4j_Client.c:23:17: fatal error: jni.h: No such file or directory
[exec] #include <jni.h>
[exec] ^
[exec] compilation terminated.
[exec] make: *** [avahi4j_Client.o] Error 1
BUILD FAILED
/home/myUser/Downloads/avahi4j-0.1/build.xml:75: exec returned: 2
Total time: 0 seconds
I found the problem. In my case, I needed to make the following change to src/Makefile:
# It must be a JDK, not a JRE !!!
#JDK_HOME := /usr/lib/jvm/java-6-sun
JDK_HOME := /usr/lib/jvm/java-7-oracle
#JDK_HOME := /usr/lib/j2sdk1.6-sun

Cannot build avahi4j: avahi4j_Client.c:18:32: fatal error: avahi-common/error.h: No such file or directory

Per the title of the post I'm trying to build avahi4j, but very quickly run into a wall after downloading: https://code.google.com/p/avahi4j/downloads/detail?name=avahi4j-0.1.tar.gz&can=2&q=
After extracting, and then executing ant clean all from within the avahi4j-0.1 directory, I receive the following error:
ant clean all
Buildfile: /home/myUser/Downloads/avahi4j-0.1/build.xml
clean:
[exec] make: Entering directory `/home/myUser/Downloads/avahi4j-0.1/src'
[exec] rm -f avahi4j_Client.o avahi4j_EntryGroup.o avahi4j_Avahi4JConstants.o thread-watch.o avahi4j_ServiceBrowser.o avahi4j_ServiceResolver.o avahi4j_RecordBrowser.o libavahi4j.so ./*~
[exec] make: Leaving directory `/home/myUser/Downloads/avahi4j-0.1/src'
[delete] Deleting directory /home/myUser/Downloads/avahi4j-0.1/classes
init:
[mkdir] Created dir: /home/myUser/Downloads/avahi4j-0.1/classes
jnilib:
[exec] make: Entering directory `/home/myUser/Downloads/avahi4j-0.1/src'
[exec] gcc -I. -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux/ -I/usr/include/avahi-common -O3 -fPIC -DVER_MAJ="0" -DVER_MIN="1" -c -o avahi4j_Client.o avahi4j_Client.c
[exec] make: Leaving directory `/home/myUser/Downloads/avahi4j-0.1/src'
[exec] avahi4j_Client.c:18:32: fatal error: avahi-common/error.h: No such file or directory
[exec] #include <avahi-common/error.h>
[exec] ^
[exec] compilation terminated.
[exec] make: *** [avahi4j_Client.o] Error 1
BUILD FAILED
/home/myUser/Downloads/avahi4j-0.1/build.xml:75: exec returned: 2
Total time: 0 seconds
Does anyone know what might be the problem?
EDIT: for completeness, I run the following commands, which produces the error:
wget https://avahi4j.googlecode.com/files/avahi4j-0.1.tar.gz
tar xzvf avahi4j-0.1.tar.gz
cd avahi4j-0.1/
ant
ant clean all
Moreover, running find . -name error.h produces no results.
The libavahi-devel package installs the missing components.
To resolve the issues presented by the question install the libavahi-devel package.