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: Ian Gough
Subject: RE: Building CC++ on Mac OS X
Date: Tue, 14 Jan 2003 12:28:59 -0500

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

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.

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.

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;}

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


-----Original Message-----
From: Federico Montesino Pouzols [mailto:address@hidden On
Behalf Of Federico Montesino Pouzols
Sent: Saturday, January 11, 2003 8:47 AM
To: Ian Gough
Cc: 'bug-commoncpp'
Subject: Re: Building CC++ on Mac OS X



        I do not recall any report of cc++ working on Max OS X, the
autotools things should work however. What troubles did you find? The
files in freebsd/ are meant to build packages for the ports collection
through the freebsd pkg tools.

On Fri, Jan 10, 2003 at 01:55:06PM -0500, Ian Gough wrote:
> Has anybody built Common C++ on Mac OS X (FreeBSD based) yet? If so, 
> is there a trick to get the system built or should it be built 
> differently from, say Linux? I have already figured out the 
> libtoolize-glibtoolize problem, but the automake system doesn't seem 
> to recognize this as a BSD system. How does the freebsd subdir fit 
> into the equation?
>  
>  
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden 
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp






reply via email to

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