List Info

Thread: Re: Issue with running make on AIX 5.2




Re: Issue with running make on AIX 5.2
country flaguser name
United States
2007-06-12 07:20:45
The THREADSAFE macro is defined as a compiler flag because
we currently
use the config.h file generated from autoconf/automake in
target
applications as the "root" or first include header
from other headers
Common C++, and this may have other includes embedded in it.
 We have to
have _THREAD_SAFE defined for any libc headers before they
are included....

In AIX, standards.h defines _THREAD_SAFE as a means of
resolving this
same kind of issue, I assume.  You can strip it from the
compiler
CXXFLAGS.  I had resolved this issue by eliminating the use
of the
generated config.h when I originally refactored Common C++
late last
year, but the results of that effort have not yet been
released, and in
any case actually became a new library and a new way of
programming C++.

I would like to see if we can do a simple solution in Common
C++,
perhaps just using the configure.ac case for target type to
exclude the
_THREADSAFE define if the target platform is AIX.

developer itcs wrote:
> Hello!
> 
> Please help me to resolve that problem
> 
> I have some problem with compiling my application.
> My application is using " commoncpp2-1.3.22 "
.
> Steps that I do before I compile on AIX 5.2:
> 
> 1. CC=xlc_r
>      export CC
> 2. CXX=xlC_r
>      export CXX
> 3. export CFLAGS="-I /usr/local/include"
>     export LDFLAGS="-L /usr/local/lib"
>     export CPPFLAGS=$CFLAGS
>     export CXXFLAGS=$CFLAGS
> 
> then
> 4. ./configure --prefix=/usr/local
>                        
--with-db2="/path/to/db2"
>                         --sysconfdir=/etc/mysql
>                         --sbindir='/usr/local/bin'
> 
> 5. make
> 
> problem is :
> /
> config.status: creating include/config.h
> config.status: executing default-1 commands
> Making all in include
>         make  all-recursive
> Making all in cc++
> Target "all" is up to date.
> Target "all-am" is up to date.
> Target "all" is up to date.
> Making all in src
>         /bin/sh ../libtool --mode=compile xlC_r
-DHAVE_CONFIG_H -I. -I.
> -I../include    -I../src -DCCXX_EXPORT_LIBRARY
-D_THREAD_SAFE          
> -D_GNU_SOURCE -fhandle-exceptions  -I../include  -g -c
thread.cpp
>  xlC_r -DHAVE_CONFIG_H -I. -I. -I../include -I../src
> -DCCXX_EXPORT_LIBRARY -D_THREAD_SAFE -D_GNU_SOURCE
-fhandle-exceptions
> -I../incl  ude -g -c thread.cpp -o thread.o
> 
> "/usr/include/thread.h", line 32.9: 1540-0848
(S) The macro name
> "_THREAD_SAFE" is already defined with a
different definition.
> 
> "/usr/include/standards.h", line 62.9:
1540-0425 (I) "_THREAD_SAFE" is
> defined on line 62 of "thread.cpp".
> 
> make: 1254-004 The error code from the last command is
1./
> 
> Although I don`t have any problems on my Fedora Core
4(core 2.6.12.4
> <http://2.6.12.4>) in time
compilation process.
> 
> Thanks a lot!
> 
> 
> best regards,
> Alexander

_______________________________________________
Bayonne-devel mailing list
Bayonne-develgnu.org
h
ttp://lists.gnu.org/mailman/listinfo/bayonne-devel

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )