Building on macOS Big Sur
hex opened this issue · comments
Is it possible to build this on macOS Big Sur?
I get the following errors when following the build instructions:
[ 80%] Building CXX object bullet/Extras/BulletRoboticsGUI/CMakeFiles/BulletRoboticsGUI.dir/__/__/examples/SharedMemory/RemoteGUIHelperTCP.o
In file included from /Users/hex/Desktop/bullet/bullet3/examples/SharedMemory/RemoteGUIHelperTCP.cpp:17:
In file included from /Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/ActiveSocket.h:46:
In file included from /Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:85:
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:90:2: error: unknown type name 'uint32'
uint32 GetMilliSeconds() { return (CalcTotalUSec() / MILLISECONDS_CONVERSION); };
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:91:2: error: unknown type name 'uint32'
uint32 GetMicroSeconds() { return (CalcTotalUSec()); };
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:92:2: error: unknown type name 'uint32'
uint32 GetSeconds() { return (CalcTotalUSec() / MICROSECONDS_CONVERSION); };
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:94:2: error: unknown type name 'uint32'
uint32 GetCurrentTime()
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:102:2: error: unknown type name 'uint32'
uint32 CalcTotalUSec() { return (((m_endTime.tv_sec - m_startTime.tv_sec) * MICROSECONDS_CONVERSION) +
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:85:24: error: use of undeclared identifier 'gettimeofday'
void SetStartTime() { GET_CLOCK_COUNT(&m_startTime); };
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:63:28: note: expanded from macro 'GET_CLOCK_COUNT'
#define GET_CLOCK_COUNT(x) gettimeofday(x, NULL)
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:88:22: error: use of undeclared identifier 'gettimeofday'
void SetEndTime() { GET_CLOCK_COUNT(&m_endTime); };
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:63:28: note: expanded from macro 'GET_CLOCK_COUNT'
#define GET_CLOCK_COUNT(x) gettimeofday(x, NULL)
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:97:3: error: use of undeclared identifier 'gettimeofday'
GET_CLOCK_COUNT(&tmpTime);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/StatTimer.h:63:28: note: expanded from macro 'GET_CLOCK_COUNT'
#define GET_CLOCK_COUNT(x) gettimeofday(x, NULL)
^
In file included from /Users/hex/Desktop/bullet/bullet3/examples/SharedMemory/RemoteGUIHelperTCP.cpp:17:
In file included from /Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/ActiveSocket.h:46:
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:108:14: error: use of undeclared identifier 'SHUT_RD'
Receives = SHUT_RD, ///< Shutdown passive socket.
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:109:11: error: use of undeclared identifier 'SHUT_WR'
Sends = SHUT_WR, ///< Shutdown active socket.
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:110:10: error: use of undeclared identifier 'SHUT_RDWR'
Both = SHUT_RDWR ///< Shutdown both active and passive sockets.
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:197:22: error: unknown type name 'int32'
virtual bool Select(int32 nTimeoutSec, int32 nTimeoutUSec);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:197:41: error: unknown type name 'int32'
virtual bool Select(int32 nTimeoutSec, int32 nTimeoutUSec);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:228:10: error: unknown type name 'int32'
virtual int32 Receive(int32 nMaxBytes = 1, uint8 *pBuffer = 0);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:228:24: error: unknown type name 'int32'
virtual int32 Receive(int32 nMaxBytes = 1, uint8 *pBuffer = 0);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:228:45: error: unknown type name 'uint8'
virtual int32 Receive(int32 nMaxBytes = 1, uint8 *pBuffer = 0);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:236:10: error: unknown type name 'int32'
virtual int32 Send(const uint8 *pBuf, size_t bytesToSend);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:236:27: error: unknown type name 'uint8'
virtual int32 Send(const uint8 *pBuf, size_t bytesToSend);
^
/Users/hex/Desktop/bullet/bullet3/examples/ThirdPartyLibs/clsocket/src/SimpleSocket.h:246:10: error: unknown type name 'int32'
virtual int32 Send(const struct iovec *sendVector, int32 nNumItems);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [bullet/Extras/BulletRoboticsGUI/CMakeFiles/BulletRoboticsGUI.dir/__/__/examples/SharedMemory/RemoteGUIHelperTCP.o] Error 1
make[1]: *** [bullet/Extras/BulletRoboticsGUI/CMakeFiles/BulletRoboticsGUI.dir/all] Error 2
make: *** [all] Error 2
I managed to build it by enabling the BUILD_CLSOCKET flag.