thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shigin <shi...@rambler-co.ru>
Subject Re: Compiling thrift under OpenBSD 4.2
Date Wed, 22 Oct 2008 08:09:01 GMT
В Втр, 21/10/2008 в 03:01 -0700, David Reiss пишет:
> I mad a bunch of changes:
> http://gitweb.thrift-rpc.org/?p=thrift.git;a=log;h=refs/heads/pri/dreiss/openbsd;hb=HEAD
> I can commit these if people think they look good.

In the commit
http://gitweb.thrift-rpc.org/?p=thrift.git;a=commitdiff;h=947e3ffa31e45850b38aa373007187c01039153a

Why don't you use "(std::sqrt(5.0)+1)/2;" instead of awful
"(std::sqrt((double)5)+1)/2".

And I think commit 4f54baa1471987ecb7a3a68c6e37eda1cdb128d3 should be
applied right now.

> The one thing that I didn't change was the sys/types include.  This
> really seems like an OpenBSD bug to me since even a trivial program
> can't compile.
> 
> -bash-3.2$ cat test.c
> #include <netinet/in.h>
> -bash-3.2$ gcc -Wall -c test.c
> (chaos ensues)
> 
> So, I think I'd rather see this fixed in the OpenBSD packaging, unless
> someone can make a case to me that this is not a ridiculous bug.
> 
> The other problem is that it turns out that one of our unit tests
> depends on boost 1.34.0, not 1.33.1.  Do you think you could upgrade
> your boost library?
> 
> --David
> 
> 
> 
> David Reiss wrote:
> > Well, I suppose we can add that include, but doesn't it seem like
> > netinet/in.h should be including all of its dependencies?
> > 
> > --David
> > 
> > Dima Brodsky wrote:
> >> Hi,
> >>
> >> My gcc/g++ version is:
> >>
> >> g++ -v
> >>
> >> Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.2/3.3.5/specs
> >> Configured with:
> >> Thread model: single
> >> gcc version 3.3.5 (propolice)
> >>
> >> The error below showed up before I added sys/types.h.  They were
> >> quenched once sys/types.h was included since it contains the
> >> definitions for the undefined types in question.
> >>
> >>>> ------------------
> >>>> gmake
> >>>>
> >>>> Then I needed to do again:
> >>>>
> >>>> #include <sys/types.h> before #include <netinet/in.h> in
> >>>> lib/cpp/src/Thrift.h
> >>>>
> >>>>  g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -I./src -Wall
-g -O2 -MT Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c src/Thrift.cpp  -fPIC -DPIC -o .libs/Thrift.o
> >>>> In file included from src/Thrift.h:15,
> >>>>                  from src/Thrift.cpp:7:
> >>>> /usr/include/netinet/in.h:136: error: 'in_addr_t' is used as a type,
but is not
> >>>>    defined as a type.
> >>>> /usr/include/netinet/in.h:213: error: 'u_int8_t' is used as a type,
but is not
> >>>>    defined as a type.
> >>>> /usr/include/netinet/in.h:214: error: 'sa_family_t' is used as a type,
but is
> >>>>    not defined as a type.
> >>>> /usr/include/netinet/in.h:215: error: 'in_port_t' is used as a type,
but is not
> >>>>    defined as a type.
> >>> Wait, did those errors show up before or after you added the include?
> >> Thanks for you help!
> >> ttyl
> >> Dima
> >>
> >> --
> >> dima@cs.ubc.ca                                 http://www.cs.ubc.ca/~dima
> >>
> >> "The price of reliability is the pursuit of the utmost simplicity.
> >>  It is a price which the very rich find the most hard to pay."
> >>                                                  (Sir Antony Hoare, 1980)
> >>


Mime
View raw message