You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Dima Brodsky <di...@cs.ubc.ca> on 2008/10/15 22:52:34 UTC

Compiling thrift under OpenBSD 4.2

Hi,

I am having trouble compiling thrift under OpenBSD 4.2.  Are
there any special requirements for OpenBSD?  I have tried both
thrift-20080411p1 and thrift from trun to no avail.

Thanks!
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) 


Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
> Why don't you use "(std::sqrt(5.0)+1)/2;" instead of awful
> "(std::sqrt((double)5)+1)/2".
I wasn't sure whether 5.0 would be a double.  I see now that it is.
I'll update this.


Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
> Why don't you use "(std::sqrt(5.0)+1)/2;" instead of awful
> "(std::sqrt((double)5)+1)/2".
I wasn't sure whether 5.0 would be a double.  I see now that it is.
I'll update this.


Re: Compiling thrift under OpenBSD 4.2

Posted by Alexander Shigin <sh...@rambler-co.ru>.
В Втр, 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)
> >>


Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
Diff updated.  It builds out-of-the-box on OpenBSD now, except for
the unit test.  Any chance you could upgrade to boost 1.34.0 or greater
and try running "gmake check"?

--David

David Reiss wrote:
> 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.
> 
> 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)
>>>

Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
I think there is a difference between requiring an extra header to use
the socket function and requiring an extra header to make your program
compile.  The former makes sense to me because you might want to use
some other function in the header that doesn't require sys/types.h
and not incur the extra overhead of including it.  However, if
netinet/in.h can't even compile without sys/types.h, then I don't see
any reason to leave the include out.

In any case, I guess it is okay to include it based on this note in
the Linux man page for socket(2):
       POSIX.1-2001 does not require the inclusion of <sys/types.h>, and  this
       header  file  is not required on Linux.  However, some historical (BSD)
       implementations required this header file,  and  portable  applications
       are probably wise to include it.

--David

bill fumerola wrote:
> On Tue, Oct 21, 2008 at 03:01:54AM -0700, David Reiss wrote:
>> 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.
> 
> you'll have better luck changing the direction the earth rotates than
> you will convincing OpenBSD that anything they do is wrong.
> 
> their man pages document the header requirement.
> 
> IP(4)     OpenBSD Programmer's Manual IP(4)
> 
> NAME
>      ip - Internet Protocol
> 
> SYNOPSIS
>      #include <sys/socket.h>
>      #include <netinet/in.h>
> 
>      int
>      socket(AF_INET, SOCK_RAW, proto);
> 
> 
> 
> 
> -- bill
> 
> 
> 


Re: Compiling thrift under OpenBSD 4.2

Posted by bill fumerola <bi...@mu.org>.
On Tue, Oct 21, 2008 at 03:01:54AM -0700, David Reiss wrote:
> 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.

you'll have better luck changing the direction the earth rotates than
you will convincing OpenBSD that anything they do is wrong.

their man pages document the header requirement.

IP(4)     OpenBSD Programmer's Manual IP(4)

NAME
     ip - Internet Protocol

SYNOPSIS
     #include <sys/socket.h>
     #include <netinet/in.h>

     int
     socket(AF_INET, SOCK_RAW, proto);




-- bill




Re: Compiling thrift under OpenBSD 4.2

Posted by Alexander Shigin <sh...@rambler-co.ru>.
В Втр, 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)
> >>


Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
Diff updated.  It builds out-of-the-box on OpenBSD now, except for
the unit test.  Any chance you could upgrade to boost 1.34.0 or greater
and try running "gmake check"?

--David

David Reiss wrote:
> 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.
> 
> 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)
>>>

Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
I've made a few small updates to the patches.  This version builds
and passes all unit tests on OpenBSD 4.4 with the proper packages
installed (including boost 1.34) and autoscan added to your path.
If no one objects, I'll commit these tomorrow.

David Reiss wrote:
> 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.
> 
> 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)
>>>

Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
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.

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)
>>

Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
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.

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)
>>

Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
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)
> 

Re: Compiling thrift under OpenBSD 4.2

Posted by Dima Brodsky <di...@cs.ubc.ca>.
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) 


Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
Responses inline.

> ------------------
> sh bootstrap.sh
> 
> configure.ac:31: error: possibly undefined macro: AC_PROG_MKDIR_P
>       If this token and others are legitimate, please use m4_pattern_allow.
>       See the Autoconf documentation.
> configure.ac:101: error: possibly undefined macro: AC_TYPE_INT16_T
> configure.ac:102: error: possibly undefined macro: AC_TYPE_INT32_T
> configure.ac:103: error: possibly undefined macro: AC_TYPE_INT64_T
> configure.ac:104: error: possibly undefined macro: AC_TYPE_INT8_T
> configure.ac:108: error: possibly undefined macro: AC_TYPE_SSIZE_T
> configure.ac:109: error: possibly undefined macro: AC_TYPE_UINT16_T
> configure.ac:110: error: possibly undefined macro: AC_TYPE_UINT32_T
> configure.ac:111: error: possibly undefined macro: AC_TYPE_UINT64_T
> configure.ac:112: error: possibly undefined macro: AC_TYPE_UINT8_T
> configure.ac: installing `./install-sh'
> configure.ac: installing `./missing'
> compiler/cpp/Makefile.am: installing `./depcomp'
> ------------------
I'm pretty sure that (a) these are harmless and (b) they will go away
if you update autoconf.

> ------------------
> 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?

 > ------------------
> gmake
> 
> finally:
> 
> g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -I./src -Wall -g -O2 -MT TimerManager.lo -MD -MP -MF .deps/TimerManager.Tpo -c src/concurrency/TimerManager.cpp  -fPIC -DPIC -o .libs/TimerManager.o
> In file included from src/concurrency/Exception.h:11,
>                  from src/concurrency/TimerManager.h:10,
>                  from src/concurrency/TimerManager.cpp:7:
> src/Thrift.h: In static member function `static void
>    facebook::thrift::TOutput::errorTimeWrapper(const char*)':
> src/Thrift.h:57: warning: array size (25) is smaller than minimum required (26)
I think this is a legit error.  I'll put up an issue for it.

> src/concurrency/TimerManager.h: At global scope:
> src/concurrency/TimerManager.h:94: error: `struct
>    facebook::thrift::concurrency::TimerManager::Task' is private
> src/concurrency/TimerManager.cpp:19: error: within this context
This also appears to be a legit erro.  It's odd that it never showed
up before.  What is your g++ version?  I'll try to get a fix for that
too.

--David

Re: Compiling thrift under OpenBSD 4.2

Posted by Dima Brodsky <di...@cs.ubc.ca>.
Hi,

Another quick update:

I installed libtool from ports and reduced the errors to the following:

------------------
sh bootstrap.sh

configure.ac:31: error: possibly undefined macro: AC_PROG_MKDIR_P
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:101: error: possibly undefined macro: AC_TYPE_INT16_T
configure.ac:102: error: possibly undefined macro: AC_TYPE_INT32_T
configure.ac:103: error: possibly undefined macro: AC_TYPE_INT64_T
configure.ac:104: error: possibly undefined macro: AC_TYPE_INT8_T
configure.ac:108: error: possibly undefined macro: AC_TYPE_SSIZE_T
configure.ac:109: error: possibly undefined macro: AC_TYPE_UINT16_T
configure.ac:110: error: possibly undefined macro: AC_TYPE_UINT32_T
configure.ac:111: error: possibly undefined macro: AC_TYPE_UINT64_T
configure.ac:112: error: possibly undefined macro: AC_TYPE_UINT8_T
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
compiler/cpp/Makefile.am: installing `./depcomp'
------------------
 

------------------
./configure --without-java
------------------

------------------
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.
/usr/include/netinet/in.h:217: error: syntax error before `[' token
/usr/include/netinet/in.h:230: error: syntax error before `[' token
In file included from /usr/include/netinet/in.h:554,
                 from src/Thrift.h:15,
                 from src/Thrift.cpp:7:
/usr/include/netinet6/in6.h:118: error: syntax error before `[' token
/usr/include/netinet6/in6.h:119: error: syntax error before `[' token
/usr/include/netinet6/in6.h:120: error: syntax error before `[' token
/usr/include/netinet6/in6.h:140: error: 'u_int8_t' is used as a type, but is
   not defined as a type.
/usr/include/netinet6/in6.h:141: error: 'sa_family_t' is used as a type, but is
   not defined as a type.
/usr/include/netinet6/in6.h:142: error: 'in_port_t' is used as a type, but is
   not defined as a type.
/usr/include/netinet6/in6.h:143: error: 'u_int32_t' is used as a type, but is
   not defined as a type.
/usr/include/netinet6/in6.h:145: error: 'u_int32_t' is used as a type, but is
   not defined as a type.
/usr/include/netinet6/in6.h:514: error: 'u_int32_t' is used as a type, but is
   not defined as a type.
/usr/include/netinet6/in6.h:735: error: syntax error before `;' token
/usr/include/netinet6/in6.h:739: error: syntax error before `*' token
/usr/include/netinet6/in6.h:741: error: syntax error before `*' token
/usr/include/netinet6/in6.h:742: error: syntax error before `*' token
/usr/include/netinet6/in6.h:743: error: syntax error before `*' token
/usr/include/netinet6/in6.h:745: error: syntax error before `(' token
/usr/include/netinet6/in6.h:757: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:758: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:758: error: type specifier omitted for parameter `
   u_int8_t'
/usr/include/netinet6/in6.h:759: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:759: error: type specifier omitted for parameter `
   u_int8_t'
/usr/include/netinet6/in6.h:760: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:761: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:763: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:763: error: syntax error before `*' token
/usr/include/netinet6/in6.h:765: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:765: error: type specifier omitted for parameter `
   u_int8_t'
/usr/include/netinet6/in6.h:766: error: syntax error before `*' token
/usr/include/netinet6/in6.h:767: error: type specifier omitted for parameter `
   socklen_t'
/usr/include/netinet6/in6.h:769: error: syntax error before `(' token
/usr/include/netinet6/in6.h:770: error: type specifier omitted for parameter `
   socklen_t'
In file included from src/Thrift.h:15,
                 from src/Thrift.cpp:7:
/usr/include/netinet/in.h:561: error: syntax error before string constant
/usr/include/netinet/in.h:565: error: syntax error before `}' token
In file included from src/Thrift.h:15,
                 from src/Thrift.cpp:7:
/usr/include/netinet/in.h:557:1: unterminated #ifndef
/usr/include/netinet/in.h:40:1: unterminated #ifndef
In file included from src/Thrift.cpp:7:
src/Thrift.h:7:1: unterminated #ifndef
gmake[3]: *** [Thrift.lo] Error 1
gmake[3]: Leaving directory `/usr/local/src/thrift/lib/cpp'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/local/src/thrift/lib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/src/thrift'
gmake: *** [all] Error 2

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

------------------
gmake

finally:

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/include -I./src -Wall -g -O2 -MT TimerManager.lo -MD -MP -MF .deps/TimerManager.Tpo -c src/concurrency/TimerManager.cpp  -fPIC -DPIC -o .libs/TimerManager.o
In file included from src/concurrency/Exception.h:11,
                 from src/concurrency/TimerManager.h:10,
                 from src/concurrency/TimerManager.cpp:7:
src/Thrift.h: In static member function `static void
   facebook::thrift::TOutput::errorTimeWrapper(const char*)':
src/Thrift.h:57: warning: array size (25) is smaller than minimum required (26)
src/concurrency/TimerManager.h: At global scope:
src/concurrency/TimerManager.h:94: error: `struct
   facebook::thrift::concurrency::TimerManager::Task' is private
src/concurrency/TimerManager.cpp:19: error: within this context
gmake[3]: *** [TimerManager.lo] Error 1
gmake[3]: Leaving directory `/usr/local/src/thrift/lib/cpp'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/local/src/thrift/lib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/src/thrift'
gmake: *** [all] Error 2
------------------


On Wed, Oct 15, 2008 at 04:45:59PM -0700, Dima Brodsky wrote:
> With trunk I get the following:
>
>  sh bootstrap.sh
>
> configure.ac:25: error: possibly undefined macro: AC_PROG_LIBTOOL
>       If this token and others are legitimate, please use m4_pattern_allow.
>       See the Autoconf documentation.
> configure.ac:31: error: possibly undefined macro: AC_PROG_MKDIR_P
> configure.ac:101: error: possibly undefined macro: AC_TYPE_INT16_T
> configure.ac:102: error: possibly undefined macro: AC_TYPE_INT32_T
> configure.ac:103: error: possibly undefined macro: AC_TYPE_INT64_T
> configure.ac:104: error: possibly undefined macro: AC_TYPE_INT8_T
> configure.ac:108: error: possibly undefined macro: AC_TYPE_SSIZE_T
> configure.ac:109: error: possibly undefined macro: AC_TYPE_UINT16_T
> configure.ac:110: error: possibly undefined macro: AC_TYPE_UINT32_T
> configure.ac:111: error: possibly undefined macro: AC_TYPE_UINT64_T
> configure.ac:112: error: possibly undefined macro: AC_TYPE_UINT8_T
> configure.ac: installing `./install-sh'
> configure.ac: installing `./missing'
> compiler/cpp/Makefile.am: installing `./depcomp'
> lib/cpp/Makefile.am:5: Libtool library used but `LIBTOOL' is undefined
> lib/cpp/Makefile.am:5:
> lib/cpp/Makefile.am:5: The usual way to define `LIBTOOL' is to add 
> `AC_PROG_LIBTOOL'
> lib/cpp/Makefile.am:5: to `configure.ac' and run `aclocal' and `autoconf' 
> again.
> test/Makefile.am:15: Libtool library used but `LIBTOOL' is undefined
> test/Makefile.am:15:
> test/Makefile.am:15: The usual way to define `LIBTOOL' is to add 
> `AC_PROG_LIBTOOL'
> test/Makefile.am:15: to `configure.ac' and run `aclocal' and `autoconf' 
> again.
>
>
>  ./configure --without-java
>
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... no
> checking for mawk... no
> checking for nawk... nawk
> checking whether make sets $(MAKE)... yes
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking for style of include used by make... GNU
> checking dependency style of gcc... gcc3
> checking how to run the C preprocessor... gcc -E
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking dependency style of g++... gcc3
> checking for a BSD-compatible install... /usr/bin/install -c
> ./configure: line 3795: AC_PROG_LIBTOOL: command not found
> checking whether make sets $(MAKE)... (cached) yes
> checking for bison... no
> checking for byacc... no
> checking for flex... flex
> checking for yywrap in -lfl... yes
> checking lex output file root... lex.yy
> checking whether yytext is a pointer... yes
> checking whether ln -s works... yes
> ./configure: line 4155: AC_PROG_MKDIR_P: command not found
> checking for boostlib >= 1.33.1... yes
> checking for libevent >= 1.0... yes
> checking for zlib >= 1.2.3... yes
> checking for pkg-config... /usr/bin/pkg-config
> checking pkg-config is at least version 0.9.0... yes
> checking for MONO... Package mono was not found in the pkg-config search 
> path
> no
> checking for erlc... no
> checking for a Python interpreter with version >= 2.4... python
> checking for python... /usr/local/bin/python
> checking for python version... 2.5
> checking for python platform... openbsd4
> checking for python script directory... 
> ${prefix}/lib/python2.5/site-packages
> checking for python extension module directory... 
> ${exec_prefix}/lib/python2.5/site-packages
> checking for ruby... no
> checking for an ANSI C-conforming const... yes
> checking for inline... inline
> checking for working volatile... yes
> checking how to run the C++ preprocessor... g++ -E
> checking for egrep... grep -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for stdbool.h that conforms to C99... no
> checking for _Bool... no
> checking for ANSI C header files... (cached) yes
> checking whether time.h and sys/time.h may both be included... yes
> checking arpa/inet.h usability... yes
> checking arpa/inet.h presence... yes
> checking for arpa/inet.h... yes
> checking endian.h usability... no
> checking endian.h presence... no
> checking for endian.h... no
> checking fcntl.h usability... yes
> checking fcntl.h presence... yes
> checking for fcntl.h... yes
> checking for inttypes.h... (cached) yes
> checking limits.h usability... yes
> checking limits.h presence... yes
> checking for limits.h... yes
> checking netdb.h usability... yes
> checking netdb.h presence... yes
> checking for netdb.h... yes
> checking netinet/in.h usability... yes
> checking netinet/in.h presence... yes
> checking for netinet/in.h... yes
> checking pthread.h usability... yes
> checking pthread.h presence... yes
> checking for pthread.h... yes
> checking stddef.h usability... yes
> checking stddef.h presence... yes
> checking for stddef.h... yes
> checking for stdlib.h... (cached) yes
> checking sys/socket.h usability... yes
> checking sys/socket.h presence... yes
> checking for sys/socket.h... yes
> checking sys/time.h usability... yes
> checking sys/time.h presence... yes
> checking for sys/time.h... yes
> checking for unistd.h... (cached) yes
> checking libintl.h usability... no
> checking libintl.h presence... no
> checking for libintl.h... no
> checking malloc.h usability... yes
> checking malloc.h presence... yes
> checking for malloc.h... yes
> checking for pthread_create in -lpthread... yes
> checking for sched_get_priority_min in -lrt... no
> ./configure: line 9358: AC_TYPE_INT16_T: command not found
> ./configure: line 9359: AC_TYPE_INT32_T: command not found
> ./configure: line 9360: AC_TYPE_INT64_T: command not found
> ./configure: line 9361: AC_TYPE_INT8_T: command not found
> checking for mode_t... yes
> checking for off_t... yes
> checking for size_t... yes
> ./configure: line 9560: AC_TYPE_SSIZE_T: command not found
> ./configure: line 9561: AC_TYPE_UINT16_T: command not found
> ./configure: line 9562: AC_TYPE_UINT32_T: command not found
> ./configure: line 9563: AC_TYPE_UINT64_T: command not found
> ./configure: line 9564: AC_TYPE_UINT8_T: command not found
> checking for ptrdiff_t... yes
> checking whether struct tm is in sys/time.h or time.h... time.h
> checking for working alloca.h... no
> checking for alloca... yes
> checking for stdlib.h... (cached) yes
> checking for GNU libc compatible malloc... yes
> checking for working memcmp... yes
> checking for stdlib.h... (cached) yes
> checking for GNU libc compatible realloc... yes
> checking sys/select.h usability... yes
> checking sys/select.h presence... yes
> checking for sys/select.h... yes
> checking for sys/socket.h... (cached) yes
> checking types of arguments for select... int,fd_set *,struct timeval *
> checking whether lstat dereferences a symlink specified with a trailing 
> slash... yes
> checking whether stat accepts an empty string... no
> checking whether strerror_r is declared... yes
> checking for strerror_r... yes
> checking whether strerror_r returns char *... no
> checking for strftime... no
> checking for strftime in -lintl... no
> checking for vprintf... yes
> checking for _doprnt... no
> checking for strtoul... yes
> checking for bzero... yes
> checking for clock_gettime... yes
> checking for ftruncate... yes
> checking for gethostbyname... yes
> checking for gettimeofday... yes
> checking for memmove... yes
> checking for memset... yes
> checking for mkdir... yes
> checking for realpath... yes
> checking for select... yes
> checking for socket... yes
> checking for strchr... yes
> checking for strdup... yes
> checking for strerror... yes
> checking for strstr... yes
> checking for strtol... yes
> checking for sqrt... yes
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: error: cannot find input file: Makefile.in
>
> Thanks!
> ttyl
> Dima
>
>
>
> On 15-Oct-08, at 2:19 PM, David Reiss wrote:
>
>> Can you actually report the problems you had with the latest trunk?
>>
>> Dima Brodsky wrote:
>>> Sure,
>>>
>>> First I needed to add:
>>>
>>> #include <sys/types.h> before #include <netinet/in.h> in
>>> lib/cpp/src/Thrift.h
>>>
>>> Then I am getting:
>>>
>>> g++ -DHAVE_CONFIG_H -I. -I../.. -Wall -Isrc -I/usr/local/include -g -O2 
>>> -MT libthrift_la-TimerManager.lo -MD -MP -MF 
>>> .deps/libthrift_la-TimerManager.Tpo -c src/concurrency/TimerManager.cpp  
>>> -fPIC -DPIC -o .libs/libthrift_la-TimerManager.o
>>> In file included from src/concurrency/Exception.h:11,
>>>                 from src/concurrency/TimerManager.h:10,
>>>                 from src/concurrency/TimerManager.cpp:7:
>>> src/Thrift.h: In static member function `static void
>>>   facebook::thrift::TOutput::errorTimeWrapper(const char*)':
>>> src/Thrift.h:47: warning: array size (25) is smaller than minimum 
>>> required (26)
>>> src/concurrency/TimerManager.h: At global scope:
>>> src/concurrency/TimerManager.h:94: error: `struct
>>>   facebook::thrift::concurrency::TimerManager::Task' is private
>>> src/concurrency/TimerManager.cpp:19: error: within this context
>>> gmake[3]: *** [libthrift_la-TimerManager.lo] Error 1
>>> gmake[3]: Leaving directory `/usr/local/src/thrift-20080411p1/lib/cpp'
>>> gmake[2]: *** [all-recursive] Error 1
>>> gmake[2]: Leaving directory `/usr/local/src/thrift-20080411p1/lib'
>>> gmake[1]: *** [all-recursive] Error 1
>>> gmake[1]: Leaving directory `/usr/local/src/thrift-20080411p1'
>>> gmake: *** [all] Error 2
>>>
>>> gcc -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)
>>>
>>> ./configure --without-java
>>>
>>> Thanks for your help!
>>> ttyl
>>> Dima
>>>
>>>
>>>
>>>
>>> On Wed, Oct 15, 2008 at 02:08:06PM -0700, David Reiss wrote:
>>>> Can you post the error that you get?
>>>>
>>>> Dima Brodsky wrote:
>>>>> Hi,
>>>>>
>>>>> I am having trouble compiling thrift under OpenBSD 4.2.  Are
>>>>> there any special requirements for OpenBSD?  I have tried both
>>>>> thrift-20080411p1 and thrift from trun to no avail.
>>>>>
>>>>> Thanks!
>>>>> 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)
>>>>>
>>>
>>> --
>>> 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)
>>>
>
>
>
> --
> 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)
>
>
>
>

-- 
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) 


Re: Compiling thrift under OpenBSD 4.2

Posted by Dima Brodsky <di...@cs.ubc.ca>.
With trunk I get the following:

  sh bootstrap.sh

configure.ac:25: error: possibly undefined macro: AC_PROG_LIBTOOL
       If this token and others are legitimate, please use  
m4_pattern_allow.
       See the Autoconf documentation.
configure.ac:31: error: possibly undefined macro: AC_PROG_MKDIR_P
configure.ac:101: error: possibly undefined macro: AC_TYPE_INT16_T
configure.ac:102: error: possibly undefined macro: AC_TYPE_INT32_T
configure.ac:103: error: possibly undefined macro: AC_TYPE_INT64_T
configure.ac:104: error: possibly undefined macro: AC_TYPE_INT8_T
configure.ac:108: error: possibly undefined macro: AC_TYPE_SSIZE_T
configure.ac:109: error: possibly undefined macro: AC_TYPE_UINT16_T
configure.ac:110: error: possibly undefined macro: AC_TYPE_UINT32_T
configure.ac:111: error: possibly undefined macro: AC_TYPE_UINT64_T
configure.ac:112: error: possibly undefined macro: AC_TYPE_UINT8_T
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
compiler/cpp/Makefile.am: installing `./depcomp'
lib/cpp/Makefile.am:5: Libtool library used but `LIBTOOL' is undefined
lib/cpp/Makefile.am:5:
lib/cpp/Makefile.am:5: The usual way to define `LIBTOOL' is to add  
`AC_PROG_LIBTOOL'
lib/cpp/Makefile.am:5: to `configure.ac' and run `aclocal' and  
`autoconf' again.
test/Makefile.am:15: Libtool library used but `LIBTOOL' is undefined
test/Makefile.am:15:
test/Makefile.am:15: The usual way to define `LIBTOOL' is to add  
`AC_PROG_LIBTOOL'
test/Makefile.am:15: to `configure.ac' and run `aclocal' and  
`autoconf' again.


  ./configure --without-java

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
./configure: line 3795: AC_PROG_LIBTOOL: command not found
checking whether make sets $(MAKE)... (cached) yes
checking for bison... no
checking for byacc... no
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking whether ln -s works... yes
./configure: line 4155: AC_PROG_MKDIR_P: command not found
checking for boostlib >= 1.33.1... yes
checking for libevent >= 1.0... yes
checking for zlib >= 1.2.3... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for MONO... Package mono was not found in the pkg-config  
search path
no
checking for erlc... no
checking for a Python interpreter with version >= 2.4... python
checking for python... /usr/local/bin/python
checking for python version... 2.5
checking for python platform... openbsd4
checking for python script directory... ${prefix}/lib/python2.5/site- 
packages
checking for python extension module directory... ${exec_prefix}/lib/ 
python2.5/site-packages
checking for ruby... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking how to run the C++ preprocessor... g++ -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for pthread_create in -lpthread... yes
checking for sched_get_priority_min in -lrt... no
./configure: line 9358: AC_TYPE_INT16_T: command not found
./configure: line 9359: AC_TYPE_INT32_T: command not found
./configure: line 9360: AC_TYPE_INT64_T: command not found
./configure: line 9361: AC_TYPE_INT8_T: command not found
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
./configure: line 9560: AC_TYPE_SSIZE_T: command not found
./configure: line 9561: AC_TYPE_UINT16_T: command not found
./configure: line 9562: AC_TYPE_UINT32_T: command not found
./configure: line 9563: AC_TYPE_UINT64_T: command not found
./configure: line 9564: AC_TYPE_UINT8_T: command not found
checking for ptrdiff_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working alloca.h... no
checking for alloca... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking whether lstat dereferences a symlink specified with a  
trailing slash... yes
checking whether stat accepts an empty string... no
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for strftime... no
checking for strftime in -lintl... no
checking for vprintf... yes
checking for _doprnt... no
checking for strtoul... yes
checking for bzero... yes
checking for clock_gettime... yes
checking for ftruncate... yes
checking for gethostbyname... yes
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for mkdir... yes
checking for realpath... yes
checking for select... yes
checking for socket... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strstr... yes
checking for strtol... yes
checking for sqrt... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: error: cannot find input file: Makefile.in

Thanks!
ttyl
Dima



On 15-Oct-08, at 2:19 PM, David Reiss wrote:

> Can you actually report the problems you had with the latest trunk?
>
> Dima Brodsky wrote:
>> Sure,
>>
>> First I needed to add:
>>
>> #include <sys/types.h> before #include <netinet/in.h> in
>> lib/cpp/src/Thrift.h
>>
>> Then I am getting:
>>
>> g++ -DHAVE_CONFIG_H -I. -I../.. -Wall -Isrc -I/usr/local/include -g  
>> -O2 -MT libthrift_la-TimerManager.lo -MD -MP -MF .deps/libthrift_la- 
>> TimerManager.Tpo -c src/concurrency/TimerManager.cpp  -fPIC -DPIC - 
>> o .libs/libthrift_la-TimerManager.o
>> In file included from src/concurrency/Exception.h:11,
>>                 from src/concurrency/TimerManager.h:10,
>>                 from src/concurrency/TimerManager.cpp:7:
>> src/Thrift.h: In static member function `static void
>>   facebook::thrift::TOutput::errorTimeWrapper(const char*)':
>> src/Thrift.h:47: warning: array size (25) is smaller than minimum  
>> required (26)
>> src/concurrency/TimerManager.h: At global scope:
>> src/concurrency/TimerManager.h:94: error: `struct
>>   facebook::thrift::concurrency::TimerManager::Task' is private
>> src/concurrency/TimerManager.cpp:19: error: within this context
>> gmake[3]: *** [libthrift_la-TimerManager.lo] Error 1
>> gmake[3]: Leaving directory `/usr/local/src/thrift-20080411p1/lib/ 
>> cpp'
>> gmake[2]: *** [all-recursive] Error 1
>> gmake[2]: Leaving directory `/usr/local/src/thrift-20080411p1/lib'
>> gmake[1]: *** [all-recursive] Error 1
>> gmake[1]: Leaving directory `/usr/local/src/thrift-20080411p1'
>> gmake: *** [all] Error 2
>>
>> gcc -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)
>>
>> ./configure --without-java
>>
>> Thanks for your help!
>> ttyl
>> Dima
>>
>>
>>
>>
>> On Wed, Oct 15, 2008 at 02:08:06PM -0700, David Reiss wrote:
>>> Can you post the error that you get?
>>>
>>> Dima Brodsky wrote:
>>>> Hi,
>>>>
>>>> I am having trouble compiling thrift under OpenBSD 4.2.  Are
>>>> there any special requirements for OpenBSD?  I have tried both
>>>> thrift-20080411p1 and thrift from trun to no avail.
>>>>
>>>> Thanks!
>>>> 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)
>>>>
>>
>> --
>> 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)
>>



--
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)






Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
Can you actually report the problems you had with the latest trunk?

Dima Brodsky wrote:
> Sure,
> 
> First I needed to add:
> 
> #include <sys/types.h> before #include <netinet/in.h> in
> lib/cpp/src/Thrift.h
> 
> Then I am getting:
> 
> g++ -DHAVE_CONFIG_H -I. -I../.. -Wall -Isrc -I/usr/local/include -g -O2 -MT libthrift_la-TimerManager.lo -MD -MP -MF .deps/libthrift_la-TimerManager.Tpo -c src/concurrency/TimerManager.cpp  -fPIC -DPIC -o .libs/libthrift_la-TimerManager.o
> In file included from src/concurrency/Exception.h:11,
>                  from src/concurrency/TimerManager.h:10,
>                  from src/concurrency/TimerManager.cpp:7:
> src/Thrift.h: In static member function `static void
>    facebook::thrift::TOutput::errorTimeWrapper(const char*)':
> src/Thrift.h:47: warning: array size (25) is smaller than minimum required (26)
> src/concurrency/TimerManager.h: At global scope:
> src/concurrency/TimerManager.h:94: error: `struct
>    facebook::thrift::concurrency::TimerManager::Task' is private
> src/concurrency/TimerManager.cpp:19: error: within this context
> gmake[3]: *** [libthrift_la-TimerManager.lo] Error 1
> gmake[3]: Leaving directory `/usr/local/src/thrift-20080411p1/lib/cpp'
> gmake[2]: *** [all-recursive] Error 1
> gmake[2]: Leaving directory `/usr/local/src/thrift-20080411p1/lib'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/usr/local/src/thrift-20080411p1'
> gmake: *** [all] Error 2
> 
> gcc -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)
> 
> ./configure --without-java
> 
> Thanks for your help!
> ttyl
> Dima
> 
> 
> 
> 
> On Wed, Oct 15, 2008 at 02:08:06PM -0700, David Reiss wrote:
>> Can you post the error that you get?
>>
>> Dima Brodsky wrote:
>>> Hi,
>>>
>>> I am having trouble compiling thrift under OpenBSD 4.2.  Are
>>> there any special requirements for OpenBSD?  I have tried both
>>> thrift-20080411p1 and thrift from trun to no avail.
>>>
>>> Thanks!
>>> 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)
>>>
> 
> --
> 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)
> 

Re: Compiling thrift under OpenBSD 4.2

Posted by Dima Brodsky <di...@cs.ubc.ca>.
Sure,

First I needed to add:

#include <sys/types.h> before #include <netinet/in.h> in
lib/cpp/src/Thrift.h

Then I am getting:

g++ -DHAVE_CONFIG_H -I. -I../.. -Wall -Isrc -I/usr/local/include -g -O2 -MT libthrift_la-TimerManager.lo -MD -MP -MF .deps/libthrift_la-TimerManager.Tpo -c src/concurrency/TimerManager.cpp  -fPIC -DPIC -o .libs/libthrift_la-TimerManager.o
In file included from src/concurrency/Exception.h:11,
                 from src/concurrency/TimerManager.h:10,
                 from src/concurrency/TimerManager.cpp:7:
src/Thrift.h: In static member function `static void
   facebook::thrift::TOutput::errorTimeWrapper(const char*)':
src/Thrift.h:47: warning: array size (25) is smaller than minimum required (26)
src/concurrency/TimerManager.h: At global scope:
src/concurrency/TimerManager.h:94: error: `struct
   facebook::thrift::concurrency::TimerManager::Task' is private
src/concurrency/TimerManager.cpp:19: error: within this context
gmake[3]: *** [libthrift_la-TimerManager.lo] Error 1
gmake[3]: Leaving directory `/usr/local/src/thrift-20080411p1/lib/cpp'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/local/src/thrift-20080411p1/lib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/src/thrift-20080411p1'
gmake: *** [all] Error 2

gcc -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)

./configure --without-java

Thanks for your help!
ttyl
Dima




On Wed, Oct 15, 2008 at 02:08:06PM -0700, David Reiss wrote:
> Can you post the error that you get?
> 
> Dima Brodsky wrote:
> > Hi,
> > 
> > I am having trouble compiling thrift under OpenBSD 4.2.  Are
> > there any special requirements for OpenBSD?  I have tried both
> > thrift-20080411p1 and thrift from trun to no avail.
> > 
> > Thanks!
> > 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)
> > 

-- 
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) 


Re: Compiling thrift under OpenBSD 4.2

Posted by David Reiss <dr...@facebook.com>.
Can you post the error that you get?

Dima Brodsky wrote:
> Hi,
> 
> I am having trouble compiling thrift under OpenBSD 4.2.  Are
> there any special requirements for OpenBSD?  I have tried both
> thrift-20080411p1 and thrift from trun to no avail.
> 
> Thanks!
> 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)
>