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 Build Issues #14

Merged
merged 11 commits into from
Aug 12, 2024
96 changes: 76 additions & 20 deletions .github/workflows/matrix.yml

Large diffs are not rendered by default.

22 changes: 13 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
/settings.sh

/MPC
/ACE_TAO
/ACE_wrappers
/OpenDDS
/MPC

/android-ndk-*
/*-toolchain
/jdk
/xerces_source
/iconv_source
/settings.sh
/openssl_source
/ACE_wrappers
/ACE+TAO-2.2a_with_latest_patches.tar.gz
/secdeps_prefix
/commandlinetools-*
/android-sdk

/Python-*
/openssl-*
/libiconv-*
/xerces-c-*
/secdeps_prefix
/*_source
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ machine.
<!-- This part is generated by matrix.py -->
`M` = [`doc_group_master`](https://github.com/DOCGroup/ACE_TAO)
`6` = [`doc_group_ace6_tao2`](https://github.com/DOCGroup/ACE_TAO/tree/ace6tao2)
| | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| r23b | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` |
| r22b | `M` | - | - | - | - | - | - | - | - | - | - | - | - | `M` |
| r20b | `M` | - | - | - | - | - | - | - | - | - | - | - | `M` | - |
| r19c | `M`,`6` | - | - | - | - | - | - | - | - | - | - | `M`,`6` | - | - |
| r18b | `M`,`6` | - | - | - | - | - | - | - | - | - | - | `M`,`6` | - | - |
| | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| r23b | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` | `M`,`6` |
| r22b | `M` | - | - | - | - | - | - | - | - | - | - | - | `M` |
| r20b | `M` | - | - | - | - | - | - | - | - | - | - | `M` | - |
| r19c | `M`,`6` | - | - | - | - | - | - | - | - | - | `M`,`6` | - | - |
| r18b | `M`,`6` | - | - | - | - | - | - | - | - | - | `M`,`6` | - | - |
| r12b | `6` | - | - | - | - | - | - | `6` | - | - | - | - | - |
<!-- END MATRIX -->

### Modifying the Matrix
Expand Down
65 changes: 65 additions & 0 deletions assert_ndk_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/usr/bin/env bash

set -o pipefail
set -o nounset

source "known_apis.sh"

failed=false

ndks=()
if [ -z "${ndk+x}" ]
then
ndks=(${known_ndks_ndk_only[@]})
else
if ! [[ ${known_ndks_ndk_only[@]} =~ "${ndk}" ]]
then
echo "$ndk is invalid !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
exit 0
fi
ndks=($ndk)
fi

archs=()
if [ -z "${arch+x}" ]
then
arches=(${known_archs[@]})
else
arches=($arch)
fi

for ndk in ${ndks[@]}
do
dir="android-ndk-$ndk"
if [ -d $dir ]
then
for arch in ${arches[@]}
do
echo "$ndk-$arch ======================================================================"
known_apis_name="known_apis_${ndk}_${arch}"
declare -n known_apis=$known_apis_name
this_failed=false
for api in ${known_apis[@]}
do
ndk=$ndk arch=$arch api=$api bash assert_ndk_files_for.sh
if [ $? -ne 0 ]
then
this_failed=true
failed=true
fi
done
if ! $this_failed
then
echo "OK"
fi
done
else
echo "$dir not present !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
fi

done

if $failed
then
exit 1
fi
21 changes: 21 additions & 0 deletions assert_ndk_files_for.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
source setenv.sh

failed=false
for var in android_cc android_cxx android_ld android_cpp_stdlib
do
file=${!var}
if [ ! -x "$file" ]
then
if ! $failed
then
echo $api ----------------------------------------------------------------------
failed=true
fi
echo -e "Missing $var=\e[31m$file\e[0m"
fi
done

if $failed
then
exit 1
fi
1 change: 1 addition & 0 deletions build_openssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ source setenv.sh
source make.sh

export PATH="$android_toolchain_bin:$PATH"
export ANDROID_NDK_ROOT="${OPENDDS_ANDROID_NDK}"

cd openssl_source
./Configure no-tests no-shared android-$arch -D__ANDROID_API__=$api --prefix=$SSL_ROOT
Expand Down
14 changes: 14 additions & 0 deletions build_python2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -o pipefail
set -o errexit
set -o nounset

echo build_python2.sh =========================================================

source setenv.sh
source make.sh

cd python2_source
./configure
$make
10 changes: 9 additions & 1 deletion build_xerces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ then
popd
fi

extra_configure_opts=()

if [ ! -z "${force_cpp_std+x}" ]
then
extra_configure_opts+=("-DCMAKE_CXX_STANDARD=$force_cpp_std")
fi

pushd xerces_source
cmake \
"-DCMAKE_INSTALL_PREFIX=$XERCESCROOT" \
"-DCMAKE_TOOLCHAIN_FILE=$OPENDDS_ANDROID_NDK/build/cmake/android.toolchain.cmake" \
"-DANDROID_ABI=$abi" "-DANDROID_PLATFORM=android-$api" \
"-DANDROID_CPP_FEATURES=rtti exceptions"
"-DANDROID_CPP_FEATURES=rtti exceptions" \
"${extra_configure_opts[@]}"
$make
mkdir -p $XERCESCROOT
make install
Expand Down
20 changes: 13 additions & 7 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,24 @@ fi

if [ $ndk_major_rev -lt 16 ]
then
extra_configure_flags+=("--macros=__NDK_MINOR__:=$ndk_minor_rev" "--macros=__NDK_MAJOR__:=$ndk_major_rev")
extra_configure_flags+=(
"--macros=__NDK_MINOR__:=$ndk_minor_rev"
"--macros=__NDK_MAJOR__:=$ndk_major_rev"
# platform_android.GNU should be defining this automatically, but that
# doesn't seem to be working...
'--configh=#define ACE_ANDROID_NDK_MISSING_NDK_VERSION_H'
)
fi
if [ $ndk_major_rev -lt 15 ]
then
extra_configure_flags+=("--macros=android_force_clang:=0")
fi

if [ ! -z "${force_cpp_std+x}" ]
then
extra_configure_flags+=("--std=$force_cpp_std")
fi

if ! $use_toolchain
then
extra_configure_flags+=(
Expand All @@ -55,16 +66,11 @@ pushd $workspace/OpenDDS > /dev/null
--tao=$TAO_ROOT \
--tests \
--no-inline \
--mpcopts "-workers $logical_cores" \
--mpc:workers $logical_cores \
--macros=ANDROID_ABI:=$abi \
"${extra_configure_flags[@]}"
popd > /dev/null

# Avoid Deprecated POSIX Functions in ACE that OpenDDS Doesn't Use
echo '#define ACE_DISABLE_MKTEMP' >> "$ace_target/ace/config.h"
echo '#define ACE_DISABLE_TEMPNAM' >> "$ace_target/ace/config.h"
echo '#define ACE_LACKS_READDIR_R' >> "$ace_target/ace/config.h"

if $build_ace_tests
then
pushd $ace_target/tests > /dev/null
Expand Down
41 changes: 41 additions & 0 deletions get_python2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

set -o pipefail
set -o errexit
set -o nounset

echo get_python2.sh ===========================================================

source setenv.sh

function get {
if [ ! -d "$ourname" ]
then
if [ ! \( -f $tarname -o -L $tarname \) ]
then
if [ -f ../$tarname -o -L ../$tarname ]
then
ln -s "../$tarname" "$tarname"
elif [ -f ../../$tarname -o -L ../../$tarname ]
then
ln -s "../../$tarname" "$tarname"
else
download_file "$url"
fi
fi

if ! ${JUST_CACHE_SOURCES:-false}
then
tar -xzf "$tarname"
mv "$basename" "$ourname"
rm -f "$tarname"
fi
fi
}

version="2.7.18"
basename="Python-$version"
tarname="$basename.tgz"
url="https://www.python.org/ftp/python/$version/$tarname"
ourname="python2_source"
get
9 changes: 7 additions & 2 deletions get_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@ if $need_toolchain && [ ! -d $toolchain_name ]
then
echo "Generating Standalone Toolchain"
py=
if command -v python2
if [ -x python2_source/python ]
then
py=python2
py=python2_source/python
else
if command -v python2
then
py=python2
fi
fi
$py $OPENDDS_ANDROID_NDK/build/tools/make_standalone_toolchain.py \
--arch $arch --api $api --install-dir $toolchain_name
Expand Down
41 changes: 41 additions & 0 deletions known_apis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# BEGIN MATRIX
# This part is generated by matrix.py
known_archs=('arm' 'arm64' 'x86' 'x86_64')
known_ndks=('r12b' 'r18b' 'r19c' 'r20b' 'r21e' 'r22b' 'r23b')
known_ndks_ndk_only=('r19c' 'r20b' 'r21e' 'r22b' 'r23b')
known_apis_r12b=('16' '17' '18' '19' '21' '22' '23' '24')
known_apis_r12b_arm=('16' '17' '18' '19' '21' '22' '23' '24')
known_apis_r12b_arm64=('24' '21' '22' '23')
known_apis_r12b_x86=('16' '17' '18' '19' '21' '22' '23' '24')
known_apis_r12b_x86_64=('24' '21' '22' '23')
known_apis_r18b=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28')
known_apis_r18b_arm=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28')
known_apis_r18b_arm64=('21' '22' '23' '24' '26' '27' '28')
known_apis_r18b_x86=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28')
known_apis_r18b_x86_64=('21' '22' '23' '24' '26' '27' '28')
known_apis_r19c=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28')
known_apis_r19c_arm=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28')
known_apis_r19c_arm64=('21' '22' '23' '24' '26' '27' '28')
known_apis_r19c_x86=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28')
known_apis_r19c_x86_64=('21' '22' '23' '24' '26' '27' '28')
known_apis_r20b=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r20b_arm=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r20b_arm64=('21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r20b_x86=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r20b_x86_64=('21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r21e=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r21e_arm=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r21e_arm64=('21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r21e_x86=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r21e_x86_64=('21' '22' '23' '24' '26' '27' '28' '29')
known_apis_r22b=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r22b_arm=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r22b_arm64=('21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r22b_x86=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r22b_x86_64=('21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r23b=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r23b_arm=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r23b_arm64=('21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r23b_x86=('16' '17' '18' '19' '21' '22' '23' '24' '26' '27' '28' '29' '30')
known_apis_r23b_x86_64=('21' '22' '23' '24' '26' '27' '28' '29' '30')
# END MATRIX
Loading