Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Building ACE+TAO for ARM processor

1,200 views
Skip to first unread message

Chong

unread,
Dec 4, 2011, 6:26:31 PM12/4/11
to
Hi,

I am trying to build ACE+TAO 6.0.5 for ARM processor using the
toolchain I built from
uclibC "buildroot.11.11" version and I am getting an error as
follows. Can anyone please
let me know what is causing the problem?

% /opt/tools/ACE_wrappers_arm-linux/ace$ make
make[1]: Entering directory `/opt/tools/ACE_wrappers_arm-linux/
ace'

GNUmakefile: /opt/tools/ACE_wrappers_arm-linux/ace/
GNUmakefile.ACE MAKEFLAGS=w

/opt/tools/arm-tools/usr/bin/arm-linux-g++ -W -Wall -Wpointer-
arith -pipe -O3 -g -fno-implicit-templates -Wno-deprecated -
D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -I/opt/
tools/ACE_wrappers_arm-linux -D__ACE_INLINE__ -I.. -
DACE_AS_STATIC_LIBS -c -o arm-linux.obj/Local_Name_Space.o
Local_Name_Space.cpp
In file included from /opt/tools/ACE_wrappers_arm-linux/ace/
OS_NS_stropts.h:32:0,
from /opt/tools/ACE_wrappers_arm-linux/ace/
OS_NS_sys_socket.h:30,
from /opt/tools/ACE_wrappers_arm-linux/ace/ACE.inl:8,
from /opt/tools/ACE_wrappers_arm-linux/ace/ACE.h:886,
from /opt/tools/ACE_wrappers_arm-linux/ace/
Malloc_T.cpp:16,
from /opt/tools/ACE_wrappers_arm-linux/ace/Malloc_T.h:
885,
from /opt/tools/ACE_wrappers_arm-linux/ace/
Local_Name_Space.h:20,
from Local_Name_Space.cpp:3:
/opt/tools/ACE_wrappers_arm-linux/ace/os_include/os_stropts.h:
58:28: fatal error: stropts.h: No such file or directory
compilation terminated.
make[1]: *** [arm-linux.obj/Local_Name_Space.o] Error 1
make[1]: Leaving directory `/opt/tools/ACE_wrappers_arm-linux/
ace'
make: *** [ACE] Error 2
% /opt/tools/ACE_wrappers_arm-linux/ace$

Below is the PRF form for this issue:
=================================================================

ACE VERSION: 6.0.5

HOST MACHINE and OPERATING SYSTEM:
Ubutu Linux 11.10 with Kernel 3.0.0-13

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL):
- Linux with Kernel 2.6.38.8
- Cross Compiler GCC 4.6.2 toolchain for ARM processor built
from
uclibC buildroot.2011.11 version

THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
specific file, simply state which one]:

#define ACE_HAS_GPERF
#define ACE_NTRACE 1
#include "ace/config-linux.h"

THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE

debug=1
static_libs_only=1
include $(ACE_ROOT)/include/makeinclude/platform_ARM.GNU
TAO_IDL := $(HOST_ROOT)/bin/tao_idl
TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/gperf
TAO_IDL_DEP := $(HOST_ROOT)/bin/tao_idl$(EXEEXT)

THE $ACE_ROOT/include/makeinclude/platform_ARM.GNU FILE

# platform_ARM.GNU (based on platform_linux.GNU + toolchain
redirectation)
# Builds ACE/TAO with ARM cross tools

#ARM=1 TIMESYS = 1
#CROSS-COMPILE = 1
#CROSS-COMPILE = 0
OS = linux

ifndef exceptions
exceptions = 1
endif
ifeq (,$(debug))
debug = 0
endif
ifeq (,$(optimize))
optimize = 1
endif
ifeq (,$(threads))
threads = 1
endif
ifeq ($(threads),0)
CPPFLAGS += -DACE_MT_SAFE=0
endif # threads

#shared_libs = 1
static_libs = 1

ifeq (,$(ARM_ROOT))
default:
@ERROR: you must set your ARM_ROOT environment variable
endif # ARM_ROOT

#ifeq (,$(TS_SDK_PREFIX))
# default:
# @ERROR: you must set your TS_SDK_PREFIX environment variable
#endif # TS_SDK_PREFIX

# update the path to include our toolchain directory if it's
not there already
#ifeq (,$(findstring $(HOST_DIR)/bin,$(PATH)))
# PATH := $(PATH):$(TS_SDK_DIR)/bin
#endif # PATH

ifeq (,$(PERL_PATH))
PERL_PATH = perl
endif # ! PERL_PATH

# point to our cross-compiler toolchain
CROSS_COMPILE = $(ARM_ROOT)/bin/arm-linux

CXX = $(CROSS_COMPILE)-g++
CC = $(CROSS_COMPILE)-gcc
AS = $(CROSS_COMPILE)-as
AR = $(CROSS_COMPILE)-ar
NM = $(CROSS_COMPILE)-nm
LD = $(CROSS_COMPILE)-ld
OBJDUMP = $(CROSS_COMPILE)-objdump
OBJCOPY = $(CROSS_COMPILE)-objcopy
RANLIB = $(CROSS_COMPILE)-ranlib
STRIP = $(CROSS_COMPILE)-strip

ifeq ($(shared_libs),1)
SHARED_LIBS = 1
endif
ifeq ($(shared_libs_only),1)
SHARED_LIBS = 1
endif

CFLAGS += -W -Wall -Wpointer-arith -pipe
ifeq ($(threads),1)
CPPFLAGS += -D_POSIX_THREADS -
D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT \
$(PLATFORM_AIO_SUPPORT)
endif # threads

ifeq ($(IMPLICIT_TEMPLATES_FLAG),)
IMPLICIT_TEMPLATES_FLAG=-fno-implicit-templates
endif

CCFLAGS += $(CFLAGS) $(IMPLICIT_TEMPLATES_FLAG) -Wno-deprecated
DCFLAGS += -g
DLD = $(CXX)
LD = $(CXX)
LIBS += -ldl

ifeq ($(threads),1)
LIBS += -lpthread
ifeq (-DACE_HAS_AIO_CALLS,$(PLATFORM_AIO_SUPPORT))
LIBS += -lrt
endif
endif

OCFLAGS += -O3
PIC = -fPIC
#AR = ar
ARFLAGS = rsuv
SOFLAGS = $(CPPFLAGS) -shared
SOBUILD = $(COMPILE.cc) $(PIC) -o $(VSHDIR)$*.so $<; \
$(SOLINK.cc) -o $@ $(LDFLAGS) $(VSHDIR)$*.o
PRELIB = @true

# Added line below to support "Executable Shared Object" files
(as
# needed by the service configurator).
# Marius Kjeldahl <mar...@sn.no, mar...@funcom.com>
ifeq ($(threads),1)
ESOBUILD = $(COMPILEESO.cc) $(PIC) -shared -o $(VSHDIR)
$*.so $<
ifndef PRELIB
PRELIB = @true
endif # ! PRELIB
endif

# not sure why this is necessary, check to see if ACE_CC is
used elsewhere
ACE_CC := $(CC)

# the scripts don't detect this correctly, so set manually here
ACE_HAS_GNUG_PRE_2_8 = 0

BUILD METHOD USED:
GNUmakefile generated by "mwc.pl -type gnuace" command

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/
default.features
No default/features file available

AREA/CLASS/EXAMPLE AFFECTED:
Local_Name_Space.cpp failed to compile

DOES THE PROBLEM AFFECT:
COMPILATION? YES
LINKING? NO
On Unix systems, did you run make realclean first?
EXECUTION? NO
OTHER (please specify)?

SYNOPSIS:

To build ACE+TAO using Cross Compiler GCC 4.6.2 for ARM
processor
failed.

DESCRIPTION:

I am trying to build ACE+TAO using Cross Compiler for ARM
processor
and getting an error as follows:

% /opt/tools/ACE_wrappers_arm-linux/ace$ make
make[1]: Entering directory `/opt/tools/ACE_wrappers_arm-linux/
ace'

GNUmakefile: /opt/tools/ACE_wrappers_arm-linux/ace/
GNUmakefile.ACE MAKEFLAGS=w

/opt/tools/arm-tools/usr/bin/arm-linux-g++ -W -Wall -Wpointer-
arith -pipe -O3 -g -fno-implicit-templates -Wno-deprecated -
D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT -I/opt/
tools/ACE_wrappers_arm-linux -D__ACE_INLINE__ -I.. -
DACE_AS_STATIC_LIBS -c -o arm-linux.obj/Local_Name_Space.o
Local_Name_Space.cpp
In file included from /opt/tools/ACE_wrappers_arm-linux/ace/
OS_NS_stropts.h:32:0,
from /opt/tools/ACE_wrappers_arm-linux/ace/
OS_NS_sys_socket.h:30,
from /opt/tools/ACE_wrappers_arm-linux/ace/ACE.inl:8,
from /opt/tools/ACE_wrappers_arm-linux/ace/ACE.h:886,
from /opt/tools/ACE_wrappers_arm-linux/ace/
Malloc_T.cpp:16,
from /opt/tools/ACE_wrappers_arm-linux/ace/Malloc_T.h:
885,
from /opt/tools/ACE_wrappers_arm-linux/ace/
Local_Name_Space.h:20,
from Local_Name_Space.cpp:3:
/opt/tools/ACE_wrappers_arm-linux/ace/os_include/os_stropts.h:
58:28: fatal error: stropts.h: No such file or directory
compilation terminated.
make[1]: *** [arm-linux.obj/Local_Name_Space.o] Error 1
make[1]: Leaving directory `/opt/tools/ACE_wrappers_arm-linux/
ace'
make: *** [ACE] Error 2
% /opt/tools/ACE_wrappers_arm-linux/ace$

REPEAT BY:
cd $ACE_ROOT/ace
mwc.pl -type gnuace
make

SAMPLE FIX/WORKAROUND:
NONE
===========================================================

Thanks,

Chong Pak

Thomas Arnbjerg

unread,
Dec 5, 2011, 2:19:27 AM12/5/11
to
I've built ACE for Linux on the ARM platform - but with glibc and I
used the CodeSourcery toolchain.

My config.h simply includes config-linux.h

Contents of my platform_macros.GNU (which i think is the one I used):

CROSS-COMPILE=1,

shared_libs = 0

static_libs = 1

debug=0

inline=1

ssl=0

threads=1

nptl=1





CCFLAGS += -fmessage-length=0 -mcpu=arm926ej-s



include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU



# point to our cross-compiler toolchain

CROSS_COMPILE = $(CS_ROOT)/arm-none-linux-gnueabi




CXX = $(CROSS_COMPILE)-g++

CC = $(CROSS_COMPILE)-gcc

AS = $(CROSS_COMPILE)-as

AR = $(CROSS_COMPILE)-ar

NM = $(CROSS_COMPILE)-nm

LD = $(CROSS_COMPILE)-ld

OBJDUMP = $(CROSS_COMPILE)-objdump

OBJCOPY = $(CROSS_COMPILE)-objcopy

RANLIB = $(CROSS_COMPILE)-ranlib

STRIP = $(CROSS_COMPILE)-strip


Hope it helps..

Thomas
>        # Marius Kjeldahl <mari...@sn.no, mar...@funcom.com>

Johnny Willemsen

unread,
Dec 5, 2011, 3:54:14 AM12/5/11
to Thomas Arnbjerg, ace-...@list.isis.vanderbilt.edu
Hi,

If you put CROSS_COMPILE before the include of platform_linux you don't
need to set all tools by hand, see the config page of IBM Cell builds on
the main scoreboard at
http://www.dre.vanderbilt.edu/scoreboard/integrated.html

Johnny

Chong

unread,
Dec 5, 2011, 11:52:11 PM12/5/11
to
On Dec 5, 3:54 am, Johnny Willemsen <jwillem...@remedy.nl> wrote:
> Hi,
>
> If you put CROSS_COMPILE before the include of platform_linux you don't
> need to set all tools by hand, see the config page of IBM Cell builds on
> the main scoreboard athttp://www.dre.vanderbilt.edu/scoreboard/integrated.html
> ...
>
> read more »

Hi Johnny,

I modifed the "config.h" and "platform_macros.GNU" file as follows:
=================== config.h ===========================

#define CIAO_PRE_ESTABLISH_CONNECTIONS 1
#define TAO_USE_DOTTED_DECIMAL_ADDRESSES 1
#define ACE_HAS_REACTOR_NOTIFICATION_QUEUE 1
#include "ace/config-linux.h"

=================== platform_macros.GNU ================

cross_compile=1
shared_libs = 0
static_libs = 1
debug=0
optimize=1
inline=1
ssl=1
zlib=1
boost=0
CROSS_COMPILE=$(ARM_ROOT)/bin/arm-unknown-linux-uclibcgnueabi-
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU

==================================================

But I am still getting an error as follows:

==================================================
$ cd $ACE_ROOT/ace
$ /opt/tools/ACE_wrappers_arm-linux/ace
$ /opt/tools/ACE_wrappers_arm-linux/ace$ mwc.pl -type gnuace
Using .../tools/ACE_wrappers_arm-linux/bin/MakeProjectCreator/config/
MPC.cfg
CIAO_ROOT was used in the configuration file, but was not defined.
DANCE_ROOT was used in the configuration file, but was not defined.
'dynamic_types' directory /opt/tools/ACE_wrappers_arm-linux/TAO/DDS/
MPC not found.
Generating 'gnuace' output using default input
Skipping ACE_FOR_TAO (ace_for_tao.mpc), it requires ace_for_tao.
Skipping ACE_FoxReactor (ace_foxreactor.mpc), it requires fox.
Skipping ace_svcconf_gen (svcconfgen.mpc), it requires
ace_svcconf_gen.
Skipping SSL_FOR_TAO (ssl_for_tao.mpc), it requires ace_for_tao.
Skipping QoS (qos.mpc), it requires qos.
Generation Time: 7s
cpak@genesis:/opt/tools/ACE_wrappers_arm-linux/ace$
cpak@genesis:/opt/tools/ACE_wrappers_arm-linux/ace$ make
make[1]: Entering directory `/opt/tools/ACE_wrappers_arm-linux/ace'

GNUmakefile: /opt/tools/ACE_wrappers_arm-linux/ace/GNUmakefile.ACE
MAKEFLAGS=w

/opt/tools/arm-tools/usr/bin/arm-unknown-linux-uclibcgnueabi-g++ -fno-
strict-aliasing -O3 -pthread -Wall -W -Wpointer-arith -pipe -
D_GNU_SOURCE -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -DNDEBUG -I/opt/tools/
ACE_wrappers_arm-linux -DACE_NDEBUG -D__ACE_INLINE__ -I.. -
DACE_AS_STATIC_LIBS -c -o arm-linux.obj/Local_Name_Space.o
Local_Name_Space.cpp
In file included from /opt/tools/ACE_wrappers_arm-linux/ace/
OS_NS_stropts.h:32:0,
from /opt/tools/ACE_wrappers_arm-linux/ace/
OS_NS_sys_socket.h:30,
from /opt/tools/ACE_wrappers_arm-linux/ace/ACE.inl:8,
from /opt/tools/ACE_wrappers_arm-linux/ace/ACE.h:886,
from /opt/tools/ACE_wrappers_arm-linux/ace/
Malloc_T.cpp:16,
from /opt/tools/ACE_wrappers_arm-linux/ace/Malloc_T.h:
885,
from /opt/tools/ACE_wrappers_arm-linux/ace/
Local_Name_Space.h:20,
from Local_Name_Space.cpp:3:
/opt/tools/ACE_wrappers_arm-linux/ace/os_include/os_stropts.h:58:28:
fatal error: stropts.h: No such file or directory
compilation terminated.
make[1]: *** [arm-linux.obj/Local_Name_Space.o] Error 1
make[1]: Leaving directory `/opt/tools/ACE_wrappers_arm-linux/ace'
make: *** [ACE] Error 2
$ /opt/tools/ACE_wrappers_arm-linux/ace$

===============================================================

Can you let me know what is causing the problem?

Thanks,

Chong

Johnny Willemsen

unread,
Dec 6, 2011, 3:06:40 AM12/6/11
to
Hi,

Your configuration files now look ok, but it seems we are supporting
ulibC not at this moment.

Regards,

Johnny

On 12/06/2011 05:52 AM, Chong wrote:
> On Dec 5, 3:54 am, Johnny Willemsen<jwillem...@remedy.nl> wrote:
>> Hi,
>>
>> If you put CROSS_COMPILE before the include of platform_linux you don't
>> need to set all tools by hand, see the config page of IBM Cell builds on
>> the main scoreboard athttp://www.dre.vanderbilt.edu/scoreboard/integrated..html

Chong

unread,
Dec 9, 2011, 11:14:59 PM12/9/11
to
> ...
>
> read more »

Hi Johnny,

Thank you for your response and help for platform_macros.GNU
configuration.
I spent some time to create the "config.h" as follows:
=========================================
#ifndef ACE_CONFIG_H
#define ACE_CONFIG_H

#include "ace/config-linux.h"

#define ACE_LACKS_STROPTS_H
#if defined (ACE_HAS_STRBUF_T)
#undef ACE_HAS_STRBUF_T
#endif
#if defined (ACE_HAS_PTHREAD_SETSTACK)
#undef ACE_HAS_PTHREAD_SETSTACK
#endif
#define ACE_LACKS_PTHREAD_SETSTACK
#if defined (ACE_HAS_AIO_CALLS)
#undef ACE_HAS_AIO_CALLS
#endif
#if defined (ACE_HAS_GETIFADDRS)
#undef ACE_HAS_GETIFADDRS
#endif
#define ACE_LACKS_STRRECVFD

#define ACE_HAS_CPU_SET_T

#if defined (ACE_SCANDIR_CMP_USES_VOIDPTR)
#undef ACE_SCANDIR_CMP_USES_VOIDPTR
#endif

#if defined (ACE_SCANDIR_CMP_USES_CONST_VOIDPTR)
#undef ACE_SCANDIR_CMP_USES_CONST_VOIDPTR
#endif

#if defined (ACE_HAS_EXECINFO_H)
#undef ACE_HAS_EXECINFO_H
#endif

#if defined(__GLIBC__)
#undef __GLIBC__
#endif

#if defined(ACE_HAS_SEMUN)
#undef ACE_HAS_SEMUN
#endif

#define ACE_LACKS_NETDB_REENTRANT_FUNCTIONS
#define ACE_LACKS_GETLOADAVG

#endif /* ACE_CONFIG_H_ */
==============================================

and "platform_macros.GNU" file as follows:cross_compile=1
shared_libs=0
static_libs=1
debug=0
optimize=1
inline=0
ssl=0
zlib=1
boost=0
no_hidden_visibility=1
TAO_IDL := $(HOST_ROOT)/bin/tao_idl
TAO_IDLFLAGS += -g $(HOST_ROOT)/bin/gperf
TAO_IDL_DEP := $(HOST_ROOT)/bin/tao_idl$(EXEEXT)
CROSS_COMPILE=$(ARM_ROOT)/bin/arm-linux-
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
==================================================

I downloaded the latest version of DOCGroup ACE+TAO micro version
(6.0.6)
and OCI OpenDDS 3.0.1 and built them by using the toolchain I built
from uClibc
"buildroot.11.11" version successfully. I was able to run some ACE
examples,
TAO examples, and DDS examples successfully on the ARM processor
target
machine.

Thank you for your help,

Chong Pak
0 new messages