[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c++ autoconf added



Cory Bennett wrote:
> 
> I just checked in a new xmlBlaster-autoconf.tar.gz.
> 
> It should build the c++ clients under src/c++ and testsuite/c++.
> 
> At this point in testsuite/c++ only TestGet, TestLogin, TestSub and RamTest
> actually compile.  for the client* they seem to be missing BlasterCallback_skel
> and I dont know where that is from.

This is in xmlBlaster/src/c++/generated/xmlBlaster.h

My output (the old Makefiles):

gcc -I/home/ruff/xmlBlaster/src/c++/generated -I/usr/local/mico/include
-DMICO -I/opt/xerces/include -I/home/ruff/xmlBlaster/src/c++ -c
clientPOA.cc

gcc clientPOA.o /home/ruff/xmlBlaster/src/c++/client/CorbaConnection.o
/home/ruff/xmlBlaster/src/c++/util/CompatibleCorba.o
/home/ruff/xmlBlaster/src/c++/util/Log.o
/home/ruff/xmlBlaster/src/c++/generated/xmlBlaster.o
-o/home/ruff/xmlBlaster/testsuite/c++/bin/clientPOA -L/opt/xerces/lib
-lxerces-c1_2 -lpthread -ldl -L/usr/local/mico/lib -lmico2.3.1 -lpthread
-L/usr/local/mico/lib -lmicocoss2.3.1 -lstdc++

Following the guidelines in README it runs fine.

> 
> Also the TestLogin and TestSub seem to start, but they core dump (SEGV) when
> run. That may be due to some compile option I am missing, but I didnt see
> anything.

This is my TestLogin:

ruff:~/xmlBlaster/testsuite/c++/bin$ ldd TestLogin 
        libxerces-c1_2.so => /opt/xerces/lib/libxerces-c1_2.so
(0x40015000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4012e000)
        libdl.so.2 => /lib/libdl.so.2 (0x40141000)
        libmico2.3.1.so => /usr/local/mico/lib/libmico2.3.1.so
(0x40145000)
        libmicocoss2.3.1.so => /usr/local/mico/lib/libmicocoss2.3.1.so
(0x4060e000)
        libstdc++-libc6.1-2.so.3 => /usr/lib/libstdc++-libc6.1-2.so.3
(0x409ec000)
        libc.so.6 => /lib/libc.so.6 (0x40a35000)
        libm.so.6 => /lib/libm.so.6 (0x40b18000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Try this:

   jaco org.xmlBlaster.Main -iorFile /tmp/ior.dat

and 

   strace ./TestLogin  -ior `cat /tmp/ior.dat`

to see what happens (or use gdb).


> 
> Currently by default configure will not set up the c++ compile.  So for c++
> use:
> configure --with-cpp

OK

> 
> Also right now it only configures for mico and xerces-c, so it wont check for
> Orbacus yet.
> 
> If you have mico or xerces-c in non-standard locations, then you have to supply
> --with-mico=DIR and --with-xerces-c=DIR to configure.
> 
> I am guessing that there will be problems with this, but it seems to work on my
> Linux box.  If you see any issues please let me know.

I did a:

   configure --with-cpp --with-mico=/usr/local/mico
--with-xerces-c=/opt/xerces


gmake run fine until:

c++ -g -o TestLogin TestLogin.o
/home/ruff/xmlBlaster/src/c++/generated/xmlBlaster.o
/home/ruff/xmlBlaster/src/c++/util/CompatibleCorba.o
/home/ruff/xmlBlaster/src/c++/util/Log.o
/home/ruff/xmlBlaster/src/c++/client/CorbaConnection.o -L/opt/xerces/lib
-lxerces-c1_2 -L/usr/local/mico/lib -lmico2.3.1  -ldl -lm
-L/usr/local/mico/lib -lmicocoss2.3.1  -ldl -lm
/opt/xerces/lib/libxerces-c1_2.so: undefined reference to
`pthread_mutexattr_destroy'
/opt/xerces/lib/libxerces-c1_2.so: undefined reference to
`pthread_mutexattr_settype'
/opt/xerces/lib/libxerces-c1_2.so: undefined reference to
`pthread_mutexattr_init'
collect2: ld returned 1 exit status


Adding manually:

    -lpthread

helped to solve this issue.

Running 

  ./TestLogin  -ior `cat /tmp/ior.dat`

works perfect.

> 
> Thanks,
> -Cory
Thanks as well,

Marcel

-- 
Marcel Ruff
mailto:ruff at swand.lake.de
http://www.lake.de/home/lake/swand/
http://www.xmlBlaster.org