[omniORB] --disable-longdouble configure option not working
pascal.moucheront at univ-eiffel.fr
pascal.moucheront at univ-eiffel.fr
Wed Jun 1 12:54:20 UTC 2022
Hello,
I'm trying to cross-compile omniORB for an arm target on a linux/x86_64 host.
As the target system is 32bits, I need to use the --disable-longdouble configure option,
which does not produce the expected effect (build fails).
The setup to cross-compile is a little heavy, so I have tested this scenario
in a docker container.
I hope the Dockerfile, the patch and the script below are self-explanatory enough.
Anyway, the problem seems to come from a tiny typo in src/lib/omniORB/dir.mk
Best Regards
Pascal Moucheront
System:
- Debian 11 (bullseye) x86_64
- omniORB-4.3-latest.tar.gz (from sourceforge)
Steps to reproduce:
1) copy files to an empty directory
$ cp Dockerfile <my-dir>
$ cp dir.mk.patch <my-dir>
$ cp build-omni-latest-x86_64-arm.sh <my-dir>
$ chmod +x <my-dir>/build-omni-latest-x86_64-arm.sh
2) build container
$ cd <my-dir>
$ docker build --tag deb11-x86_64-arm .
3) run container
$ docker run \
--rm \
--name deb11-x86_64-arm \
--user root \
-v `pwd`:/home/ettnavier \
-dit \
deb11-x86_64-arm
4) execute script
$ ./build-omni-latest-x86_64-arm.sh
If the patch step is commented, the build fails:
[...]
/home/ettnavier/omniorb/install-linux-x86_64/bin/omniidl
-bcxx
-p../../../../src/lib/omniORB/python3
-I../../../../idl
-Wbdebug -Wba
-p../../../../src/lib/omniORB/python3
-I../../../../idl
-Wbdebug
-v -nf -P
-UHAS_LongDouble
-WbF -ComniORB4
../../../../idl/corbaidl.idl
omniidl: Importing back-end 'cxx'
omniidl: 'cxx' imported from '../../../../src/lib/omniORB/python3/omniidl_be/cxx/__init__.py'
omniidl: Preprocessing '../../../../idl/corbaidl.idl'
with '/home/ettnavier/omniorb/install-linux-x86_64/bin/omnicpp
-lang-c++
-undef
-D__OMNIIDL__=0x2630
-I "../../../../idl"
-I "../../../../idl"
-DOMNI_HAS_LongLong -DOMNI_HAS_LongDouble
-UHAS_LongDouble
-D__OMNIIDL_CXX__
"../../../../idl/corbaidl.idl"'
omniidl: Running front end
omniidl: Running back-end 'cxx'
[...]
arm-linux-gnueabihf-g++ -c -O3 -Wall -Wno-unused -fexceptions
-I.. -I../../../../../src/lib/omniORB/orbcore/..
-I../../../../include/omniORB4/internal -I../../../../../include/omniORB4/internal
-D_REENTRANT -DUSE_omniORB_logStream -D_OMNIORB_LIBRARY
-DOMNIORB_VERSION_STRING='"4.3.0"' -DOMNIORB_VERSION_HEX='0x040300f1'
-DCONFIG_DEFAULT_LOCATION='"/etc/omniORB.cfg"' -DCONFIG_ENV='"OMNIORB_CONFIG"'
-DUnixArchitecture
-I. -I../../../../../src/lib/omniORB/orbcore -I../../../../include
-I../../../../../include
-D__OSVERSION__=2 -D__linux__ -D__arm__
-o static/anonObject.o
../../../../../src/lib/omniORB/orbcore/anonObject.cc
In file included from ../../../../../include/omniORB4/CORBA.h:122,
from ../../../../../src/lib/omniORB/orbcore/anonObject.cc:29:
../omniORB4/corbaidl_defs.hh:2076:66: error: 'LongDouble' is not a member of 'CORBA'; did you mean 'LongDoubleSeq'?
-------------------------------------------------------------------------
Dockerfile
-------------------------------------------------------------------------
FROM debian:bullseye
ARG APP_UID=2000
ARG APP_GID=2000
MAINTAINER ETT Navier <pascal.moucheront at univ-eiffel.fr>
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
make \
curl \
g++ \
python3-dev \
g++-arm-linux-gnueabihf \
patch
RUN groupadd -g "$APP_GID" ettnavier
RUN useradd -u "$APP_UID" -g "$APP_GID" -ms /bin/bash ettnavier
USER ettnavier
WORKDIR /home/ettnavier
COPY dir.mk.patch /home/ettnavier
-------------------------------------------------------------------------
dir.mk.patch
-------------------------------------------------------------------------
--- omniorb/src/lib/omniORB/dir.mk 2021-03-01 01:15:21.000000000 +0100
+++ omniorb/src/lib/omniORB/dir.mk 2022-06-01 12:49:26.326900107 +0200
@@ -93,7 +93,7 @@
######################################################################
ifdef DisableLongDouble
-UNDEFINES = -UHAS_LongDouble
+UNDEFINES = -UOMNI_HAS_LongDouble
endif
OMNIORB_IDL += -p$(BASE_OMNI_TREE)/src/lib/omniORB/$(PYSUBDIR) -I$(BASE_OMNI_TREE)/idl -Wbdebug
-------------------------------------------------------------------------
build-omni-latest-x86_64-arm.sh
-------------------------------------------------------------------------
#!/usr/bin/env bash
set -e
# setup working dir
HOMEDIR="/home/ettnavier"
IMAGE="deb11-x86_64-arm"
BASEDIR="omniorb"
docker exec --workdir ${HOMEDIR} ${IMAGE} \
rm -rf ${BASEDIR}
docker exec --workdir ${HOMEDIR} ${IMAGE} \
mkdir -p ${BASEDIR}
# download omniorb-latest
WORKDIR="${HOMEDIR}/${BASEDIR}"
docker exec --workdir ${WORKDIR} ${IMAGE} \
curl \
--output omniORB-4.3-latest.tar.gz \
https://omniorb.sourceforge.io/snapshots/omniORB-4.3-latest.tar.gz
docker exec --workdir ${WORKDIR} ${IMAGE} \
tar --strip-components=1 -xzf omniORB-4.3-latest.tar.gz
docker exec --workdir ${WORKDIR} ${IMAGE} \
rm omniORB-4.3-latest.tar.gz
# optionally patch to correct for --disable-longdouble ineffective option
#docker exec --workdir ${HOMEDIR} ${IMAGE} \
# patch --verbose omniorb/src/lib/omniORB/dir.mk dir.mk.patch
# configure, build and install omniorb for x86_64
X86_64_BUILDDIR="build-linux-x86_64"
X86_64_INSTALLDIR="install-linux-x86_64"
docker exec --workdir ${WORKDIR} ${IMAGE} \
mkdir -p ${X86_64_BUILDDIR}
docker exec --workdir ${WORKDIR} ${IMAGE} \
mkdir -p ${X86_64_INSTALLDIR}
CURDIR="${HOMEDIR}/${BASEDIR}/${X86_64_BUILDDIR}"
docker exec --workdir ${CURDIR} ${IMAGE} \
../configure \
--prefix=${HOMEDIR}/${BASEDIR}/${X86_64_INSTALLDIR} \
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
docker exec --workdir ${CURDIR} ${IMAGE} \
make
docker exec --workdir ${CURDIR} ${IMAGE} \
make install
# configure, build and install omniorb for arm
ARM_BUILDDIR="build-linux-arm"
ARM_INSTALLDIR="install-linux-arm"
docker exec --workdir ${WORKDIR} ${IMAGE} \
mkdir -p ${ARM_BUILDDIR}
docker exec --workdir ${WORKDIR} ${IMAGE} \
mkdir -p ${ARM_INSTALLDIR}
CURDIR="${HOMEDIR}/${BASEDIR}/${ARM_BUILDDIR}"
docker exec --workdir ${CURDIR} ${IMAGE} \
/bin/bash -c "export PATH=${HOMEDIR}/${BASEDIR}/${X86_64_INSTALLDIR}/bin:$PATH && ../configure --prefix=${HOMEDIR}/${BASEDIR}/${ARM_INSTALLDIR} --disable-longdouble --build=x86_64-unknown-linux-gnu --host=arm-linux-gnueabihf"
docker exec --workdir ${CURDIR} ${IMAGE} \
make
docker exec --workdir ${CURDIR} ${IMAGE} \
make install
More information about the omniORB-list
mailing list