bug-commoncpp
[Top][All Lists]
Advanced

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

Re: Building CC++ on Mac OS X


From: Federico Montesino Pouzols
Subject: Re: Building CC++ on Mac OS X
Date: Fri, 17 Jan 2003 13:39:08 +0100
User-agent: Mutt/1.4i

        Hi,...

On Tue, Jan 14, 2003 at 12:28:59PM -0500, Ian Gough wrote:
> Here is what I found. Unfortunatly, I am not familiar with the
> autotools, so I cannot make the changes to that part of the code with
> any degree of confidence, so I hacked files and makefiles to get it to
> build. I will leave it to somebody confident with the autotools to
> figure out how to fix this in the proper manner. Note that this only
> gets it to build, though the demos still have build problems that I
> didn't look into yet (../include/cc++/xml.h:323:2: #error "XML support
> is not available.")
> 
> I am in the process of testing the lib now.
> 
> 1) in thread.cpp: sched_getscheduler does not exist on the Mac so I
> added -D__FreeBSD__=4 to CXXFLAGS in the Makefile
> 

        It may be that it does not exist or that it is defined in a
different system header. Is there a sched.h? Also, could you grep for
sched_getscheduler through your system headers?

> 2) in file.cpp: lockf is not fully implemented on the Mac; the structs
> are there and the symbolic constants, but the function signature is
> missing from the include files. So, though HAVE_SYS_FILE_H is defined,
> which causes sys/file.h to be included, which defines F_LOCK, there is
> no lockf so the lockf included in file.cpp needs to be used. Added -DMAC
> to the makefile and added code in file.cpp to cause its version of lockf
> to be conditionally compiled when MAC is set.
> 

        May it be defined in some strange header?

> 3) in socket.h: socklen_t is undefined. I found references on the inet
> that spec that FreeBSD prior to 4.x and Solaris prior to 7 (2.7) do not
> define the type socklen_t and some of the mac os X is based on FreeBSD
> 4.4. To cause this to be defined, I included -D_BSD_SOCKLEN_T_=int in
> the Makefile.
> 

        Um, we will add a configuration test for this, in order to
define _BSD_SOCKLEN_T when it is missing.

> 4) in network.cpp:
> g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY
> -g -O2 -D_GNU_SOURCE -D__FreeBSD__=4 -DMAC -D_BSD_SOCKLEN_T_=int -Wall
> -ansi -pedantic -I../include -c network.cpp -MT network.lo -MD -MP -MF
> .deps/network.TPlo  -fno-common -DPIC -o .libs/network.lo
> network.cpp: In function `bool
>    ost::enumNetworkDevices(std::vector<ost::NetworkDeviceInfo,
>    std::allocator<ost::NetworkDeviceInfo> >&)':
> network.cpp:110: ambiguous overload for `ost::InetAddress& = u_int32_t'
>    operator
> ../include/cc++/socket.h:300: candidates are: ost::InetAddress&
>    ost::InetAddress::operator=(const char*)
> ../include/cc++/socket.h:308:                 ost::InetAddress&
>    ost::InetAddress::operator=(long unsigned int)
> make: *** [network.lo] Error 1
> 
> Added a new assignment operator to c++/socket.h as specified in email
> from Mark Purcell
>       inline InetAddress &operator=(unsigned int addr)
>               {return *this = (unsigned long) addr;}
> 

        This is already fixed in CVS.

> 5) in serial.cpp
> g++ -DHAVE_CONFIG_H -I. -I. -I../include -I../src -DCCXX_EXPORT_LIBRARY
> -g -O2 -D_GNU_SOURCE -D__FreeBSD__=4 -DMAC -D_BSD_SOCKLEN_T_=int -Wall
> -ansi -pedantic -I../include -c serial.cpp -MT serial.lo -MD -MP -MF
> .deps/serial.TPlo  -fno-common -DPIC -o .libs/serial.lo
> serial.cpp: In member function `void ost::Serial::initConfig()':
> serial.cpp:203: `ioctl' undeclared (first use this function)
> serial.cpp:203: (Each undeclared identifier is reported only once for
> each
>    function it appears in.)
> 
> Added
> #include <sys/ioctl.h>
> to serial.cpp
> 
> 

        Fixed in CVS. Probably on other systems sys/ioctl.h is
included indirectly thorugh other system headers.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]