Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agw): Upgrade ASN library to the new version #15369

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bazel/asn1c.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def cc_asn1_library(
"""
gen_name = name + "_genrule"

flags = "-pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-example"
flags = "-pdu=all -fcompound-names -fno-include-deps -no-gen-example"

# Taken from https://github.com/magma/magma/blob/14c1cf643a61d576b3d24642e17ed3911d19210d/lte/gateway/c/core/oai/tasks/s1ap/CMakeLists.txt#L35
# The original PR (PR2707) doesn't give an explanation on why this is necessary.
Expand Down
2 changes: 1 addition & 1 deletion lte/gateway/c/core/oai/tasks/ngap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if( ${ASN1_SOURCE_DIR} IS_NEWER_THAN ${ngap_generate_code_done_flag})

#Create NGAP_PDU structure without pointer references
execute_process(
COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}"
COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -fno-include-deps -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}"
RESULT_VARIABLE ret
)
if (NOT ${ret} STREQUAL 0)
Expand Down
2 changes: 1 addition & 1 deletion lte/gateway/c/core/oai/tasks/s1ap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ set(ASN1_ERR_FILTER "2> >(grep -v \"Parameterized type\" | grep -v \"Compiled \"
if (${ASN1_SOURCE_DIR} IS_NEWER_THAN ${s1ap_generate_code_done_flag})
file(REMOVE ${GENERATED_FULL_DIR}/${ASN1C_PREFIX}*.c ${GENERATED_FULL_DIR}/${ASN1C_PREFIX}*.h)
execute_process(
COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -gen-PER -no-gen-example -fno-include-deps -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}"
COMMAND bash "-c" "asn1c -pdu=all -fcompound-names -no-gen-example -fno-include-deps -D ${GENERATED_FULL_DIR} ${ASN1_SOURCE_DIR} ${ASN1_ERR_FILTER}"
RESULT_VARIABLE ret
)
if (NOT ${ret} STREQUAL 0)
Expand Down
2 changes: 1 addition & 1 deletion lte/gateway/c/core/oai/tasks/s1ap/generate_asn1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cd $1
shift

ASNC1=$(which asn1c)
${ASNC1:-asn1c} -gen-PER -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample
${ASNC1:-asn1c} -fcompound-names $* 2>&1 | grep -v -- '->' | grep -v '^Compiled' |grep -v sample

awk '
BEGIN {
Expand Down
6 changes: 3 additions & 3 deletions lte/gateway/docker/mme/Dockerfile.rhel8
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ RUN git clone --recurse-submodules -b v1.15.0 https://github.com/grpc/grpc && \
wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz && \
git clone https://liblfds.org/git/liblfds && \
git clone https://gitea.osmocom.org/cellular-infrastructure/libgtpnl && \
git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
git clone https://github.com/mouse07410/asn1c.git && \
git clone https://github.com/OPENAIRINTERFACE/opencord.org.freeDiameter.git freediameter && \
git clone https://github.com/nlohmann/json.git

Expand Down Expand Up @@ -275,8 +275,8 @@ RUN cd libgtpnl && \

##### asn1c
RUN cd asn1c && \
# Moved git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
git checkout f12568d617dbf48497588f8e227d70388fa217c9 && \
# Moved git clone https://github.com/mouse07410/asn1c.git && \
git checkout ebed802 && \
autoreconf -iv && \
./configure && \
make -j`nproc` && \
Expand Down
5 changes: 3 additions & 2 deletions lte/gateway/docker/mme/Dockerfile.ubuntu18.04
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ RUN git clone --recurse-submodules -b v1.15.0 https://github.com/grpc/grpc && \
git clone https://liblfds.org/git/liblfds && \
git clone https://gitea.osmocom.org/cellular-infrastructure/libgtpnl && \
git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
git clone https://github.com/mouse07410/asn1c.git && \
git clone https://github.com/OPENAIRINTERFACE/opencord.org.freeDiameter.git freediameter && \
git clone https://github.com/nlohmann/json.git

Expand Down Expand Up @@ -207,8 +208,8 @@ RUN cd libgtpnl && \

##### asn1c
RUN cd asn1c && \
# Moved git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
git checkout f12568d617dbf48497588f8e227d70388fa217c9 && \
# Moved git clone https://github.com/mouse07410/asn1c.git && \
git checkout ebed802 && \
autoreconf -iv && \
./configure && \
make -j`nproc` && \
Expand Down
6 changes: 3 additions & 3 deletions third_party/build/bin/asn1c_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ set -e
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
source "${SCRIPT_DIR}"/../lib/util.sh

COMMIT_DATE=20190423
COMMIT_DATE=20221118
# index of the commit from a particular date, start from 0
COMMIT_INDEX=0
COMMIT=f12568d6
COMMIT=ebed802
# 0~ makes the version compatible with real version numbers
# 0~20160721+c3~r43c4a295 < 0~20160721+c5~r43c4a295 < 0~20160722+c0~r43c4a295 < 0.1
ITERATION=0
Expand Down Expand Up @@ -64,7 +64,7 @@ if [ -d ${WORK_DIR} ]; then
fi
mkdir ${WORK_DIR}
cd ${WORK_DIR}
git clone https://gitlab.eurecom.fr/oai/asn1c.git
git clone https://github.com/mouse07410/asn1c.git
cd asn1c
git checkout ${COMMIT} .

Expand Down
Loading