First things first, here is the PRF:
TAO VERSION: 1.4.6
ACE VERSION: 5.4.6
HOST MACHINE and OPERATING SYSTEM:
If on Windows based OS's, which version of WINSOCK do you
use?:
x86, QNX 6.30
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:
config-qnx-rtp-62x.h
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you
use a link to a platform-specific file, simply state which one
(unless this isn't used in this case, e.g., with Microsoft Visual
C++)]:
platform_qnx_rtp_gcc.GNU
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
(used by MPC when you generate your own makefiles):
AREA/CLASS/EXAMPLE AFFECTED:
[What example failed? What module failed to compile?]
DOES THE PROBLEM AFFECT:
COMPILATION?
If so, what do your $ACE_ROOT/ace/config.h and
$ACE_ROOT/include/makeinclude/platform_macros.GNU contain?
LINKING?
On Unix systems, did you run make realclean first?
EXECUTION?
OTHER (please specify)?
compile and run; see below
[Please indicate whether ACE/TAO, your application, or both are affected.]
SYNOPSIS:
[Brief description of the problem]
Problems to compile ACE, TAO under QNX 6.3 with support for
mutithreading and exceptions; see below.
DESCRIPTION:
Due to problems with the compiler-setup on the QNX-box and also
problems with ace+tao regarding multithreading and exceptions -features
when compiled with gcc 2.95.3 under QNX 6.2.1 I made a little Howto to
get ace and tao to be compiled with gcc 3.3.1 under QNX6.3.0SP1:
(note that qcc, QCC are wrappers for gcc!)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# HOWTO build ACE 5.4.6 + TAO 1.4.6 on QNX 6.3 with gcc 3.3.1
#
# Ingo Brauckhoff 2005-07-19
# University of Siegen
#
I. prepare QNX
~ set environment variable:
QCC_CONF_PATH=/usr/qnx630/host/qnx6/x86/etc/qcc
~ set gcc 3.3.1 as default:
qcc -V3.3.1,gcc_ntox86_gpp -set-default
~ edit symbolic link in $QCC_CONF_PATH/gcc/3.3.1/:
gcc_ntox86_gpp.conf => gcc_ntox86_gpp++.conf
(was => gcc_ntox86.conf)
II. prepare ACE
~ touch $ACE_ROOT/ace/config.h
insert:
#define QNX
#define ACE_DEFAULT_THREAD_PRIORITY 10
#define PTHREAD_MIN_PRIORITY 1
#define PTHREAD_MAX_PRIORITY 63
#include "config-qnx-rtp-62x.h"
~ edit $ACE_ROOT/ace/os_include/os_pthread.h:
add lines after line #191
# elif defined (QNX)
# if !defined (ACE_THR_PRI_FIFO_MIN)
# define ACE_THR_PRI_FIFO_MIN (long) 1
# endif /* !ACE_THR_PRI_FIFO_MIN */
# if !defined (ACE_THR_PRI_FIFO_MAX)
# define ACE_THR_PRI_FIFO_MAX (long) 63
# endif /* !ACE_THR_PRI_FIFO_MAX */
# if !defined (ACE_THR_PRI_RR_MIN)
# define ACE_THR_PRI_RR_MIN (long) 1
# endif /* !ACE_THR_PRI_RR_MIN */
# if !defined (ACE_THR_PRI_RR_MAX)
# define ACE_THR_PRI_RR_MAX (long) 63
# endif /* !ACE_THR_PRI_RR_MAX */
# if !defined (ACE_THR_PRI_OTHER_MIN)
# define ACE_THR_PRI_OTHER_MIN (long) 1
# endif /* !ACE_THR_PRI_OTHER_MIN */
# if !defined (ACE_THR_PRI_OTHER_MAX)
# define ACE_THR_PRI_OTHER_MAX (long) 63
# endif /* !ACE_THR_PRI_OTHER_MAX */
~ in $ACE_ROOT/include/makeinclude/ make symlink:
platform_macros.GNU => platform_qnx_rtp_gcc.GNU
~ edit platform_macros.GNU:
CC = qcc -V3.3.1,gcc_ntox86_gpp
CXX = QCC -V3.3.1,gcc_ntox86_gpp
add to CFLAGS ans CPPFLAGS:
-U__NO_INLINE__ -fno-builtin -lang-c++
delete the -W -Wall -Wpointer-arith (they're useless with qcc;
if desired these options could be added to the gcc_ntox86_gpp++.conf)
~ edit platform_g++_common.GNU:
add
templates = automatic
after the 'ifndef templates' cascade. (TAO doesn't like explicit
templates)
III. prepare TAO
~ edit $TAO_ROOT/tao/params.i and have
ACE_INLINE long TAO_ORB_Parameters::sched_policy (void) const
and
ACE_INLINE long TAO_ORB_Parameters::scope_policy (void) const
=> return 0;
(scope_policy and sched_policy obviously don't work under QNX6)
~ in $TAO_ROOT/TAO_IDL and $TAO_ROOT/orbsvcs/IFR_SERVICE
edit
GNUmakefile.TAO_IDL_EXE
GNUmakefile.TAO_IFR_EXE
set
-DTAO_IDL_PREPROCESSOR=\"QCC\"
IV. Make.
~ make in
$ACE_ROOT/ace/
$ACE_ROOT/apps/gperf/
$TAO_ROOT/tao/
$TAO_ROOT/TAO_IDL/
$TAO_ROOT/orbsvcs/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bye,
Ingo
--
Ingo Brauckhoff
University of Siegen
________________________________
>Question:
>
>Is this with dynamic libraries? I could only get QNX to run with static libs.
>
>
Yes. All dynamic.
>________________________________
>
> Due to problems with the compiler-setup on the QNX-box and also
>problems with ace+tao regarding multithreading and exceptions -features
>when compiled with gcc 2.95.3 under QNX 6.2.1 I made a little Howto to
>get ace and tao to be compiled with gcc 3.3.1 under QNX6.3.0SP1:
>(note that qcc, QCC are wrappers for gcc!)
>
>
--
Ingo Brauckhoff