Closed prajyot1708 closed 1 year ago
Hi @prajyot1708.
It's not clear to me whether you're running npm install directly on your machine or the docker image. If it's directly on your machine, you need to install the SDK for your MacOs operating system (Intel or ARM based). The process would be similar to installing for Linux, but would require the SDK for MacOs.
sudo mkdir -p /usr/local/sap/nwrfcsdk
sudo cp assets/mac/SAP_SDK_FOR_MACOS.zip /usr/local/sap/nwrfcsdk
sudo cp assets/mac/paths_fix.sh /usr/local/sap/nwrfcsdk
cd /usr/local/sap/nwrfcsdk
sudo unzip SAP_SDK_FOR_MACOS.zip
sudo rm SAP_SDK_FOR_MACOS.zip
sudo mv nwrfcsdk/* .
sudo rm -rf nwrfcsdk/
vi ~/.zshrc
# OR vi ~/.bash_profile
export SAPNWRFC_HOME="/usr/local/sap/nwrfcsdk"
File content (paths_fix.sh):
# SPDX-FileCopyrightText: 2013 SAP SE Srdjan Boskovic <srdjan.boskovic@sap.com>
#
# SPDX-License-Identifier: Apache-2.0
#!/bin/bash
if [ -z "$SAPNWRFC_HOME" ]; then
echo "SAPNWRFC_HOME env variable not set. Should point to SAP NWRFC SDK library root"
exit 1
fi
# run from sap nwrfc sdk root folder
#
# lib folder fix
#
cd lib
RPATH="$SAPNWRFC_HOME/lib"
for filename in *.dylib; do
# LC_RPATH
sudo install_name_tool -add_rpath $RPATH $filename
# LC_ID_DYLIB
sudo install_name_tool -id @rpath/$filename $filename
done
# LC_LOAD_DYLIB
sudo install_name_tool -change @loader_path/libicuuc.50.dylib @rpath/libicuuc.50.dylib libicui18n.50.dylib
sudo install_name_tool -change @loader_path/libicudata.50.dylib @rpath/libicudata.50.dylib libicui18n.50.dylib
sudo install_name_tool -change @loader_path/libicudata.50.dylib @rpath/libicudata.50.dylib libicuuc.50.dylib
cd ..
#
# bin folder fix
#
cd bin
for filename in *; do
sudo chmod +x $filename
# LC_RPATH
sudo install_name_tool -add_rpath $RPATH $filename
# LC_ID_DYLIB
sudo install_name_tool -id @rpath/$filename $filename
# LC_LOAD_DYLIB
sudo install_name_tool -change @loader_path/libsapnwrfc.dylib @rpath/libsapnwrfc.dylib $filename
sudo install_name_tool -change @loader_path/libsapucum.dylib @rpath/libsapucum.dylib $filename
done
sudo install_name_tool -change @loader_path/libsapucum.dylib @rpath/libsapucum.dylib ./startrfc
cd ..
Hi @prajyot1708. Did you get ahead? Do you need any help?
Hi @alvarolimajr I m running in docker container:
Below is the dockerfile need to use for MAC M1:
FROM --platform=linux/amd64 ubuntu:22.04
RUN apt update && apt install -y curl \ unzip
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt install -y nodejs
RUN mkdir -p /usr/local/sap
COPY nwrfc750P_11-70002752.zip /tmp
WORKDIR /app
COPY nwrfcsdk.conf /etc/ld.so.conf.d/nwrfcsdk.conf RUN unzip -o /tmp/nwrfc750P_11-70002752.zip -d /usr/local/sap ENV SAPNWRFC_HOME /usr/local/sap/nwrfcsdk
Hi Team and @alvarolimajr ,
I am using below dockerfile. FROM ubuntu:22.04
RUN apt update && apt install -y curl \ unzip
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt install -y nodejs
RUN mkdir -p /usr/local/sap
Here you need to copy your SAP SDK (zip file)
COPY nwrfc750P_11-70002752.zip /tmp
The content file to nwrfcsdk.conf
START CONTENT
include nwrfcsdk
/usr/local/sap/nwrfcsdk/lib
END CONTENT
COPY nwrfcsdk.conf /etc/ld.so.conf.d/
RUN unzip -o /tmp/nwrfc750P_11-70002752.zip -d /usr/local/sap
ENV SAPNWRFC_HOME /usr/local/sap/nwrfcsdk
RUN ldconfig
And I am facing below issue on mac.