From 13cb50a2daa6bd73ebf12e1dc0988f6cfd0c9a0f Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Mon, 21 Feb 2022 15:20:28 +0100 Subject: [PATCH 01/17] ignore git clone errors only a warning is shown this enables an update to a new tag of an alrady cloned repo --- .gitignore | 11 +- .../lib/brix11/brix/common/cmds/bootstrap.rb | 2 +- build-taox11-for-osx.sh | 118 ++++++++++++++++++ 3 files changed, 128 insertions(+), 3 deletions(-) create mode 100755 build-taox11-for-osx.sh diff --git a/.gitignore b/.gitignore index 92885f7..d66c8b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ build .* *~ -ACE +ACE/ +ACE_TAO/ *C.h *C.inl *C.cpp @@ -20,6 +21,7 @@ GNUmakefile* *.pdb *.Build.CppClean.log *.dll +*.dylib *.lib *.iobj *.ipdb @@ -31,5 +33,10 @@ GNUmakefile* commit.txt taox11/html taox11/latex +taox11/ *.gcno -workspace.mwc* \ No newline at end of file +workspace.mwc* +ciaox11/ +dancex11/ +ridl/ +stage/ diff --git a/brix11/lib/brix11/brix/common/cmds/bootstrap.rb b/brix11/lib/brix11/brix/common/cmds/bootstrap.rb index e25bc61..e81780d 100644 --- a/brix11/lib/brix11/brix/common/cmds/bootstrap.rb +++ b/brix11/lib/brix11/brix/common/cmds/bootstrap.rb @@ -64,7 +64,7 @@ def run(argv) Sys.in_dir(bse['dir']) do tag = bse['tag'] || options[:bootstrap][:tags][bse['id']] || 'master' rc, _, _ = Exec.runcmd('git', 'clone', bse['repo'], '.') - BRIX11.log_fatal("Failed to clone #{bse['id']} repository : #{bse['repo']}") unless rc + BRIX11.show_msg("Failed to clone #{bse['id']} repository : #{bse['repo']}") unless rc rc,_, _ = Exec.runcmd('git', 'checkout', tag) BRIX11.log_fatal("Failed to checkout #{bse['id']} repository tag : #{tag}") unless rc end diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh new file mode 100755 index 0000000..2258dc4 --- /dev/null +++ b/build-taox11-for-osx.sh @@ -0,0 +1,118 @@ +#!/bin/sh +# +# adapted from: +# https://github.com/RemedyIT/axcioma/blob/master/.github/workflows/linux.yml +# + +set -e +set -u + +export BOOST_ROOT=/usr/local +export BZIP2_ROOT=/usr/local +#TODO ls -l ${BZIP2_ROOT}/include/bzlib.h +export CPPUNIT_ROOT=/usr/local +export LOG4CPLUS_ROOT=/usr/local +export LZO1_ROOT=/usr/local +export LZO2_ROOT=/usr/local +export MPI_ROOT=/usr/local +export PCRE_ROOT=/usr/local +export PNG_ROOT=/usr/local +export XERCESCROOT=/usr/local +ls -l ${XERCESCROOT}/include/xercesc/parsers/SAXParser.hpp +export ZLIB_ROOT=/usr/local +#TODO -l ${ZLIB_ROOT}/include/bzlib.h +export ZMQ_ROOT=/usr/local +ls -l ${ZMQ_ROOT}/include/zmq.h +############################### +#XXX export SSL_ROOT='/usr/local/Cellar/openssl@1.1/1.1.1m' +#XXX ls -l ${SSL_ROOT}/include/openssl/ssl.h + +set -x + +############################################################ + +export X11_BASE_ROOT=${PWD} +export INSTALL_PREFIX=${X11_BASE_ROOT}/stage + +export DOC_ROOT=${X11_BASE_ROOT}/ACE +export ACE_ROOT=${X11_BASE_ROOT}/ACE/ACE +export MPC_ROOT=${X11_BASE_ROOT}/ACE/MPC +export TAO_ROOT=${X11_BASE_ROOT}/ACE/TAO +export TAOX11_ROOT=${X11_BASE_ROOT}/taox11 +export MPC_BASE=${TAOX11_ROOT}/bin/MPC + +export RIDL_ROOT=${X11_BASE_ROOT}/ridl +export RIDL_BE_PATH=${TAOX11_ROOT} +#NO! :/Users/clausklein/Workspace/cpp/axcioma/ciaox11:/Users/clausklein/Workspace/cpp/axcioma/ciaox11/connectors/psdd4ccm +export RIDL_BE_SELECT=c++11 + +#NO! export CIAOX11_ROOT=${X11_BASE_ROOT}/ciaox11 +#NO! export DANCEX11_ROOT=${X11_BASE_ROOT}/dancex11 +#NO! export DDS_ROOT=${X11_BASE_ROOT}/OpenDDS + +export BRIX11_VERBOSE=1 +export BRIX11_NUMBER_OF_PROCESSORS=6 + +############################################################ + +$X11_BASE_ROOT/bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT +#XXX -W openddsroot=$DDS_ROOT -W xercescroot=$XERCESCROOT -W zqmroot=$ZMQ_ROOT -W sslroot=$SSL_ROOT + +# - name: Print brix11 configuration +$X11_BASE_ROOT/bin/brix11 --version +$X11_BASE_ROOT/bin/brix11 env -- configure -P 2>&1 | tee env-configure.log + +# FIXME: quickfixes for OSX +# ACE/include/makeinclude/platform_macosx.GNU +platform_file='include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU' +echo ${platform_file} > ${ACE_ROOT}/include/makeinclude/platform_macros.GNU + +# ACE/ace/config.h +# ACE/ace/config-macosx.h +echo '#include "ace/config-macosx.h"' > ${ACE_ROOT}/ace/config.h + +# ACE/bin/MakeProjectCreator/config/default.features +echo 'ipv6=1' > ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +echo 'versioned_namespace=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +echo 'acetaompc=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +echo 'inline=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +echo 'optimize=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features + +#TODO echo 'c++17=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'xerces2=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'opendds=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'ndds=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'zlib=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'lzo1=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'lzo2=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'bzip2=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'boost=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#TODO echo 'ace_for_tao=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'multi_topic=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'ssl=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +#XXX echo 'zmq=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features + +# generate all makefiles +# see workspace.mwc +perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${X11_BASE_ROOT}/workspace.mwc -workers ${BRIX11_NUMBER_OF_PROCESSORS} +perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAO_ROOT}/TAO_ACE.mwc -workers ${BRIX11_NUMBER_OF_PROCESSORS} + +#see taox11/taox11.mpc +#and ACE_TAO/ACE/ace/ace_for_tao.mpc +#NO! bin/brix11 gen build workspace.mwc + +# make all +make -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee build-all.log +#XXX $X11_BASE_ROOT/bin/brix11 make -N -d ${TAOX11_ROOT} 2>&1 | tee build-all.log +$X11_BASE_ROOT/bin/brix11 make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee -a build-all.log +#XXX make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAO_ROOT} 2>&1 | tee -a build-all.log + +# make tests +$X11_BASE_ROOT/bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log + +# install +make -j ${BRIX11_NUMBER_OF_PROCESSORS} install 2>&1 | tee make-install.log +#XXX make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT} install +#XXX make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAO_ROOT} install + +exit 0 From 272eab160c98e23af8b777222844522254b16c29 Mon Sep 17 00:00:00 2001 From: klein_cl Date: Tue, 18 Jan 2022 11:23:15 +0100 Subject: [PATCH 02/17] add build script --- .gitignore | 2 ++ build-taox11-on-linux.sh | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 build-taox11-on-linux.sh diff --git a/.gitignore b/.gitignore index d66c8b3..a75ede4 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ GNUmakefile* *.exe *.kdev4 *.so* +*.log commit.txt taox11/html taox11/latex @@ -39,4 +40,5 @@ workspace.mwc* ciaox11/ dancex11/ ridl/ +taox11/ stage/ diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh new file mode 100755 index 0000000..2c351b4 --- /dev/null +++ b/build-taox11-on-linux.sh @@ -0,0 +1,36 @@ +#!/bin/sh +set -e +set -u + +export WORKSPACE=/home/klein_cl/Workspace/cpp +export X11_BASE_ROOT=$WORKSPACE/axcioma + +export ACE_ROOT=$X11_BASE_ROOT/ACE/ACE +export CIAOX11_ROOT=$X11_BASE_ROOT/ciaox11 +export DANCEX11_ROOT=$X11_BASE_ROOT/dancex11 +export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$X11_BASE_ROOT/ACE/ACE/lib:/usr/lib:/usr/local/lib/python3.8/site-packages:$X11_BASE_ROOT/ciaox11/lib:$X11_BASE_ROOT/dancex11/lib +export MPC_BASE=$X11_BASE_ROOT/taox11/bin/MPC +export MPC_ROOT=$X11_BASE_ROOT/ACE/MPC +export PATH=$X11_BASE_ROOT/dancex11/bin:$X11_BASE_ROOT/ciaox11/bin:$X11_BASE_ROOT/bin:$X11_BASE_ROOT/taox11/bin:/home/klein_cl/.local/bin:/usr/local/lib/python3.8/site-packages:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +export RIDL_BE_PATH=:$X11_BASE_ROOT/taox11:$X11_BASE_ROOT/ciaox11:$X11_BASE_ROOT/ciaox11/connectors/psdd4ccm +export RIDL_BE_SELECT=ccmx11 +export RIDL_ROOT=$X11_BASE_ROOT/ridl/lib +export SSL_ROOT=/usr +export TAOX11_ROOT=$X11_BASE_ROOT/taox11 +export TAO_ROOT=$X11_BASE_ROOT/ACE/TAO +export XERCESCROOT=/usr +export ZLIB_ROOT=/usr +export INSTALL_PREFIX=$PWD/stage + +set -x + +bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT + +bin/brix11 env -- configure -P 2>&1 | tee configure.log + +bin/brix11 gen build workspace.mwc -- gen build $TAOX11_ROOT/examples -- gen build $TAOX11_ROOT/orbsvcs/tests -- gen build $TAOX11_ROOT/tests + +bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log + +make -j -C ${TAOX11_ROOT} install + From ae5d444a2e96f4f027e59bffc6fcd12ed23b7039 Mon Sep 17 00:00:00 2001 From: klein_cl Date: Tue, 18 Jan 2022 12:46:06 +0100 Subject: [PATCH 03/17] add missing make step --- build-taox11-on-linux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index 2c351b4..6b66ba2 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -30,6 +30,8 @@ bin/brix11 env -- configure -P 2>&1 | tee configure.log bin/brix11 gen build workspace.mwc -- gen build $TAOX11_ROOT/examples -- gen build $TAOX11_ROOT/orbsvcs/tests -- gen build $TAOX11_ROOT/tests +bin/brix11 make -N -d $X11_BASE_ROOT -- make -N -d $TAOX11_ROOT/examples -- make -N -d $TAOX11_ROOT/orbsvcs/tests -- make -N -d $TAOX11_ROOT/tests -- make -N -d $DANCEX11_ROOT/tests 2>&1 | tee make-all.log + bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log make -j -C ${TAOX11_ROOT} install From 9d885ba654b7df71b682d54332deda5a9826a76a Mon Sep 17 00:00:00 2001 From: klein_cl Date: Tue, 18 Jan 2022 15:32:25 +0100 Subject: [PATCH 04/17] setup pathes more general --- build-taox11-on-linux.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index 6b66ba2..c62dd94 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -2,25 +2,27 @@ set -e set -u -export WORKSPACE=/home/klein_cl/Workspace/cpp +export WORKSPACE=`realpath ..` export X11_BASE_ROOT=$WORKSPACE/axcioma +export INSTALL_PREFIX=$X11_BASE_ROOT/stage export ACE_ROOT=$X11_BASE_ROOT/ACE/ACE export CIAOX11_ROOT=$X11_BASE_ROOT/ciaox11 export DANCEX11_ROOT=$X11_BASE_ROOT/dancex11 -export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$X11_BASE_ROOT/ACE/ACE/lib:/usr/lib:/usr/local/lib/python3.8/site-packages:$X11_BASE_ROOT/ciaox11/lib:$X11_BASE_ROOT/dancex11/lib +export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$X11_BASE_ROOT/ACE/ACE/lib:/usr/local/lib:/usr/lib:$PYTHONPATH:$X11_BASE_ROOT/ciaox11/lib:$X11_BASE_ROOT/dancex11/lib export MPC_BASE=$X11_BASE_ROOT/taox11/bin/MPC export MPC_ROOT=$X11_BASE_ROOT/ACE/MPC -export PATH=$X11_BASE_ROOT/dancex11/bin:$X11_BASE_ROOT/ciaox11/bin:$X11_BASE_ROOT/bin:$X11_BASE_ROOT/taox11/bin:/home/klein_cl/.local/bin:/usr/local/lib/python3.8/site-packages:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +export PATH=$X11_BASE_ROOT/dancex11/bin:$X11_BASE_ROOT/ciaox11/bin:$X11_BASE_ROOT/bin:$X11_BASE_ROOT/taox11/bin:$HOME/.local/bin:$PYTHONPATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export RIDL_BE_PATH=:$X11_BASE_ROOT/taox11:$X11_BASE_ROOT/ciaox11:$X11_BASE_ROOT/ciaox11/connectors/psdd4ccm export RIDL_BE_SELECT=ccmx11 export RIDL_ROOT=$X11_BASE_ROOT/ridl/lib -export SSL_ROOT=/usr export TAOX11_ROOT=$X11_BASE_ROOT/taox11 export TAO_ROOT=$X11_BASE_ROOT/ACE/TAO + export XERCESCROOT=/usr export ZLIB_ROOT=/usr -export INSTALL_PREFIX=$PWD/stage +export SSL_ROOT=/usr + set -x @@ -30,7 +32,7 @@ bin/brix11 env -- configure -P 2>&1 | tee configure.log bin/brix11 gen build workspace.mwc -- gen build $TAOX11_ROOT/examples -- gen build $TAOX11_ROOT/orbsvcs/tests -- gen build $TAOX11_ROOT/tests -bin/brix11 make -N -d $X11_BASE_ROOT -- make -N -d $TAOX11_ROOT/examples -- make -N -d $TAOX11_ROOT/orbsvcs/tests -- make -N -d $TAOX11_ROOT/tests -- make -N -d $DANCEX11_ROOT/tests 2>&1 | tee make-all.log +bin/brix11 make -N -d $X11_BASE_ROOT -- make -N -d $TAOX11_ROOT/examples -- make -N -d $TAOX11_ROOT/orbsvcs/tests -- make -N -d $TAOX11_ROOT/tests 2>&1 | tee make-all.log bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log From 5072a8db5f8ccded7fd177897d144760ada2849c Mon Sep 17 00:00:00 2001 From: klein_cl Date: Thu, 20 Jan 2022 10:30:17 +0100 Subject: [PATCH 05/17] install ace and tao too --- build-taox11-on-linux.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index c62dd94..bf4e7c4 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -13,7 +13,7 @@ export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$X11_BASE_ROOT/ACE/ACE/lib:/usr/local/ export MPC_BASE=$X11_BASE_ROOT/taox11/bin/MPC export MPC_ROOT=$X11_BASE_ROOT/ACE/MPC export PATH=$X11_BASE_ROOT/dancex11/bin:$X11_BASE_ROOT/ciaox11/bin:$X11_BASE_ROOT/bin:$X11_BASE_ROOT/taox11/bin:$HOME/.local/bin:$PYTHONPATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -export RIDL_BE_PATH=:$X11_BASE_ROOT/taox11:$X11_BASE_ROOT/ciaox11:$X11_BASE_ROOT/ciaox11/connectors/psdd4ccm +export RIDL_BE_PATH=$X11_BASE_ROOT/taox11:$X11_BASE_ROOT/ciaox11:$X11_BASE_ROOT/ciaox11/connectors/psdd4ccm export RIDL_BE_SELECT=ccmx11 export RIDL_ROOT=$X11_BASE_ROOT/ridl/lib export TAOX11_ROOT=$X11_BASE_ROOT/taox11 @@ -37,4 +37,6 @@ bin/brix11 make -N -d $X11_BASE_ROOT -- make -N -d $TAOX11_ROOT/examples -- make bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log make -j -C ${TAOX11_ROOT} install +make -j -C ${TAO_ROOT} -k install +make -j -C ${ACE_ROOT} -k install From c3c4822ac537256d7b7f477b10ce99c2a241395f Mon Sep 17 00:00:00 2001 From: Claus Klein Date: Mon, 31 Jan 2022 11:45:32 +0100 Subject: [PATCH 06/17] fix buildscript to build only taox11 todo firewall problems with windows WSL the tests are disabled for now --- .gitignore | 1 + build-taox11-on-linux.sh | 54 +++++++++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index a75ede4..1b4064f 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ dancex11/ ridl/ taox11/ stage/ +/lib/* diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index bf4e7c4..8eedb8a 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e set -u @@ -7,36 +7,56 @@ export X11_BASE_ROOT=$WORKSPACE/axcioma export INSTALL_PREFIX=$X11_BASE_ROOT/stage export ACE_ROOT=$X11_BASE_ROOT/ACE/ACE -export CIAOX11_ROOT=$X11_BASE_ROOT/ciaox11 -export DANCEX11_ROOT=$X11_BASE_ROOT/dancex11 -export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$X11_BASE_ROOT/ACE/ACE/lib:/usr/local/lib:/usr/lib:$PYTHONPATH:$X11_BASE_ROOT/ciaox11/lib:$X11_BASE_ROOT/dancex11/lib -export MPC_BASE=$X11_BASE_ROOT/taox11/bin/MPC +export TAO_ROOT=$X11_BASE_ROOT/ACE/TAO +export TAOX11_ROOT=$X11_BASE_ROOT/taox11 + +# export CIAOX11_ROOT=$X11_BASE_ROOT/ciaox11 +# export DANCEX11_ROOT=$X11_BASE_ROOT/dancex11 + +export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$ACE_ROOT/lib:/usr/local/lib:/usr/lib:$PYTHONPATH +#NO! export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$X11_BASE_ROOT/ciaox11/lib:$X11_BASE_ROOT/dancex11/lib +export MPC_BASE=$TAOX11_ROOT/bin/MPC export MPC_ROOT=$X11_BASE_ROOT/ACE/MPC -export PATH=$X11_BASE_ROOT/dancex11/bin:$X11_BASE_ROOT/ciaox11/bin:$X11_BASE_ROOT/bin:$X11_BASE_ROOT/taox11/bin:$HOME/.local/bin:$PYTHONPATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -export RIDL_BE_PATH=$X11_BASE_ROOT/taox11:$X11_BASE_ROOT/ciaox11:$X11_BASE_ROOT/ciaox11/connectors/psdd4ccm -export RIDL_BE_SELECT=ccmx11 +export PATH=$X11_BASE_ROOT/bin:$TAOX11_ROOT/bin:$HOME/.local/bin:$PYTHONPATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +#NO! export PATH=$X11_BASE_ROOT/dancex11/bin:$X11_BASE_ROOT/ciaox11/bin:$PATH +export RIDL_BE_PATH=$TAOX11_ROOT +#NO! export RIDL_BE_PATH=$RIDL_BE_PATH:$X11_BASE_ROOT/ciaox11:$X11_BASE_ROOT/ciaox11/connectors/psdd4ccm +export RIDL_BE_SELECT=c++11 export RIDL_ROOT=$X11_BASE_ROOT/ridl/lib -export TAOX11_ROOT=$X11_BASE_ROOT/taox11 -export TAO_ROOT=$X11_BASE_ROOT/ACE/TAO export XERCESCROOT=/usr export ZLIB_ROOT=/usr export SSL_ROOT=/usr - set -x bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT bin/brix11 env -- configure -P 2>&1 | tee configure.log -bin/brix11 gen build workspace.mwc -- gen build $TAOX11_ROOT/examples -- gen build $TAOX11_ROOT/orbsvcs/tests -- gen build $TAOX11_ROOT/tests +bin/brix11 gen build workspace.mwc -- gen build ${TAOX11_ROOT}/examples -- gen build ${TAOX11_ROOT}/orbsvcs/tests -- gen build ${TAOX11_ROOT}/tests + +bin/brix11 make -N -d ${X11_BASE_ROOT} -- make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee make-all.log + +#FIXME: problems with WSL and windows firewall! CK +#TODO bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log + +make -j -C ${X11_BASE_ROOT} install 2>&1 | tee make-install.log + +#TODO: should be not needed? CK +# make -j -C ${TAOX11_ROOT} install +# make -j -C ${TAO_ROOT} -k install +# make -j -C ${ACE_ROOT} -k install -bin/brix11 make -N -d $X11_BASE_ROOT -- make -N -d $TAOX11_ROOT/examples -- make -N -d $TAOX11_ROOT/orbsvcs/tests -- make -N -d $TAOX11_ROOT/tests 2>&1 | tee make-all.log +#FIXME: quickfix to make include tree usable! CK +# see taox11/tao/x11/taox11.mpc +pushd ${INSTALL_PREFIX}/include/x11 +cp -p *.h ../tao/x11 +cp -p *.cpp ../tao/x11 +popd -bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log +find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs tree +#TODO: remove garbage! CK +#find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs rm -rf -make -j -C ${TAOX11_ROOT} install -make -j -C ${TAO_ROOT} -k install -make -j -C ${ACE_ROOT} -k install From 24207cbad078c33deb359bc248138c565da543cd Mon Sep 17 00:00:00 2001 From: klein_cl Date: Tue, 1 Feb 2022 13:26:53 +0100 Subject: [PATCH 07/17] add support for clang-format and use .env_add.sh file force to use "brix11 bootstrap taox11" only --- .clang-format | 1 + .env_add.sh | 24 ++++++++++++++++++++++++ build-taox11-on-linux.sh | 36 +++++++++++------------------------- 3 files changed, 36 insertions(+), 25 deletions(-) create mode 120000 .clang-format create mode 100644 .env_add.sh diff --git a/.clang-format b/.clang-format new file mode 120000 index 0000000..a935b83 --- /dev/null +++ b/.clang-format @@ -0,0 +1 @@ +ACE/.clang-format \ No newline at end of file diff --git a/.env_add.sh b/.env_add.sh new file mode 100644 index 0000000..1e4a0cb --- /dev/null +++ b/.env_add.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +#XXX set -u +#XXX set -e + +export X11_BASE_ROOT=$PWD +export TAOX11_ROOT=$X11_BASE_ROOT/taox11 +export ACE_ROOT=$X11_BASE_ROOT/ACE/ACE +export TAO_ROOT=$X11_BASE_ROOT/ACE/TAO + +export MPC_BASE=$TAOX11_ROOT/bin/MPC +export MPC_ROOT=$X11_BASE_ROOT/ACE/MPC + +export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$ACE_ROOT/lib:/usr/lib: +export PATH=$X11_BASE_ROOT/bin:$TAOX11_ROOT/bin:$ACE_ROOT/bin:$HOME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin + +export RIDL_BE_PATH=:$TAOX11_ROOT/ +export RIDL_BE_SELECT=c++11 +export RIDL_ROOT=$X11_BASE_ROOT/ridl/lib + +export BZIP2_ROOT=/usr +export SSL_ROOT=/usr +export ZLIB_ROOT=/usr + diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index 8eedb8a..55b267a 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -6,30 +6,15 @@ export WORKSPACE=`realpath ..` export X11_BASE_ROOT=$WORKSPACE/axcioma export INSTALL_PREFIX=$X11_BASE_ROOT/stage -export ACE_ROOT=$X11_BASE_ROOT/ACE/ACE -export TAO_ROOT=$X11_BASE_ROOT/ACE/TAO -export TAOX11_ROOT=$X11_BASE_ROOT/taox11 - -# export CIAOX11_ROOT=$X11_BASE_ROOT/ciaox11 -# export DANCEX11_ROOT=$X11_BASE_ROOT/dancex11 - -export LD_LIBRARY_PATH=$X11_BASE_ROOT/lib:$ACE_ROOT/lib:/usr/local/lib:/usr/lib:$PYTHONPATH -#NO! export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$X11_BASE_ROOT/ciaox11/lib:$X11_BASE_ROOT/dancex11/lib -export MPC_BASE=$TAOX11_ROOT/bin/MPC -export MPC_ROOT=$X11_BASE_ROOT/ACE/MPC -export PATH=$X11_BASE_ROOT/bin:$TAOX11_ROOT/bin:$HOME/.local/bin:$PYTHONPATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -#NO! export PATH=$X11_BASE_ROOT/dancex11/bin:$X11_BASE_ROOT/ciaox11/bin:$PATH -export RIDL_BE_PATH=$TAOX11_ROOT -#NO! export RIDL_BE_PATH=$RIDL_BE_PATH:$X11_BASE_ROOT/ciaox11:$X11_BASE_ROOT/ciaox11/connectors/psdd4ccm -export RIDL_BE_SELECT=c++11 -export RIDL_ROOT=$X11_BASE_ROOT/ridl/lib - -export XERCESCROOT=/usr -export ZLIB_ROOT=/usr -export SSL_ROOT=/usr +source .env_add.sh set -x +#TODO: force to build only taox11! CK +rm -rf ciaox11 dancex11 + +bin/brix11 bootstrap taox11 + bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT bin/brix11 env -- configure -P 2>&1 | tee configure.log @@ -38,8 +23,9 @@ bin/brix11 gen build workspace.mwc -- gen build ${TAOX11_ROOT}/examples -- gen b bin/brix11 make -N -d ${X11_BASE_ROOT} -- make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee make-all.log -#FIXME: problems with WSL and windows firewall! CK -#TODO bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log +#TODO: workaround to prevent problems with WSL and windows firewall! CK +egrep "^127.0.1.1\s+$HOSTNAME" /etc/hosts && echo "change to 127.0.0.1!" && exit 1 +bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log make -j -C ${X11_BASE_ROOT} install 2>&1 | tee make-install.log @@ -55,8 +41,8 @@ cp -p *.h ../tao/x11 cp -p *.cpp ../tao/x11 popd +#FIXME: show install garbage! CK find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs tree #TODO: remove garbage! CK -#find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs rm -rf - +find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs rm -rf From d2b3a571be62bce96b78acda075449aa8a4499e0 Mon Sep 17 00:00:00 2001 From: klein_cl Date: Tue, 1 Feb 2022 15:19:49 +0100 Subject: [PATCH 08/17] add quickfix for orbserver include dir --- build-taox11-on-linux.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index 55b267a..152f3c5 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -39,6 +39,10 @@ make -j -C ${X11_BASE_ROOT} install 2>&1 | tee make-install.log pushd ${INSTALL_PREFIX}/include/x11 cp -p *.h ../tao/x11 cp -p *.cpp ../tao/x11 +cd .. +mkdir -p orbsvcs/naming_server +cp -p naming_server/* orbsvcs/naming_server +rm -rf x11 naming_server popd #FIXME: show install garbage! CK From 347d6443e59d051c4cf694b1c07a299e74e90dfa Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Thu, 14 Apr 2022 22:18:43 +0200 Subject: [PATCH 09/17] cleanup osx build script --- build-taox11-for-osx.sh | 69 +++++++---------------------------------- 1 file changed, 11 insertions(+), 58 deletions(-) diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh index 2258dc4..0ce6e30 100755 --- a/build-taox11-for-osx.sh +++ b/build-taox11-for-osx.sh @@ -7,56 +7,28 @@ set -e set -u -export BOOST_ROOT=/usr/local -export BZIP2_ROOT=/usr/local -#TODO ls -l ${BZIP2_ROOT}/include/bzlib.h -export CPPUNIT_ROOT=/usr/local -export LOG4CPLUS_ROOT=/usr/local -export LZO1_ROOT=/usr/local -export LZO2_ROOT=/usr/local -export MPI_ROOT=/usr/local -export PCRE_ROOT=/usr/local -export PNG_ROOT=/usr/local -export XERCESCROOT=/usr/local -ls -l ${XERCESCROOT}/include/xercesc/parsers/SAXParser.hpp -export ZLIB_ROOT=/usr/local -#TODO -l ${ZLIB_ROOT}/include/bzlib.h -export ZMQ_ROOT=/usr/local -ls -l ${ZMQ_ROOT}/include/zmq.h -############################### -#XXX export SSL_ROOT='/usr/local/Cellar/openssl@1.1/1.1.1m' -#XXX ls -l ${SSL_ROOT}/include/openssl/ssl.h +export LANG=C +export WORKSPACE=`realpath ..` +export X11_BASE_ROOT=$WORKSPACE/axcioma +export INSTALL_PREFIX=$X11_BASE_ROOT/stage + +source .env_add.sh set -x ############################################################ -export X11_BASE_ROOT=${PWD} -export INSTALL_PREFIX=${X11_BASE_ROOT}/stage - -export DOC_ROOT=${X11_BASE_ROOT}/ACE -export ACE_ROOT=${X11_BASE_ROOT}/ACE/ACE -export MPC_ROOT=${X11_BASE_ROOT}/ACE/MPC -export TAO_ROOT=${X11_BASE_ROOT}/ACE/TAO -export TAOX11_ROOT=${X11_BASE_ROOT}/taox11 -export MPC_BASE=${TAOX11_ROOT}/bin/MPC - -export RIDL_ROOT=${X11_BASE_ROOT}/ridl -export RIDL_BE_PATH=${TAOX11_ROOT} -#NO! :/Users/clausklein/Workspace/cpp/axcioma/ciaox11:/Users/clausklein/Workspace/cpp/axcioma/ciaox11/connectors/psdd4ccm -export RIDL_BE_SELECT=c++11 - -#NO! export CIAOX11_ROOT=${X11_BASE_ROOT}/ciaox11 -#NO! export DANCEX11_ROOT=${X11_BASE_ROOT}/dancex11 -#NO! export DDS_ROOT=${X11_BASE_ROOT}/OpenDDS - export BRIX11_VERBOSE=1 export BRIX11_NUMBER_OF_PROCESSORS=6 ############################################################ +# TODO: force to build only taox11! CK +rm -rf ciaox11 dancex11 + +$X11_BASE_ROOT/bin/brix11 bootstrap taox11 + $X11_BASE_ROOT/bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT -#XXX -W openddsroot=$DDS_ROOT -W xercescroot=$XERCESCROOT -W zqmroot=$ZMQ_ROOT -W sslroot=$SSL_ROOT # - name: Print brix11 configuration $X11_BASE_ROOT/bin/brix11 --version @@ -78,24 +50,9 @@ echo 'acetaompc=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'inline=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'optimize=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#TODO echo 'c++17=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'xerces2=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'opendds=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'ndds=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'zlib=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'lzo1=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'lzo2=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'bzip2=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'boost=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#TODO echo 'ace_for_tao=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'multi_topic=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'ssl=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -#XXX echo 'zmq=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features - # generate all makefiles # see workspace.mwc perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${X11_BASE_ROOT}/workspace.mwc -workers ${BRIX11_NUMBER_OF_PROCESSORS} -perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAO_ROOT}/TAO_ACE.mwc -workers ${BRIX11_NUMBER_OF_PROCESSORS} #see taox11/taox11.mpc #and ACE_TAO/ACE/ace/ace_for_tao.mpc @@ -103,16 +60,12 @@ perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAO_ROOT}/TAO_ACE.mwc -workers ${B # make all make -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee build-all.log -#XXX $X11_BASE_ROOT/bin/brix11 make -N -d ${TAOX11_ROOT} 2>&1 | tee build-all.log $X11_BASE_ROOT/bin/brix11 make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee -a build-all.log -#XXX make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAO_ROOT} 2>&1 | tee -a build-all.log # make tests $X11_BASE_ROOT/bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log # install make -j ${BRIX11_NUMBER_OF_PROCESSORS} install 2>&1 | tee make-install.log -#XXX make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT} install -#XXX make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAO_ROOT} install exit 0 From 08345df0f5817022a30cae03c7fcaa7d36a6d0bf Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Thu, 14 Apr 2022 22:50:20 +0200 Subject: [PATCH 10/17] cleanup the linux build script --- build-taox11-on-linux.sh | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index 152f3c5..2daadf2 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -29,24 +29,10 @@ bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test make -j -C ${X11_BASE_ROOT} install 2>&1 | tee make-install.log -#TODO: should be not needed? CK -# make -j -C ${TAOX11_ROOT} install -# make -j -C ${TAO_ROOT} -k install -# make -j -C ${ACE_ROOT} -k install - -#FIXME: quickfix to make include tree usable! CK -# see taox11/tao/x11/taox11.mpc -pushd ${INSTALL_PREFIX}/include/x11 -cp -p *.h ../tao/x11 -cp -p *.cpp ../tao/x11 -cd .. -mkdir -p orbsvcs/naming_server -cp -p naming_server/* orbsvcs/naming_server -rm -rf x11 naming_server -popd - -#FIXME: show install garbage! CK find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs tree -#TODO: remove garbage! CK find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs rm -rf +#FIXME: remove the installed include garbage! CK +rm -rf ${INSTALL_PREFIX}/include + +exit 0 From 5fb632c3bf4d2ea0fff717b97b688089b19f762f Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Mon, 18 Apr 2022 10:04:40 +0200 Subject: [PATCH 11/17] cleanup build scripts --- .env_add.sh | 3 --- build-taox11-for-osx.sh | 46 +++++++++++++++++++++++++--------------- build-taox11-on-linux.sh | 1 + 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.env_add.sh b/.env_add.sh index 1e4a0cb..ede5f87 100644 --- a/.env_add.sh +++ b/.env_add.sh @@ -1,8 +1,5 @@ #!/bin/sh -#XXX set -u -#XXX set -e - export X11_BASE_ROOT=$PWD export TAOX11_ROOT=$X11_BASE_ROOT/taox11 export ACE_ROOT=$X11_BASE_ROOT/ACE/ACE diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh index 0ce6e30..3a8a501 100755 --- a/build-taox11-for-osx.sh +++ b/build-taox11-for-osx.sh @@ -8,6 +8,9 @@ set -e set -u export LANG=C +export CC=clang +export CXX=clang++ + export WORKSPACE=`realpath ..` export X11_BASE_ROOT=$WORKSPACE/axcioma export INSTALL_PREFIX=$X11_BASE_ROOT/stage @@ -16,51 +19,60 @@ source .env_add.sh set -x -############################################################ - export BRIX11_VERBOSE=1 export BRIX11_NUMBER_OF_PROCESSORS=6 -############################################################ - # TODO: force to build only taox11! CK rm -rf ciaox11 dancex11 +rm -f *.log $X11_BASE_ROOT/bin/brix11 bootstrap taox11 $X11_BASE_ROOT/bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT -# - name: Print brix11 configuration +# Print brix11 configuration $X11_BASE_ROOT/bin/brix11 --version -$X11_BASE_ROOT/bin/brix11 env -- configure -P 2>&1 | tee env-configure.log +$X11_BASE_ROOT/bin/brix11 env -- configure -P 2>&1 | tee configure.log + +############################################################ +# gen GNUmakefile from workspace.mwc +# see taox11/tao/x11/taox11.mpc +# and ACE/ACE/ace/ace_for_tao.mpc +# NO! bin/brix11 gen build workspace.mwc -- gen build ${TAOX11_ROOT}/examples -- gen build ${TAOX11_ROOT}/orbsvcs/tests -- gen build ${TAOX11_ROOT}/tests +############################################################ # FIXME: quickfixes for OSX -# ACE/include/makeinclude/platform_macosx.GNU +# ACE/ACE/include/makeinclude/platform_gcc_clang_common.GNU +# ACE/ACE/include/makeinclude/platform_clang_common.GNU +# ACE/ACE/include/makeinclude/platform_macosx_common.GNU +# ACE/ACE/include/makeinclude/platform_macosx.GNU platform_file='include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU' echo ${platform_file} > ${ACE_ROOT}/include/makeinclude/platform_macros.GNU -# ACE/ace/config.h -# ACE/ace/config-macosx.h +# ACE/ACE/ace/config.h +# ACE/ACE/ace/config-macosx.h echo '#include "ace/config-macosx.h"' > ${ACE_ROOT}/ace/config.h -# ACE/bin/MakeProjectCreator/config/default.features +# ACE/ACE/bin/MakeProjectCreator/config/default.features echo 'ipv6=1' > ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'versioned_namespace=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'acetaompc=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'inline=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'optimize=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +# TODO: echo 'c++17=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -# generate all makefiles +# generate all GNUmakefile # see workspace.mwc perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${X11_BASE_ROOT}/workspace.mwc -workers ${BRIX11_NUMBER_OF_PROCESSORS} - -#see taox11/taox11.mpc -#and ACE_TAO/ACE/ace/ace_for_tao.mpc -#NO! bin/brix11 gen build workspace.mwc +perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/orbsvcs/tests -workers ${BRIX11_NUMBER_OF_PROCESSORS} +perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/examples -workers ${BRIX11_NUMBER_OF_PROCESSORS} +perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/tests -workers ${BRIX11_NUMBER_OF_PROCESSORS} # make all -make -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee build-all.log -$X11_BASE_ROOT/bin/brix11 make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee -a build-all.log +make -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee make-all.log +make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log +make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log +make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log # make tests $X11_BASE_ROOT/bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index 2daadf2..7a3eec7 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -12,6 +12,7 @@ set -x #TODO: force to build only taox11! CK rm -rf ciaox11 dancex11 +rm -f *.log bin/brix11 bootstrap taox11 From a37f5c020dc5c7d00bccf9b417dacbc39a6bedd5 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Mon, 18 Apr 2022 14:45:34 +0200 Subject: [PATCH 12/17] add patch to build ACE with -std=c++17 --- ACE_Auto_Ptr.patch | 13 +++++++++++++ build-taox11-for-osx.sh | 26 ++++++++++++++++++++------ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 ACE_Auto_Ptr.patch diff --git a/ACE_Auto_Ptr.patch b/ACE_Auto_Ptr.patch new file mode 100644 index 0000000..0001f59 --- /dev/null +++ b/ACE_Auto_Ptr.patch @@ -0,0 +1,13 @@ +diff --git a/ACE/ace/Auto_Ptr.h b/ACE/ace/Auto_Ptr.h +index 01236ce8198..f4b71dabad9 100644 +--- a/ACE/ace/Auto_Ptr.h ++++ b/ACE/ace/Auto_Ptr.h +@@ -70,7 +70,7 @@ ACE_END_VERSIONED_NAMESPACE_DECL + + #if !defined (ACE_LACKS_AUTO_PTR) + #include +-using std::auto_ptr; ++//XXX using std::auto_ptr; + #else /* !ACE_LACKS_AUTO_PTR */ + + ACE_BEGIN_VERSIONED_NAMESPACE_DECL diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh index 3a8a501..0ed3bb7 100755 --- a/build-taox11-for-osx.sh +++ b/build-taox11-for-osx.sh @@ -28,6 +28,12 @@ rm -f *.log $X11_BASE_ROOT/bin/brix11 bootstrap taox11 +############################################################ +# patch to build ACE with -std=c++17 +cd $ACE_ROOT && patch -p1 < ../ACE_Auto_Ptr.patch +cd $X11_BASE_ROOT +############################################################ + $X11_BASE_ROOT/bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT # Print brix11 configuration @@ -51,6 +57,15 @@ echo ${platform_file} > ${ACE_ROOT}/include/makeinclude/platform_macros.GNU # ACE/ACE/ace/config.h # ACE/ACE/ace/config-macosx.h +# ACE/ACE/ace/config-macosx-mojave.h +# ACE/ACE/ace/config-macosx-highsierra.h +# ACE/ACE/ace/config-macosx-sierra.h +# ACE/ACE/ace/config-macosx-elcapitan.h +# ACE/ACE/ace/config-macosx-yosemite.h +# ACE/ACE/ace/config-macosx-mavericks.h +# ACE/ACE/ace/config-macosx-mountainlion.h +# ACE/ACE/ace/config-macosx-lion.h +# ACE/ACE/ace/config-macosx-leopard.h echo '#include "ace/config-macosx.h"' > ${ACE_ROOT}/ace/config.h # ACE/ACE/bin/MakeProjectCreator/config/default.features @@ -59,9 +74,8 @@ echo 'versioned_namespace=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/defaul echo 'acetaompc=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'inline=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features echo 'optimize=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -# TODO: echo 'c++17=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -# generate all GNUmakefile +# generate all GNUmakefile's # see workspace.mwc perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${X11_BASE_ROOT}/workspace.mwc -workers ${BRIX11_NUMBER_OF_PROCESSORS} perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/orbsvcs/tests -workers ${BRIX11_NUMBER_OF_PROCESSORS} @@ -69,10 +83,10 @@ perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/examples -workers ${B perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/tests -workers ${BRIX11_NUMBER_OF_PROCESSORS} # make all -make -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee make-all.log -make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log -make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log -make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log # make tests $X11_BASE_ROOT/bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log From 8a78d0fe82675794a91256e14d5ba7e893af7961 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Mon, 18 Apr 2022 15:35:24 +0200 Subject: [PATCH 13/17] fix path to patch file --- build-taox11-for-osx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh index 0ed3bb7..b4b95b4 100755 --- a/build-taox11-for-osx.sh +++ b/build-taox11-for-osx.sh @@ -30,7 +30,7 @@ $X11_BASE_ROOT/bin/brix11 bootstrap taox11 ############################################################ # patch to build ACE with -std=c++17 -cd $ACE_ROOT && patch -p1 < ../ACE_Auto_Ptr.patch +cd $ACE_ROOT && patch -p2 < ../../ACE_Auto_Ptr.patch cd $X11_BASE_ROOT ############################################################ From 5e94f4b5c34fd44d6a5709ecc08af16112a27e2f Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Mon, 18 Apr 2022 19:58:48 +0200 Subject: [PATCH 14/17] build ACE with -std=c++20 --- build-taox11-for-osx.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh index b4b95b4..d80f24a 100755 --- a/build-taox11-for-osx.sh +++ b/build-taox11-for-osx.sh @@ -29,8 +29,8 @@ rm -f *.log $X11_BASE_ROOT/bin/brix11 bootstrap taox11 ############################################################ -# patch to build ACE with -std=c++17 -cd $ACE_ROOT && patch -p2 < ../../ACE_Auto_Ptr.patch +# patch to build ACE with -std=c++20 +cd $ACE_ROOT && git stash && patch -p2 < ../../ACE_Auto_Ptr.patch cd $X11_BASE_ROOT ############################################################ @@ -67,6 +67,7 @@ echo ${platform_file} > ${ACE_ROOT}/include/makeinclude/platform_macros.GNU # ACE/ACE/ace/config-macosx-lion.h # ACE/ACE/ace/config-macosx-leopard.h echo '#include "ace/config-macosx.h"' > ${ACE_ROOT}/ace/config.h +echo '#define throw() noexcept' >> ${ACE_ROOT}/ace/config.h # ACE/ACE/bin/MakeProjectCreator/config/default.features echo 'ipv6=1' > ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features @@ -83,10 +84,10 @@ perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/examples -workers ${B perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/tests -workers ${BRIX11_NUMBER_OF_PROCESSORS} # make all -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee make-all.log -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log +make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee make-all.log +make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log +make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log +make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log # make tests $X11_BASE_ROOT/bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log From 6fec23e1dc7b68c3d9bd3affe09edc46f7fc5b35 Mon Sep 17 00:00:00 2001 From: Claus Klein Date: Wed, 20 Apr 2022 14:48:20 +0200 Subject: [PATCH 15/17] Create a cmake import target Axcioma::itaox11 --- CMakeLists.txt | 207 +++++++++++++++++++++++++++++++++++++ build-taox11-on-linux.sh | 35 ++++++- cmake/CPM.cmake | 20 ++++ cmake/GenerateTaoIdl.cmake | 192 ++++++++++++++++++++++++++++++++++ cmake/GlobalSettings.cmake | 33 ++++++ include/.keep | 0 6 files changed, 484 insertions(+), 3 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 cmake/CPM.cmake create mode 100644 cmake/GenerateTaoIdl.cmake create mode 100644 cmake/GlobalSettings.cmake create mode 100644 include/.keep diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9b01217 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,207 @@ +cmake_minimum_required(VERSION 3.16...3.23) +# +# see https://cmake.org/cmake/help/latest/index.html for introduction +# +# cmake -B ../build -G Ninja -S . +# DESTDIR=../stage cmake --install ../build --prefix / +# +option(CMAKE_EXPORT_COMPILE_COMMANDS "for clang-tidy" ON) + +project( + itaox11 + VERSION 2.2.0 + LANGUAGES CXX +) + +# ================================ +# add dependencies +# ================================ +include(cmake/GlobalSettings.cmake) + +include(GenerateTaoIdl) +include(GNUInstallDirs) + +add_library(itaox11 INTERFACE) + +# FIXME: not useable! see $HOME/Workspace/cpp/axcioma/stage/include +set(TAOX11_INCLUDE_DIRS $ENV{TAOX11_ROOT} $ENV{TAOX11_ROOT}/orbsvcs # + $ENV{ACE_ROOT} $ENV{TAO_ROOT} $ENV{TAO_ROOT}/orbsvcs +) +foreach(dir_ ${TAOX11_INCLUDE_DIRS}) + cmake_path(GET dir_ FILENAME filename) + if("${filename}" STREQUAL "taox11") + message(STATUS "install dir ${dir_}/tao/x11") + install( + DIRECTORY ${dir_}/tao/x11 # Note: without trailing / + DESTINATION include/tao + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.cpp" # Note: we need tao/x11/logger/logstream_t.cpp + ) + elseif("${filename}" STREQUAL "orbsvcs") + message(STATUS "install dir ${dir_}/orbsvcs") + install( + DIRECTORY ${dir_}/orbsvcs # Note: without trailing / + DESTINATION include # or TYPE INCLUDE + FILES_MATCHING + PATTERN "*.h" + ) + else() + set(INCLUDE_DIR $) + message(STATUS "install dir ${dir_}/${INCLUDE_DIR}/") + install( + DIRECTORY ${dir_}/${INCLUDE_DIR} # Note: without trailing / + DESTINATION include # or TYPE INCLUDE + FILES_MATCHING + PATTERN "*.shobj" EXCLUDE + # FIXME: FILES_MATCHING REGEX ".*/\.shobj$" EXCLUDE + PATTERN "*.h" + PATTERN "*.inl" + PATTERN "*.pidl" + PATTERN "*.cpp" + ) + endif() +endforeach() +list(TRANSFORM TAOX11_INCLUDE_DIRS PREPEND "$") +message(TRACE "${TAOX11_INCLUDE_DIRS}") + +# original header: target_include_directories(itaox11 SYSTEM INTERFACE ${TAOX11_INCLUDE_DIRS}) +target_include_directories( + itaox11 SYSTEM INTERFACE ${TAOX11_INCLUDE_DIRS} $ +) + +# the installed stage/usr/include subdirs: +# include/ace +# include/tao/x11 +# include/orbsvcs +# include/MgmtLocalAPI + +# see $HOME/Workspace/cpp/axcioma/stage/lib +set(TAOX11_LIBRARIES + taox11_portable_server + taox11_cosnaming_stub + taox11_anytypecode + TAO_PortableServer + TAO_AnyTypeCode + taox11 + TAO + x11_logger + ACE +) +target_link_libraries(itaox11 INTERFACE ${TAOX11_LIBRARIES}) +# TODO: Prevent use of original libs! CK +# XXX target_link_options(itaox11 INTERFACE -L$ENV{X11_BASE_ROOT}/stage/lib) +# Note: It must NOT be an absolute path! CK +target_link_directories( + itaox11 INTERFACE $ $ +) +target_compile_features(itaox11 INTERFACE cxx_std_17) + +message(TRACE "X11_BASE_ROOT=$ENV{X11_BASE_ROOT}") +foreach(lib_ ${TAOX11_LIBRARIES}) + find_library( + ${lib_}_LIB + NAMES ${lib_} + NO_DEFAULT_PATH + PATHS $ENV{X11_BASE_ROOT}/stage/lib REQUIRED + ) + message(STATUS "install lib ${${lib_}_LIB}") + # NOTE: this installs only symlinks witch are not useable! install(FILES ${${lib_}_LIB} TYPE LIB)! CK +endforeach() + +# Note: install all libs, more than yet used, but with symlinks to dll's +install(DIRECTORY $ENV{X11_BASE_ROOT}/stage/lib/ TYPE LIB) +# NOTE: with / means contents (*.so *.lib *.a pkgconfig)! CK +install(DIRECTORY $ENV{RIDL_ROOT}/ DESTINATION lib) + +# stage/usr/lib +# ├── ridl +# └── x86_64-linux-gnu +# ├── cmake +# │   ├── idl2cpp +# │   └── itaox11 +# ├── idl2cpp +# └── pkgconfig + +install( + DIRECTORY $ENV{X11_BASE_ROOT}/bin/ + TYPE BIN + USE_SOURCE_PERMISSIONS +) +install( + DIRECTORY $ENV{X11_BASE_ROOT}/stage/bin/ + TYPE BIN + USE_SOURCE_PERMISSIONS +) + +# stage/usr/bin +# ├── ace_gperf +# ├── brix11 +# ├── brix11.bat +# ├── fuzzers +# ├── ridlc +# ├── ridlc.bat +# ├── tao_catior +# ├── tao_cosnaming +# └── tao_idl + +if(APPLE) # "think different", indeed! CK + # see + # https://opensource.apple.com/source/clang/clang-703.0.31/src/tools/clang/docs/MSVCCompatibility.rst.auto.html + target_compile_options(itaox11 INTERFACE -fdelayed-template-parsing) + target_compile_definitions(itaox11 INTERFACE ACE_HAS_IPV6 ACE_HAS_VERSIONED_NAMESPACE=1 ACE_HAS_CUSTOM_EXPORT_MACROS=0) + target_compile_definitions(itaox11 INTERFACE __ACE_INLINE__) +elseif(UNIX) + # see https://clang.llvm.org/docs/ClangCommandLineReference.html + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + # Parse templated function definitions at the end of the translation unit + target_compile_options(itaox11 INTERFACE -fdelayed-template-parsing) + target_compile_definitions(itaox11 INTERFACE ACE_HAS_CUSTOM_EXPORT_MACROS=0) + else() + target_compile_definitions(itaox11 INTERFACE ACE_HAS_VERSIONED_NAMESPACE=1) + endif() + target_compile_definitions(itaox11 INTERFACE _GNU_SOURCE) + # Give inline C++ member functions hidden visibility by default + target_compile_options(itaox11 INTERFACE -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-aliasing) + target_compile_definitions(itaox11 INTERFACE __ACE_INLINE__) +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_options(itaox11 INTERFACE /bigobj) + target_compile_definitions( + itaox11 INTERFACE _CONSOLE _CRT_NONSTDC_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_SECURE_NO_DEPRECATE + _CRT_NONSTDC_NO_DEPRECATE _WINSOCK_DEPRECATED_NO_WARNINGS #NO! CK ACE_AS_STATIC_LIBS + ) + target_compile_options( + itaox11 + INTERFACE /JMC + /GR + /GS + /Gd + /fp:precise + /Zc:inline + /Zc:wchar_t + /Zc:forScope + /ZI + /Gm- + /nologo + /Ob1 + ) + target_link_options(itaox11 INTERFACE /FORCE:MULTIPLE) +endif() + +CPMAddPackage("gh:TheLartians/PackageProject.cmake@1.9.0") + +packageProject( + NAME itaox11 + VERSION ${PROJECT_VERSION} + NAMESPACE Axcioma + BINARY_DIR ${PROJECT_BINARY_DIR} + INCLUDE_DIR include + INCLUDE_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + INCLUDE_HEADER_PATTERN "*.h" + COMPATIBILITY SameMajorVersion + DISABLE_VERSION_SUFFIX YES +) + +include(CPack) + diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index 7a3eec7..e186e67 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -1,7 +1,16 @@ #!/bin/bash +# +# adapted from: +# https://github.com/RemedyIT/axcioma/blob/master/.github/workflows/linux.yml +# + set -e set -u +export LANG=C +export CC=gcc +export CXX=g++ + export WORKSPACE=`realpath ..` export X11_BASE_ROOT=$WORKSPACE/axcioma export INSTALL_PREFIX=$X11_BASE_ROOT/stage @@ -10,23 +19,43 @@ source .env_add.sh set -x -#TODO: force to build only taox11! CK +export BRIX11_VERBOSE=1 +export BRIX11_NUMBER_OF_PROCESSORS=6 + +# TODO: force to build only taox11! CK rm -rf ciaox11 dancex11 rm -f *.log bin/brix11 bootstrap taox11 +############################################################ +# patch to build ACE with -std=c++17 +cd $ACE_ROOT && git stash && patch -p2 < ../../ACE_Auto_Ptr.patch +cd $X11_BASE_ROOT +############################################################ + bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT +# Print brix11 configuration +bin/brix11 --version bin/brix11 env -- configure -P 2>&1 | tee configure.log bin/brix11 gen build workspace.mwc -- gen build ${TAOX11_ROOT}/examples -- gen build ${TAOX11_ROOT}/orbsvcs/tests -- gen build ${TAOX11_ROOT}/tests -bin/brix11 make -N -d ${X11_BASE_ROOT} -- make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee make-all.log +# ACE/ACE/ace/config.h +#FIXME: NO! echo '#define throw() noexcept' >> ${ACE_ROOT}/ace/config.h + +#NO! bin/brix11 make -N -d ${X11_BASE_ROOT} -- make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee make-all.log + +# make all +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${X11_BASE_ROOT} 2>&1 | tee make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log #TODO: workaround to prevent problems with WSL and windows firewall! CK egrep "^127.0.1.1\s+$HOSTNAME" /etc/hosts && echo "change to 127.0.0.1!" && exit 1 -bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log +#XXX bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log make -j -C ${X11_BASE_ROOT} install 2>&1 | tee make-install.log diff --git a/cmake/CPM.cmake b/cmake/CPM.cmake new file mode 100644 index 0000000..2db867b --- /dev/null +++ b/cmake/CPM.cmake @@ -0,0 +1,20 @@ +set(CPM_DOWNLOAD_VERSION 0.35.0) + +if(CPM_SOURCE_CACHE) + # Expand relative path. This is important if the provided path contains a tilde (~) + get_filename_component(CPM_SOURCE_CACHE ${CPM_SOURCE_CACHE} ABSOLUTE) + set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") +elseif(DEFINED ENV{CPM_SOURCE_CACHE}) + set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") +else() + set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") +endif() + +if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) + message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}") + file(DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake + ${CPM_DOWNLOAD_LOCATION} + ) +endif() + +include(${CPM_DOWNLOAD_LOCATION}) diff --git a/cmake/GenerateTaoIdl.cmake b/cmake/GenerateTaoIdl.cmake new file mode 100644 index 0000000..bf2cdde --- /dev/null +++ b/cmake/GenerateTaoIdl.cmake @@ -0,0 +1,192 @@ +## TAO IDL +# Define a macro to generate IDL output +# After this macro is called, +# +# !!IMPORTANT!! To set the exports, the following +# variables must be set before calling this macro: +# EXPORT_NAME (e.g. mylib_Export ) and +# EXPORT_FILE (e,g. mylib_Export.h ) +# +# Upon completion of this macro, the following variables will exist +# +# TAO_IDL_GENERATED - all files generated (add this to your target) +# +# TAO_IDL_GENERATED_HEADERS - generated header files (used for include +# file install) +# +# To add additional includes to the tao_idl command line, add them +# to TAO_IDL_INCLUDES before calling the macro: +# set( TAO_IDL_INCLUDES -I/my/foo/include ${TAO_IDL_INCLUDES ) +# +############################################################# +macro(TAO_WRAP_IDL) + + option(IDL_OUTPUT_IN_SOURCE_DIR "" OFF) + if(NOT IDL_OUTPUT_IN_SOURCE_DIR) + # in-source files need to see out-of-source files + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + endif() + + # on unix, set the LD_LIBRARY_PATH explicitly for tao_idl + # and the PATH so tao_idl can use gperf + # ----------------------------------------------------- + set(TAO_LIB_VAR "") + set(TAO_BIN_VAR "") + if(UNIX) + set(LD_PATH_VAR LD_LIBRARY_PATH) + if(APPLE) # "think different", indeed + set(LD_PATH_VAR DYLD_LIBRARY_PATH) + endif() + set(ORIGINAL_PATH $ENV{PATH}) + set(ORIGINAL_LD_PATH $ENV{${LD_PATH_VAR}}) + set(TAO_LIB_VAR "${LD_PATH_VAR}=${ORIGINAL_LD_PATH}:${ACE_ROOT_DIR}/lib") + set(TAO_BIN_VAR "PATH=${ORIGINAL_PATH}:${ACE_ROOT_DIR}/bin") + endif() + + # the generated files need to reference the *_Export files, + # so copy them to the out-of-source tree to avoid nasty + # include path referencing mess + # ----------------------------------------------------- + if(EXPORT_FILE) + message(STATUS "Copying ${EXPORT_FILE} file to out-of-source tree... (GenerateTaoIdl)") + exec_program( + "${CMAKE_COMMAND}" ARGS -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/${EXPORT_FILE}" + "${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_FILE}" + ) + endif() + + set(IDL_CHDR "C.h") + set(IDL_CINL "CP.h") + set(IDL_CSRC "C.cpp") + set(IDL_SHDR "S.h") + set(IDL_SINL "SP.h") + set(IDL_SSRC "S.cpp") + + set(TAO_IDL_VER_FLAGS "") + + if("$ENV{RIDL_ROOT}" STREQUAL "") + message(FATAL_ERROR "RIDL_ROOT not set!") + endif() + find_program(TAO_IDL_COMMAND NAMES ridlc REQUIRED) + + if("$ENV{TAOX11_ROOT}" STREQUAL "") + message(FATAL_ERROR "TAOX11_ROOT not set!") + endif() + + # newer versions of TAO (ACE version 5.8.1+) default to generating errors + # for anonymous types. -aw overrides this and makes it a warning + # Nice of them to add new compiler flags as a "patch" update... + if(ACE_VERSION VERSION_GREATER 5.8.0) + # TODO set(TAO_IDL_VER_FLAGS -w -aw -Cw) + endif() + + # FIXME: -in To generate <>s for standard #include'd files (non-changing files) + # TODO list(APPEND TAO_IDL_FLAGS ${TAO_IDL_VER_FLAGS} -in -Wb,pre_include=ace/pre.h -Wb,post_include=ace/post.h) + list( + APPEND + TAO_IDL_FLAGS + ${TAO_IDL_VER_FLAGS} + -in + -Wb,pre_include=ace/pre.h + -Wb,post_include=ace/post.h + -Ssi + -Sci + -Gos + -DGEN_IDL_MAKE_DEPS + ) + message(TRACE "TAO_IDL_FLAGS = ${TAO_IDL_FLAGS}") + + # TODO we should to some system introspection to narrow this list down + # XXX set(TAO_IDL_INCLUDES -I$ENV{TAOX11_ROOT} -I${TAO_ROOT_INCLUDE} -I${TAO_ROOT_INCLUDE}/tao + # XXX -I${TAO_ROOT_INCLUDE}/orbsvcs + # XXX -I${TAO_ROOT_INCLUDE}/orbsvcs/orbsvcs ${TAO_IDL_INCLUDES} + # XXX ) + + # add a custom command set for idl files + # ----------------------------------------------------- + foreach(idl_filename ${ARGN}) + + # get the basename (i.e. "NAME Without Extension") + get_filename_component(IDL_BASE ${idl_filename} NAME_WE) + get_filename_component(IDL_DEP_PATH ${idl_filename} ABSOLUTE) + get_filename_component(IDL_SRC_DIR ${IDL_DEP_PATH} DIRECTORY) + file(RELATIVE_PATH IDL_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${IDL_SRC_DIR}) + #message(WARNING "IDL_PATH=${IDL_PATH}") + + if(IDL_OUTPUT_IN_SOURCE_DIR) + set(SRCDIR ${IDL_SRC_DIR}) + set(OOSDIR ${IDL_SRC_DIR}) + else() # NOTE: OutOffSource Directory used! CK + set(SRCDIR ${IDL_SRC_DIR}) + set(OOSDIR ${CMAKE_CURRENT_BINARY_DIR}/${IDL_PATH}) + #message(WARNING "OOSDIR=${OOSDIR}") + endif() + + set(IDL_OUTPUT_HEADERS ${OOSDIR}/${IDL_BASE}${IDL_CHDR} ${OOSDIR}/${IDL_BASE}${IDL_CINL} + ${OOSDIR}/${IDL_BASE}${IDL_SHDR} + ) + # newer versions of TAO don't generate servant inline files + # not sure what version this happened at, the version + # below is a guess + # XXX if(ACE_VERSION VERSION_LESS 6.0.2) + # XXX message(FATAL_ERROR "ACE_VERSION: ${ACE_VERSION} VERSION_LESS 6.0.2") + list(APPEND IDL_OUTPUT_HEADERS ${OOSDIR}/${IDL_BASE}${IDL_SINL}) + # XXX endif() + + set(IDL_OUTPUT_SOURCES ${OOSDIR}/${IDL_BASE}${IDL_CSRC} ${OOSDIR}/${IDL_BASE}${IDL_SSRC}) + set(IDL_OUTPUT_FILES ${IDL_OUTPUT_HEADERS} ${IDL_OUTPUT_SOURCES}) + + if(EXPORT_NAME) + if(NOT EXTRA_TAO_IDL_ARGS MATCHES ".*export_macro=\"${EXPORT_NAME}\"") + set(EXTRA_TAO_IDL_ARGS ${EXTRA_TAO_IDL_ARGS} -Wb,export_macro="${EXPORT_NAME}") + endif() + endif() + + if(EXPORT_FILE) + if(NOT EXTRA_TAO_IDL_ARGS MATCHES ".*export_include=\"${EXPORT_FILE}\"") + set(EXTRA_TAO_IDL_ARGS ${EXTRA_TAO_IDL_ARGS} -Wb,export_include="${EXPORT_FILE}") + endif() + endif() + + # output files depend on at least the corresponding idl + set(DEPEND_FILE_LIST ${SRCDIR}/${IDL_BASE}.idl) + + file(READ ${idl_filename} IDL_FILE_CONTENTS LIMIT 2048) + #message(WARNING "IDL_FILE_CONTENTS = ${IDL_FILE_CONTENTS}") + + # look for other dependencies + foreach(idl_dep_full_filename ${ARGN}) + get_filename_component(IDL_DEP_BASE ${idl_dep_full_filename} NAME_WE) + if(IDL_FILE_CONTENTS MATCHES ${IDL_DEP_BASE}\\.idl AND NOT idl_dep_full_filename STREQUAL idl_filename) + #message(STATUS "${idl_filename} depends on ${idl_dep_full_filename}") + list(APPEND DEPEND_FILE_LIST ${idl_dep_full_filename}) + endif() + endforeach() + + option(IDL_DEBUG_DEPENDENCIES "" OFF) + if(IDL_DEBUG_DEPENDENCIES) + message(STATUS "--------------------------------------") + message(STATUS " IDL_OUTPUT_FILES=${IDL_OUTPUT_FILES}") + message(STATUS " DEPEND_FILE_LIST=${DEPEND_FILE_LIST}") + message(STATUS " TAO_BIN_VAR=${TAO_BIN_VAR}") + message(STATUS " TAO_LIB_VAR=${TAO_LIB_VAR}") + message(STATUS " TAO_IDL_COMMAND=${TAO_IDL_COMMAND}") + message(STATUS " TAO_IDL_FLAGS=${TAO_IDL_FLAGS}") + message(STATUS "EXTRA_TAO_IDL_ARGS=${EXTRA_TAO_IDL_ARGS}") + endif() + + # setup the command + # ----------------------------------------------------- + add_custom_command( + OUTPUT ${IDL_OUTPUT_FILES} + DEPENDS ${DEPEND_FILE_LIST} + COMMAND ${TAO_BIN_VAR} ${TAO_LIB_VAR} ${TAO_IDL_COMMAND} ARGS ${TAO_IDL_FLAGS} ${EXTRA_TAO_IDL_ARGS} + -I${CMAKE_CURRENT_SOURCE_DIR} ${TAO_IDL_INCLUDES} -o ${OOSDIR} ${IDL_DEP_PATH} + ) + + list(APPEND TAO_IDL_GENERATED_HEADERS ${IDL_OUTPUT_HEADERS}) + list(APPEND TAO_IDL_GENERATED ${IDL_OUTPUT_FILES}) + + endforeach() + +endmacro() diff --git a/cmake/GlobalSettings.cmake b/cmake/GlobalSettings.cmake new file mode 100644 index 0000000..ca84f0e --- /dev/null +++ b/cmake/GlobalSettings.cmake @@ -0,0 +1,33 @@ +include_guard(GLOBAL) + +# require a C++ standard +if(NOT DEFINED CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + option(CMAKE_CXX_EXTENSIONS "" NO) + option(CMAKE_CXX_STANDARD_REQUIRED "" YES) +endif() + +# NOTE: only for MSVC build shared libs (DLL) +include(CMakeDependentOption) +cmake_dependent_option(BUILD_SHARED_LIBS "Build shared instead of static library" YES "MSVC" NO) + +option(BUILD_SHARED_LIBS "Build shared Libraries" NO) +option(USE_POSTFIX "Use postfix for debug" YES) +if(USE_POSTFIX) + set(CMAKE_DEBUG_POSTFIX d) +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +# set this variable to specify a common place where CMake should put all +# libraries and executables (instead of CMAKE_CURRENT_BINARY_DIR) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) + +# ================================ +# add dependencies +# ================================ +include(CPM) + +CPMUsePackageLock(package-lock.cmake) diff --git a/include/.keep b/include/.keep new file mode 100644 index 0000000..e69de29 From d33f6a83e88e8d7c23fecdf3d7214e54b64dca5e Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Wed, 20 Apr 2022 20:56:51 +0200 Subject: [PATCH 16/17] fix CodeFactor issues quote most bash variables --- build-taox11-for-osx.sh | 64 ++++++++++++++++++++++------------------ build-taox11-on-linux.sh | 46 +++++++++++++++-------------- 2 files changed, 59 insertions(+), 51 deletions(-) diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh index d80f24a..93608d5 100755 --- a/build-taox11-for-osx.sh +++ b/build-taox11-for-osx.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # adapted from: # https://github.com/RemedyIT/axcioma/blob/master/.github/workflows/linux.yml @@ -11,9 +11,9 @@ export LANG=C export CC=clang export CXX=clang++ -export WORKSPACE=`realpath ..` -export X11_BASE_ROOT=$WORKSPACE/axcioma -export INSTALL_PREFIX=$X11_BASE_ROOT/stage +export WORKSPACE=$(realpath ..) +export X11_BASE_ROOT="${WORKSPACE}/axcioma" +export INSTALL_PREFIX="${X11_BASE_ROOT}/stage" source .env_add.sh @@ -24,27 +24,27 @@ export BRIX11_NUMBER_OF_PROCESSORS=6 # TODO: force to build only taox11! CK rm -rf ciaox11 dancex11 -rm -f *.log +rm -f ./*.log -$X11_BASE_ROOT/bin/brix11 bootstrap taox11 +"${X11_BASE_ROOT}/bin/brix11" bootstrap taox11 ############################################################ # patch to build ACE with -std=c++20 -cd $ACE_ROOT && git stash && patch -p2 < ../../ACE_Auto_Ptr.patch -cd $X11_BASE_ROOT +cd "${ACE_ROOT}" && git stash && patch -p2 < ../../ACE_Auto_Ptr.patch +cd "${X11_BASE_ROOT}" ############################################################ -$X11_BASE_ROOT/bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT +"${X11_BASE_ROOT}/bin/brix11" configure -W aceroot="${ACE_ROOT}" -W taoroot="${TAO_ROOT}" -W mpcroot="${MPC_ROOT}" # Print brix11 configuration -$X11_BASE_ROOT/bin/brix11 --version -$X11_BASE_ROOT/bin/brix11 env -- configure -P 2>&1 | tee configure.log +"${X11_BASE_ROOT}/bin/brix11" --version +"${X11_BASE_ROOT}/bin/brix11" env -- configure -P 2>&1 | tee configure.log ############################################################ # gen GNUmakefile from workspace.mwc # see taox11/tao/x11/taox11.mpc # and ACE/ACE/ace/ace_for_tao.mpc -# NO! bin/brix11 gen build workspace.mwc -- gen build ${TAOX11_ROOT}/examples -- gen build ${TAOX11_ROOT}/orbsvcs/tests -- gen build ${TAOX11_ROOT}/tests +# NO! "${X11_BASE_ROOT}/bin/brix11" gen build workspace.mwc -- gen build ${TAOX11_ROOT}/examples -- gen build ${TAOX11_ROOT}/orbsvcs/tests -- gen build ${TAOX11_ROOT}/tests ############################################################ # FIXME: quickfixes for OSX @@ -53,7 +53,7 @@ $X11_BASE_ROOT/bin/brix11 env -- configure -P 2>&1 | tee configure.log # ACE/ACE/include/makeinclude/platform_macosx_common.GNU # ACE/ACE/include/makeinclude/platform_macosx.GNU platform_file='include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU' -echo ${platform_file} > ${ACE_ROOT}/include/makeinclude/platform_macros.GNU +echo ${platform_file} > "${ACE_ROOT}/include/makeinclude/platform_macros.GNU" # ACE/ACE/ace/config.h # ACE/ACE/ace/config-macosx.h @@ -66,33 +66,39 @@ echo ${platform_file} > ${ACE_ROOT}/include/makeinclude/platform_macros.GNU # ACE/ACE/ace/config-macosx-mountainlion.h # ACE/ACE/ace/config-macosx-lion.h # ACE/ACE/ace/config-macosx-leopard.h -echo '#include "ace/config-macosx.h"' > ${ACE_ROOT}/ace/config.h -echo '#define throw() noexcept' >> ${ACE_ROOT}/ace/config.h +echo '#include "ace/config-macosx.h"' > "${ACE_ROOT}/ace/config.h" +echo '#define throw() noexcept' >> "${ACE_ROOT}/ace/config.h" # ACE/ACE/bin/MakeProjectCreator/config/default.features -echo 'ipv6=1' > ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -echo 'versioned_namespace=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -echo 'acetaompc=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -echo 'inline=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features -echo 'optimize=1' >> ${ACE_ROOT}/bin/MakeProjectCreator/config/default.features +echo 'ipv6=1' > "${ACE_ROOT}/bin/MakeProjectCreator/config/default.features" +echo 'versioned_namespace=1' >> "${ACE_ROOT}/bin/MakeProjectCreator/config/default.features" +echo 'acetaompc=1' >> "${ACE_ROOT}/bin/MakeProjectCreator/config/default.features" +echo 'inline=1' >> "${ACE_ROOT}/bin/MakeProjectCreator/config/default.features" +echo 'optimize=1' >> "${ACE_ROOT}/bin/MakeProjectCreator/config/default.features" # generate all GNUmakefile's # see workspace.mwc -perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${X11_BASE_ROOT}/workspace.mwc -workers ${BRIX11_NUMBER_OF_PROCESSORS} -perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/orbsvcs/tests -workers ${BRIX11_NUMBER_OF_PROCESSORS} -perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/examples -workers ${BRIX11_NUMBER_OF_PROCESSORS} -perl ${TAOX11_ROOT}/bin/mwc.pl -type gnuace ${TAOX11_ROOT}/tests -workers ${BRIX11_NUMBER_OF_PROCESSORS} +perl "${TAOX11_ROOT}/bin/mwc.pl" -type gnuace "${X11_BASE_ROOT}/workspace.mwc" -workers ${BRIX11_NUMBER_OF_PROCESSORS} +perl "${TAOX11_ROOT}/bin/mwc.pl" -type gnuace "${TAOX11_ROOT}/orbsvcs/tests" -workers ${BRIX11_NUMBER_OF_PROCESSORS} +perl "${TAOX11_ROOT}/bin/mwc.pl" -type gnuace "${TAOX11_ROOT}/examples" -workers ${BRIX11_NUMBER_OF_PROCESSORS} +perl "${TAOX11_ROOT}/bin/mwc.pl" -type gnuace "${TAOX11_ROOT}/tests" -workers ${BRIX11_NUMBER_OF_PROCESSORS} # make all make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} 2>&1 | tee make-all.log -make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log -make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log -make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log +make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${TAOX11_ROOT}/orbsvcs/tests" 2>&1 | tee -a make-all.log +make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${TAOX11_ROOT}/examples" 2>&1 | tee -a make-all.log +make c++20=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${TAOX11_ROOT}/tests" 2>&1 | tee -a make-all.log # make tests -$X11_BASE_ROOT/bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log +"${X11_BASE_ROOT}/bin/brix11" run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log # install -make -j ${BRIX11_NUMBER_OF_PROCESSORS} install 2>&1 | tee make-install.log +make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${X11_BASE_ROOT}" install 2>&1 | tee make-install.log + +find "${INSTALL_PREFIX}/include" -type d -name home -prune -print0 | xargs -0 tree +find "${INSTALL_PREFIX}/include" -type d -name home -prune -print0 | xargs -0 rm -rf + +#FIXME: remove the installed include garbage! CK +rm -rf "${INSTALL_PREFIX}/include" exit 0 diff --git a/build-taox11-on-linux.sh b/build-taox11-on-linux.sh index e186e67..3d348a4 100755 --- a/build-taox11-on-linux.sh +++ b/build-taox11-on-linux.sh @@ -11,9 +11,9 @@ export LANG=C export CC=gcc export CXX=g++ -export WORKSPACE=`realpath ..` -export X11_BASE_ROOT=$WORKSPACE/axcioma -export INSTALL_PREFIX=$X11_BASE_ROOT/stage +export WORKSPACE=$(realpath ..) +export X11_BASE_ROOT="${WORKSPACE}/axcioma" +export INSTALL_PREFIX="${X11_BASE_ROOT}/stage" source .env_add.sh @@ -24,45 +24,47 @@ export BRIX11_NUMBER_OF_PROCESSORS=6 # TODO: force to build only taox11! CK rm -rf ciaox11 dancex11 -rm -f *.log +rm -f ./*.log -bin/brix11 bootstrap taox11 +"${X11_BASE_ROOT}/bin/brix11" bootstrap taox11 ############################################################ # patch to build ACE with -std=c++17 -cd $ACE_ROOT && git stash && patch -p2 < ../../ACE_Auto_Ptr.patch -cd $X11_BASE_ROOT +cd "${ACE_ROOT}" && git stash && patch -p2 < ../../ACE_Auto_Ptr.patch +cd "${X11_BASE_ROOT}" ############################################################ -bin/brix11 configure -W aceroot=$ACE_ROOT -W taoroot=$TAO_ROOT -W mpcroot=$MPC_ROOT +"${X11_BASE_ROOT}/bin/brix11" configure -W aceroot="${ACE_ROOT}" -W taoroot="${TAO_ROOT}" -W mpcroot="${MPC_ROOT}" # Print brix11 configuration -bin/brix11 --version -bin/brix11 env -- configure -P 2>&1 | tee configure.log +"${X11_BASE_ROOT}/bin/brix11" --version +"${X11_BASE_ROOT}/bin/brix11" env -- configure -P 2>&1 | tee configure.log -bin/brix11 gen build workspace.mwc -- gen build ${TAOX11_ROOT}/examples -- gen build ${TAOX11_ROOT}/orbsvcs/tests -- gen build ${TAOX11_ROOT}/tests +"${X11_BASE_ROOT}/bin/brix11" gen build workspace.mwc -- gen build "${TAOX11_ROOT}/examples" -- gen build "${TAOX11_ROOT}/orbsvcs/tests" -- gen build "${TAOX11_ROOT}/tests" # ACE/ACE/ace/config.h #FIXME: NO! echo '#define throw() noexcept' >> ${ACE_ROOT}/ace/config.h -#NO! bin/brix11 make -N -d ${X11_BASE_ROOT} -- make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee make-all.log +#NO! "${X11_BASE_ROOT}/bin/brix11" make -N -d ${X11_BASE_ROOT} -- make -N -d ${TAOX11_ROOT}/examples -- make -N -d ${TAOX11_ROOT}/orbsvcs/tests -- make -N -d ${TAOX11_ROOT}/tests 2>&1 | tee make-all.log # make all -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${X11_BASE_ROOT} 2>&1 | tee make-all.log -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/orbsvcs/tests 2>&1 | tee -a make-all.log -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/examples 2>&1 | tee -a make-all.log -make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C ${TAOX11_ROOT}/tests 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${X11_BASE_ROOT}" 2>&1 | tee make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${TAOX11_ROOT}/orbsvcs/tests" 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${TAOX11_ROOT}/examples" 2>&1 | tee -a make-all.log +make c++17=1 -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${TAOX11_ROOT}/tests" 2>&1 | tee -a make-all.log #TODO: workaround to prevent problems with WSL and windows firewall! CK -egrep "^127.0.1.1\s+$HOSTNAME" /etc/hosts && echo "change to 127.0.0.1!" && exit 1 -#XXX bin/brix11 run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-test.log +grep -E "^127.0.1.1\s+$HOSTNAME" /etc/hosts && echo "change to 127.0.0.1!" && exit 1 +# make tests +"${X11_BASE_ROOT}/bin/brix11" run list -l taox11/bin/taox11_tests.lst -r taox11 2>&1 | tee run-list.log -make -j -C ${X11_BASE_ROOT} install 2>&1 | tee make-install.log +# install +make -j ${BRIX11_NUMBER_OF_PROCESSORS} -C "${X11_BASE_ROOT}" install 2>&1 | tee make-install.log -find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs tree -find ${INSTALL_PREFIX}/include -type d -name home -prune | xargs rm -rf +find "${INSTALL_PREFIX}/include" -type d -name home -prune -print0 | xargs -0 tree +find "${INSTALL_PREFIX}/include" -type d -name home -prune -print0 | xargs -0 rm -rf #FIXME: remove the installed include garbage! CK -rm -rf ${INSTALL_PREFIX}/include +rm -rf "${INSTALL_PREFIX}/include" exit 0 From cb0f9886c3efccb9a1690e33eccd6d296428b8b6 Mon Sep 17 00:00:00 2001 From: ClausKlein Date: Thu, 21 Apr 2022 09:25:46 +0200 Subject: [PATCH 17/17] change way to do what is needed to build on OSX! --- build-taox11-for-osx.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build-taox11-for-osx.sh b/build-taox11-for-osx.sh index 93608d5..b27a15a 100755 --- a/build-taox11-for-osx.sh +++ b/build-taox11-for-osx.sh @@ -29,7 +29,7 @@ rm -f ./*.log "${X11_BASE_ROOT}/bin/brix11" bootstrap taox11 ############################################################ -# patch to build ACE with -std=c++20 +# patch to build ACE with -std=c++17 cd "${ACE_ROOT}" && git stash && patch -p2 < ../../ACE_Auto_Ptr.patch cd "${X11_BASE_ROOT}" ############################################################ @@ -52,8 +52,8 @@ cd "${X11_BASE_ROOT}" # ACE/ACE/include/makeinclude/platform_clang_common.GNU # ACE/ACE/include/makeinclude/platform_macosx_common.GNU # ACE/ACE/include/makeinclude/platform_macosx.GNU -platform_file='include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU' -echo ${platform_file} > "${ACE_ROOT}/include/makeinclude/platform_macros.GNU" +echo 'include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU' > +${platform_file} > "${ACE_ROOT}/include/makeinclude/platform_macros.GNU" # ACE/ACE/ace/config.h # ACE/ACE/ace/config-macosx.h @@ -67,6 +67,7 @@ echo ${platform_file} > "${ACE_ROOT}/include/makeinclude/platform_macros.GNU" # ACE/ACE/ace/config-macosx-lion.h # ACE/ACE/ace/config-macosx-leopard.h echo '#include "ace/config-macosx.h"' > "${ACE_ROOT}/ace/config.h" +# patch to build ACE with -std=c++20 echo '#define throw() noexcept' >> "${ACE_ROOT}/ace/config.h" # ACE/ACE/bin/MakeProjectCreator/config/default.features