f



[tao-users] Cross compilation error

ACE VERSION: 
    ACE version 6.0.0
    TAO version 2.0.0

    ACE version 5.7.0
    TAO version 1.7.0
 
 
HOST MACHINE and OPERATING SYSTEM:
    Desk Top PC
    Dual Core Processor: Intel(R) Core(TM)2 Duo CPU E4400 @ 2.00GHz
    Memory: 1.9 GiB
    Ubuntu Linux 8.04 (hardy)
 
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
    MicroBlaze soft core arch inside Virtex 6 FPGA from Xilinx
    Linux Version 2.6.37-rc4
 
COMPILER NAME AND VERSION (AND PATCHLEVEL):
    Cross Toolchain powerpc-microblaze-unknown-linux-gnu 4.1.2
Using built-in specs.
Target: microblaze-unknown-linux-gnu
Configured
with: /home/ddeboni/src/Linux/crosstool/crosstool-ng-1.4.1/targets/src/gcc-4.1.2/configure --build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu --target=microblaze-unknown-linux-gnu --prefix=/tmp/microblaze-unknown-linux-gnu --with-sysroot=/tmp/microblaze-unknown-linux-gnu/microblaze-unknown-linux-gnu//sys-root --enable-languages=c,c++ --disable-multilib --enable-__cxa_atexit --with-local-prefix=/tmp/microblaze-unknown-linux-gnu/microblaze-unknown-linux-gnu//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace --enable-multilib
Thread model: posix
gcc version 4.1.2
 
THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-
     specific file, simply state which one]:

#define ACE_HAS_SSL 1
#define TAO_HAS_ZIOP 0
#include "ace/config-linux.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++)]:
 
inline=1
OCFLAGS=-Os
use_dep_libs=0
LDFLAGS+=-Xlinker -M -Xlinker -Map -Xlinker \$@.map
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
optimize=1
debug=0
exceptions=1
CC = mb-linux-gcc -mtune=8.00.a
CCDEPMODE = depmode=gcc3
CFLAGS +=
-isystem/opt/local/oe_mb/tmp/sysroots/microblaze-angstrom-linux/usr/include -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -pipe 
CPP = mb-linux-gcc -E
CPPFLAGS += -D_REENTRANT -D_THREAD_SAFE
-isystem/opt/local/oe_mb/tmp/sysroots/microblaze-angstrom-linux/usr/include

SDK_PATH
= /opt/local/LinuxKernel_mb/Tools_MB_BE/microblaze-unknown-linux-gnu/microblaze-unknown-linux-gnu

PPFLAGS += -I${SDK_PATH}/libc/usr/include -I
${SDK_PATH}/libc/usr/include/sys -I${SDK_PATH}/libc/usr/include/arpa -I
${SDK_PATH}/libc/usr/include/asm -I
${SDK_PATH}/libc/usr/include/asm-generic -I${SDK_PATH}/include -I
${SDK_PATH}/include/c++/4.1.2 -I${SDK_PATH}/include/c++/4.1.2/backward
-I${SDK_PATH}/include/c++/4.1.2/bits -I${SDK_PATH}/include/c
++/4.1.2/debug -I${SDK_PATH}/include/c++/4.1.2/ext -I
${SDK_PATH}/include/c++/4.1.2/ext/pb_assoc -I${SDK_PATH}/include/c
++/4.1.2/ext/pb_assoc/detail -I${SDK_PATH}/include/c
++/4.1.2/microblaze-unknown-linux-gnu -I${SDK_PATH}/include/c
++/4.1.2/microblaze-unknown-linux-gnu/bits -I${SDK_PATH}/include/c
++/4.1.2/tr1

CPPFLAGS +=  -I${SDK_PATH}/libc/usr/include/bits

CPPFLAGS +=  -I${SDK_PATH}/libc/usr/include/drm -I
${SDK_PATH}/libc/usr/include/gnu -I${SDK_PATH}/libc/usr/include/mtd -I
${SDK_PATH}/libc/usr/include/net -I${SDK_PATH}/libc/usr/include/netash
-I${SDK_PATH}/libc/usr/include/netatalk -I
${SDK_PATH}/libc/usr/include/netax25 -I
${SDK_PATH}/libc/usr/include/neteconet -I
${SDK_PATH}/libc/usr/include/netinet -I
${SDK_PATH}/libc/usr/include/netipx -I
${SDK_PATH}/libc/usr/include/netpacket -I
${SDK_PATH}/libc/usr/include/netrom -I
${SDK_PATH}/libc/usr/include/netrose -I${SDK_PATH}/libc/usr/include/nfs
-I${SDK_PATH}/libc/usr/include/protocols -I
${SDK_PATH}/libc/usr/include/rdma -I${SDK_PATH}/libc/usr/include/rpc -I
${SDK_PATH}/libc/usr/include/rpcsvc -I${SDK_PATH}/libc/usr/include/scsi
-I${SDK_PATH}/libc/usr/include/sound -I
${SDK_PATH}/libc/usr/include/video

....

LDFLAGS =  -L${SDK_PATH}/libc/lib -Wl,-rpath-link,${SDK_PATH}/libc/lib 

LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/zlib-1.2.3-r7.0/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/attr-2.4.44-r4/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/gettext-0.18-r4/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/libiconv-1.13.1-r1/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/flex-2.5.35-r6.1/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/libusb-compat-1_0.1.3-r0/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/libusb1-1.0.8-r0/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/acl-2.2.49-r3/image/usr/lib -Wl,-rpath-link,/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/acl-2.2.49-r3/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/attr-2.4.44-r4/image/usr/lib -Wl,-rpath-link,/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/attr-2.4.44-r4/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/glib-2.0-2.26.1-r3/image/usr/lib -Wl,-rpath-link,/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/glib-2.0-2.26.1-r3/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/ncurses-5.7-r16/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/libpam-1.1.1-r2/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/util-linux-ng-2.17-r35/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/udev-124-r30.2/image/usr/lib 
LDFLAGS +=
-L/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/openssl-1.0.0c-r14.2/image/usr/lib 



CXX = mb-linux-g++ -mtune=8.00.a
CXXCPP = mb-linux-g++ -mtune=8.00.a -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS +=  -W -Wall -Wpointer-arith
-isystem/opt/local/oe_mb/tmp/sysroots/microblaze-angstrom-linux/usr/include -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -fpermissive -fvisibility-inlines-hidden -pipe -O3
DEFS = -DHAVE_CONFIG_H
DEF_CXXFLAGS += -Wall -fno-rtti -pipe -O3 -g -mcpu=G3 -mtune=G5
-fomit-frame-pointer 
DEBUG = 
AR = mb-linux-ar
RANLIB = mb-linux-ranlib
LD = mb-linux-g++
TAO_IDL := /usr/local/bin/tao_idl
TAO_IDLFLAGS += -g /usr/local/bin/ace_gperf
TAO_IDL_DEP := /usr/local/bin/tao_idl$(EXEEXT)
INSTALL_PREFIX
= /opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/acetao-6.0.0-r0/image/usr


BUILD METHOD USED:
      
I have used the traditional way of compilation as follows:

tar xvfj ACE+TAO-5.7.3.tar.bz2
find . -name \*.sln -o -name \*.vcproj -o -name \*.bmak | xargs rm -f
cp /home/akzare/Projects/PICSY/Software/Network/CPP/TAO/install/mb/ful/default.features $ACE_ROOT/bin/MakeProjectCreator/config/default.features
cp /home/akzare/Projects/PICSY/Software/Network/CPP/TAO/install/mb/ful/platform_macros.GNU $ACE_ROOT/include/makeinclude/platform_macros.GNU
cp /home/akzare/Projects/PICSY/Software/Network/CPP/TAO/install/mb/ful/config.h $ACE_ROOT/ace/config.h
cd $TAO_ROOT
$ACE_ROOT/bin/mwc.pl TAO_ACE.mwc -type gnuace
make
 
CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
     (used by MPC when you generate your own makefiles):

cross_compile = 1
qos = 1
ssl = 1
 
AREA/CLASS/EXAMPLE AFFECTED:
         Cross Compilation
 
DOES THE PROBLEM AFFECT:
         COMPILATION?
         LINKING?
         EXECUTION?
            YES
         OTHER (please specify)?
                 Compilation of ACE+TAO is affected.
 
SYNOPSIS:

mb-linux-g++ -mtune=8.00.a -fvisibility=hidden
-fvisibility-inlines-hidden -W -Wall -Wpointer-arith  -O3 -pipe
-D_REENTRANT -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -D_REENTRANT
-D_THREAD_SAFE
-isystem/opt/local/oe_mb/tmp/sysroots/microblaze-angstrom-linux/usr/include -I/opt/local/LinuxKernel_mb/Tools_MB_BE/microblaze-unknown-linux-gnu/microblaze-unknown-linux-gnu/libc/usr/include  -DACE_NDEBUG -DACE_USE_RCSID=0 -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I../../.. -I../.. -I../../orbsvcs -DTAO_HAS_TYPED_EVENT_CHANNEL -DTAO_EVENT_SERV_BUILD_DLL  -c -fPIC -o .shobj/CosEvent/CEC_Event_Loader.o CosEvent/CEC_Event_Loader.cpp
{standard input}: Assembler messages:
{standard input}:4431: Error: register expected, but saw '0,1'
{standard input}:4431: Fatal error: missing operand
make[1]: *** [.shobj/CosEvent/CEC_Event_Loader.o] Error 1
make[1]: Leaving directory
`/opt/local/oe_mb/tmp/work/microblaze-oe-linux-gnu/acetao-6.0.0-r0/ACE_wrappers/TAO/orbsvcs/orbsvcs'
make: *** [CosEvent_Serv] Error 2

DESCRIPTION:

Always I face with an error from assembler which complains that an
operand is missing.

REPEAT BY:
TAO Version 2.0.0 and 1.7.0 both have the same issues.

SAMPLE FIX/WORKAROUND:

First I tried to cross compile version 2.0.0, but for cross compilation
it tries to compile the TAO_IDL_BF library and latter complains about
TAO_IDL_BE library. As far as I am cross compiling the whole TAO, it
makes no sense to compile the TAO_IDL folder! Therefore, switched back
to the version 1.7.0. Of course, in version 2.0.0 I manupulated the
GNUMakefile in TAO and forced it also to generate the TAO_IDL_BE and
let's see what will happen later. Both versions face with the same
issues as follows:

After looking inside each individual file and commenting out block by
block I have discovered the source of error as follows:

-------------------------------------------------------------
$TAO_ROOT/tao/IIOP_Acceptor.cpp

  ACE_NEW_RETURN (this->hosts_,
                  char *[this->endpoint_count_],
                  -1);

+// I have commented this line and error has disappeared
+// this->hosts_[0] = 0;

  if (this->hostname_in_ior_ != 0)
    {
      if (TAO_debug_level > 2)
        {
+// I have commented this line and error has been disappeared
+/* 
          ACE_DEBUG ((LM_DEBUG,
                      ACE_TEXT ("TAO (%P|%t) - ")
                      ACE_TEXT ("IIOP_Acceptor::open, ")
                      ACE_TEXT ("Overriding address in IOR with %C\n"),
                      this->hostname_in_ior_));
+*/
        }
      specified_hostname = this->hostname_in_ior_;
    }
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/CosEvent/CEC_Event_Loader.cpp

              this->naming_context_ =
                CosNaming::NamingContext::_narrow (obj.in ());

+// I have commented this line and error has been disappeared
+//  this->channel_name_.length (1);
              this->channel_name_[0].id = CORBA::string_dup
(ACE_TEXT_ALWAYS_CHAR(service_name));

and all the same ".length (1);" must be commented out.
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/Scheduler_Factory.cpp

  try
    {
      CosNaming::Name schedule_name (1);
+// I have commented this line and error has been disappeared
+// schedule_name.length (1);
      schedule_name[0].id = CORBA::string_dup (name);
      CORBA::Object_var objref =
        naming->resolve (schedule_name);
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/Event/EC_Gateway_IIOP.cpp

  // @@ TODO, there is an extra data copy here, we should do the event
  // modification without it and only compact the necessary events.
  RtecEventComm::EventSet out (1);
+// I have commented this line and error has been disappeared
+// out.length (1);
  for (CORBA::ULong i = 0; i < events.length (); ++i)
    {

-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/PortableGroup/PG_PropertyManager.cpp

  // First verify that the "Factories" property is not in the
  // Properties sequence.  According to the spec, it is not allowed to
  // be set as part of the default properties.
  PortableGroup::Name factories;
+// I have commented this line and error has been disappeared
+// factories.length (1);
  factories[0].id = CORBA::string_dup
("org.omg.PortableGroup.Factories");

  CORBA::ULong len = props.length ();

-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.cpp

    PortableGroup::Property & property = property_set[pos];
    CosNaming::Name & nsName = property.nam;
    //@@ note assumption: single level name, no kind
+// I have commented this line and error has been disappeared
+//  nsName.length(1);
    CosNaming::NameComponent & nc = nsName[0];
    nc.id = CORBA::string_dup (name.c_str ());
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/PortableGroup/PG_GenericFactory.cpp

  PortableGroup::Properties_var props =
    this->property_manager_.get_properties (object_group);

  PortableGroup::Name name (1);
+// I have commented this line and error has been disappeared
+// name.length (1);

  PortableGroup::Value value;

  // MinimumNumberMembers
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp

   // assign the value
    anyValue = (nv.value_);

    // assign the name
    // @@: This restricts the name to a single level with no "kind"
    // @@: remove this restriction (?)
+// I have commented this line and error has been disappeared
+// akzare bug    nsName.length(1);
    CosNaming::NameComponent & nc = nsName[0];

    nc.id = CORBA::string_dup (nv.name_.c_str());
    // nc.kind defaults to empty.  Leave it that way (for now)
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp

  : membership_ (1),
    factories_ (1)
{
+// I have commented this line and error has been disappeared
+//  this->membership_.length (1);
  this->membership_[0].id = CORBA::string_dup
("org.omg.PortableGroup.MembershipStyle");

+// I have commented this line and error has been disappeared
+//  this->factories_.length (1);
  this->factories_[0].id = CORBA::string_dup
("org.omg.PortableGroup.Factories");
}
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/PortableGroup/PG_FactoryRegistry.cpp 

   this->naming_context_ =
      CosNaming::NamingContext::_narrow (naming_obj.in ());

+// I have commented this line and error has been disappeared
+// this->this_name_.length (1);
    this->this_name_[0].id = CORBA::string_dup (this->ns_name_.c_str
());

    this->naming_context_->rebind (this->this_name_,
this->this_obj_.in()  //CORBA::Object::_duplicate(this_obj)
                            );
  }
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.cpp

    if (membership != TAO_FTEC_Event_Channel::UNSPECIFIED) {// register
to naming service
      FTRT::ManagerInfoList member_list;
+// I have commented this line and error has been disappeared
+//      member_list.length(1);
      member_list[0].the_location =
Fault_Detector::instance()->my_location();
      member_list[0].ior = FTRT::ObjectGroupManager::_duplicate(ec);

      if (membership == TAO_FTEC_Event_Channel::PRIMARY)
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Identification_Service.cpp

 int Identification_Service::init(int argc, ACE_TCHAR* argv[])
  {
    if (service != 0)
      return 0;
+// I have commented this line and error has been disappeared
+//  name_.length(1);
    name_[0].id = CORBA::string_dup("FT_EventService");

    while (argc > 1) {
      if ( ACE_OS::strcasecmp (argv[0], ACE_TEXT("-Object_ID")) == 0) {

-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/FtRtEvent/EventChannel/Fault_Detector_Loader.cpp

                  " Enable SCTP and rebuild ACE+TAO\n"));
#endif /* TAO_HAS_SCIOP */
      argc--; argv++;
    }
    else {
+// I have commented this line and error has been disappeared
+//   ACE_NEW_RETURN(detector, TCP_Fault_Detector, -1);
      ACE_AUTO_PTR_RESET(detector_, detector, Fault_Detector);
    }
    return detector_->init(argc, argv);
  }
-------------------------------------------------------------
$TAO_ROOT/orbsvcs/FTRT_Event_Service/Event_Service/FT_EventService.cpp

        // Service in the Naming Service.
        CosNaming::Name schedule_name (1);
+// I have commented this line and error has been disappeared
+//    schedule_name.length (1);
        schedule_name[0].id = CORBA::string_dup ("ScheduleService");


        if (1)

-------------------------------------------------------------
$TAO_ROOT/orbsvcs/orbsvcs/PortableGroup/UIPMC_Acceptor.cpp

  this->endpoint_count_ = 1;  // Only one hostname to store

+// I have commented this line and error has been disappeared
+/* 
  ACE_NEW_RETURN (this->addrs_,
                  ACE_INET_Addr[this->endpoint_count_],
                  -1);
*/
  ACE_NEW_RETURN (this->hosts_,
                  char *[this->endpoint_count_],
                  -1);
+// I have commented this line and error has been disappeared
+//  this->hosts_[0] = 0;

  if (this->hostname (orb_core,
                      addr,
                      this->hosts_[0],
-------------------------------------------------------------
$TAO_ROOT/tao/Strategies/DIOP_Acceptor.cpp

 ACE_NEW_RETURN (this->hosts_,
                  char *[this->endpoint_count_],
                  -1);

+// I have commented this line and error has been disappeared
+//  this->hosts_[0] = 0;

  if (this->hostname (orb_core,
                      addr,
                      this->hosts_[0],

-------------------------------------------------------------
$TAO_ROOT/orbsvcs/FTRT_Event_Service/Factory_Service/FTRTEC_Factory_Service.cpp

    // register to naming service
      CosNaming::Name name(1);
+// I have commented this line and error has been disappeared
+//   name.length(1);
      name[0].id = CORBA::string_dup(id.c_str());
      if (kind.length())
        name[0].kind = CORBA::string_dup(kind.c_str());

-------------------------------------------------------------

I am not sure with commenting all those things, still the generated
libraries would be functioning properly.

Would you please let me know where the source of problem might be and  
how I may supposed to resolve it? How shall I path the source code to be
compatible with this cross compiler tool chain?

Thanks in advanced.

Ali

0
Ali
2/11/2011 5:01:11 PM
comp.soft-sys.ace 20326 articles. 1 followers. marlow.andrew (167) is leader. Post Follow

0 Replies
430 Views

Similar Articles

[PageSpeed] 19

Reply: