Menu

#186 Building on OS X - Intel

closed-out-of-date
player (137)
5
2007-12-11
2006-05-10
No

I got a whole bunch of errors. I'm not very experienced with building
software that isn't mine, so my fixes might seem hackish. Anyway, here
goes some problems and solutions:

(using gcc-4.0.1)

1) (a lot of these)
/usr/include/sys/socket.h:99: error: multiple types in one declaration
/usr/include/sys/socket.h:99: error: declaration does not declare
anything

solution: Copied socket.h to project, added a semicolon to beginning
of line 99 and made sure this file was used instead of the system file.
(is this an Apple bug?)

2)
playertcp.cc: In member function 'int PlayerTCP::Accept(int)':
playertcp.cc:292: error: invalid conversion from 'int*' to 'socklen_t*'
playertcp.cc:292: error: initializing argument 3 of 'int accept(int,
sockaddr*, socklen_t*)'

solution: Commented out that whole [error-checking] if statement

3) (a lot of these)
../../../../replace/replace.h:11: error: stray '#' in program

solution: Edit Makefile to remove -traditional-cpp.

4) (just a warning)
In file included from ../replace/replace.h:11,
from playertcp.cc:38:
../config.h:320:1: warning: "O_SYNC" redefined
In file included from /usr/include/fcntl.h:23,
from playertcp.cc:32:
/usr/include/sys/fcntl.h:123:1: warning: this is the location of the
previous definition

solution: Put #ifndef arount #define O_SYNC in config.h

Hope this is helpful.

Can anybody enlighten me on why you would ever want to use -
traditional-cpp with modern code, and in particular why so many open
source packages on the Mac tries to use it and subsequently fails?
Whenever I see a build fail, I go look for -traditional-cpp and that's
usually it.

Discussion

  • Richard Vaughan

    Richard Vaughan - 2006-07-19

    Logged In: YES
    user_id=139639

    For the record, I can build Player CVS HEAD with no changes on OS X 10.4.7
    Intel and PPC. I don't know why gladmac is having these problems. Any one have
    ideas?

     
  • Brian Gerkey

    Brian Gerkey - 2007-12-11

    Logged In: YES
    user_id=211013
    Originator: NO

    I've been able to build Player from HEAD and 2.0.x on various verions of OS X 10.4 for ages now. On that basis, I'm closing this bug.

     
  • Brian Gerkey

    Brian Gerkey - 2007-12-11
    • status: open --> closed-out-of-date
     

Log in to post a comment.