[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: [Bayonne-devel]timespec *, timespec *)' throws different except
From: |
Federico Montesino Pouzols |
Subject: |
Re: Fwd: [Bayonne-devel]timespec *, timespec *)' throws different exceptions (compiling commoncpp 1.0.7) |
Date: |
Sat, 7 Dec 2002 23:46:09 +0100 |
User-agent: |
Mutt/1.4i |
I have been trying to add the AC_TRY_COMPILE, but I have found
that it will not work in FreeBSD due to some funny #defines related to
posix versions. So I have just added the "#ifdef __freeBSD__" you
suggested around the declaration in config.h (that way, those RH and
Debian should not complain too).
When the AC_TRY_COMPILE check runs under FreeBSD, it reports
that the declaration of nanosleep is there, and any simple program
that #includes time.h or sys/time.h and uses nanosleep will compile
and work well. However, nanosleep is defined in time.h only if
_P1003_1B_VISIBLE_HISTORICALLY is defined (in sys/_posix.h). It seems
that the order in which CC++ includes some system headers implies that
the HISTORICALLY symbol is not defined because some posix version
symbols it depends on are affected.
On Thu, Dec 05, 2002 at 06:56:51PM -0500, David Sugar wrote:
> I think we will have to add a AC_TRY_COMPILE for it...I don't have any
> issue with this on any of the systems I normally test with, but I am
> gathering it is an issue at least on some older rh (pre 7.3, and,
> similarly pre debian r3) systems. If we added it in initially for
> FreeBSD, maybe we should for the moment just have a "#ifdef __FreeBSD__"
> around it...
>
> On Thu, 5 Dec 2002, Federico Montesino Pouzols wrote:
>
> >
> > Oh, I had not had this problem yet, but I have just read a
> > mail posted to bug-commoncpp whose author seems to complain about the
> > same issue. The problem comes from the following lines in config.h:
> >
> > #ifdef HAVE_PTHREAD_NANOSLEEP
> > #ifndef HAVE_PTHREAD_DELAY
> > #define HAVE_PTHREAD_DELAY
> > extern "C" int nanosleep(const struct timespec *rqtp, struct timespec
> > *rmtp);
> > #define pthread_delay(x) nanosleep(x, NULL)
> >
> > I recall we recently added the declaration of nanosleep
> > because it is missing (or requires the definition of some weird posix
> > version related symbols) in FreeBSD. However, this declaration is
> > conflicting with the one in time.h, which difers because of the 'throw
> > ()'. I guess we will have to make an AC_TRY_COMPILE with nanosleep to
> > see if it is already declared, and declare nanosleep in config.h only
> > when strictly necessary.
> >
> > On Thu, Dec 05, 2002 at 04:51:01PM -0500, David Sugar wrote:
> > > Here's a curious problem I had not seen before...nanosleep is defined in
> > > at
> > > least some glibc releases under time.h...
> > >
> > > ---------- Forwarded Message ----------
> > >
> > > Subject: [Bayonne-devel]timespec *, timespec *)' throws different
> > > exceptions
> > > (compiling commoncpp 1.0.7)
> > > Date: 05 Dec 2002 15:57:11 -0500
> > > From: Erik Enge <address@hidden>
> > > To: address@hidden
> > >
> > > Hi.
> > >
> > > I'm getting this when trying to compile CommonCPP version 1.0.7:
> > >
> > > make[1]: Entering directory `/share/pak/commoncpp2/commoncpp2-1.0.7/src'
> > > /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I.
> > > -I../include
> > > -I../src -DCCXX_EXPORT_LIBRARY -I/usr/local/include -D_GNU_SOURCE
> > > -I/usr/include/libxml -I/usr/include -I../include -c thread.cpp rm -f
> > > .libs/thread.lo
> > > c++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY
> > > -I/usr/local/include -D_GNU_SOURCE -I/usr/include/libxml -I/usr/include
> > > -I../include -c thread.cpp -fPIC -DPIC -o .libs/thread.lo In file
> > > included
> > > from thread.cpp:41:
> > > ../include/cc++/config.h:524: declaration of `int nanosleep (const
> > > timespec *, timespec *)' throws different exceptions
> > > /usr/include/time.h:284: than previous declaration `int nanosleep
> > > (const timespec *, timespec *) throw ()'
> > > make[1]: *** [thread.lo] Error 1
> > > make[1]: Leaving directory `/share/pak/commoncpp2/commoncpp2-1.0.7/src'
> > > make: *** [install-recursive] Error 1
> > >
> > > Is there anything I can do to make it go away? I'm getting this error
> > > when I try to compile 1.0.6 also - which previously compiled just fine.
> > > I don't think I changed anything between the compiles. Confusing.
> > >
> > > (Couple of unrelated comments; bayonne.sf.net and
> > > gnu.org/software/bayonne differ greatly in content but not in design and
> > > the FAQ page (http://bayonne.myip.org/cgi-bin/bayonne.faq) seems to be
> > > down).
> > >
> > > Thanks,
> > >
> > > Erik.
> > >
> > >
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Welcome to geek heaven.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > Bayonne-devel mailing list
> > > address@hidden
> > > https://lists.sourceforge.net/lists/listinfo/bayonne-devel
> > >
> > > -------------------------------------------------------
> > >
> >
>