Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make error: (long) unsigned int #31

Open
JHPHELAN opened this issue Feb 18, 2023 · 5 comments
Open

make error: (long) unsigned int #31

JHPHELAN opened this issue Feb 18, 2023 · 5 comments

Comments

@JHPHELAN
Copy link

JHPHELAN commented Feb 18, 2023

upon make there are MULTIPLE errors of the form:

In member function ‘int ydlidar::core::base::Thread::join(long unsigned int)’:
/home/ubuntu/YDLidar-SDK/./core/base/thread.h:118:18: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 2 has type ‘_size_t’ {aka ‘long unsigned int’} [-Wformat=]
118 | printf("0x%X thread has been canceled\n", this->_handle);
| ~^ ~~~~~~~~~~~~~
| | |
| unsigned int _size_t {aka long unsigned int}
| %lX

Despite this, the make seems to complete ok and the following sudo make install completes ok.

@ghdic
Copy link

ghdic commented Mar 5, 2023

I am also getting error in make.
this is my configuration

-- +===========================================================================+
-- |         Resulting configuration for                             |
-- +===========================================================================+
--  _________________________ PLATFORM _____________________________
--  Host                        : Darwin22.3.0arm64
--  Is the system big endian?   :  No
--  Word size (32/64 bit)       : 64
--  CMake version               : 3.25.2
--  CMake generator             : Unix Makefiles
--  CMake build tool            : /usr/bin/make
--  Compiler                    : Clang
--  Configuration               :
--
--  __________________________ OPTIONS _____________________________
--  Build YDLidar-SDK as a shared library?   :  No
--  Build Examples?               : Yes
--  Build C Sharp API?             :  No
--  Build TEST?  			    : Yes
--
--  _________________________ INSTALL _____________________
--  Install prefix                    : /usr/local
--
--  _______________________ WRAPPERS/BINDINGS ______________________
--  Python bindings (pyydlidar)   :  No
--   - dep: Swig found?       :  No [Version: ]
--   - dep: PythonLibs found?  : Yes [Version: 3.11]
--
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/life/Downloads/YDLidar-SDK-1.1.1/build

and this is my error log when I written make

~/Downloads/YDLidar-SDK-1.1.1/build ❯ make
[  3%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/base/timer.cpp.o
[  7%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/common/ydlidar_def.cpp.o
[ 11%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/network/ActiveSocket.cpp.o
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:43:
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.h:46:
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:120:16: error: use of undeclared identifier 'SHUT_RD'
    Receives = SHUT_RD, ///< Shutdown passive socket.
               ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:121:13: error: use of undeclared identifier 'SHUT_WR'
    Sends = SHUT_WR,    ///< Shutdown active socket.
            ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:122:12: error: use of undeclared identifier 'SHUT_RDWR'
    Both = SHUT_RDWR    ///< Shutdown both active and passive sockets.
           ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:463:3: error: unknown type name 'SOCKET'
  SOCKET GetSocketDescriptor() {
  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:619:24: error: unknown type name 'SOCKET'
  void SetSocketHandle(SOCKET socket) {
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:653:3: error: unknown type name 'SOCKET'
  SOCKET               m_socket;            /// socket handle
  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:669:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stClientSockaddr;  /// client address
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:670:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stMulticastGroup;  /// multicast group to bind to
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:671:24: error: field has incomplete type 'struct linger'
  struct linger        m_stLinger;          /// linger flag
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:671:10: note: forward declaration of 'ydlidar::core::network::linger'
  struct linger        m_stLinger;          /// linger flag
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:506:26: error: use of undeclared identifier 'SO_RCVBUF'
    return GetWindowSize(SO_RCVBUF);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:513:26: error: use of undeclared identifier 'SO_SNDBUF'
    return GetWindowSize(SO_SNDBUF);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:520:26: error: use of undeclared identifier 'SO_RCVBUF'
    return SetWindowSize(SO_RCVBUF, nWindowSize);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:527:26: error: use of undeclared identifier 'SO_SNDBUF'
    return SetWindowSize(SO_SNDBUF, nWindowSize);
                         ^
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:43:
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.h:64:5: error: cannot initialize object parameter of type 'ydlidar::core::network::CSimpleSocket' with an expression of type 'ydlidar::core::network::CActiveSocket'
    Close();
    ^~~~~
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:62:18: error: variable has incomplete type 'struct in_addr'
  struct in_addr stIpAddress;
                 ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:62:10: note: forward declaration of 'in_addr'
  struct in_addr stIpAddress;
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:68:35: error: use of undeclared identifier 'AF_INET'
  m_stServerSockaddr.sin_family = AF_INET;
                                  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:70:16: error: use of undeclared identifier 'GETHOSTBYNAME'
  if ((m_pHE = GETHOSTBYNAME(pAddr)) == NULL) {
               ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:75:9: error: use of undeclared identifier 'h_errno'
    if (h_errno == HOST_NOT_FOUND) {
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/ydlidar_sdk.dir/core/network/ActiveSocket.cpp.o] Error 1
make[1]: *** [CMakeFiles/ydlidar_sdk.dir/all] Error 2
make: *** [all] Error 2

Looking at the source code, it seems that I have to fix the error directly. Am I the only one like that?

@mjlee111
Copy link

I am also getting error in make. this is my configuration

-- +===========================================================================+
-- |         Resulting configuration for                             |
-- +===========================================================================+
--  _________________________ PLATFORM _____________________________
--  Host                        : Darwin22.3.0arm64
--  Is the system big endian?   :  No
--  Word size (32/64 bit)       : 64
--  CMake version               : 3.25.2
--  CMake generator             : Unix Makefiles
--  CMake build tool            : /usr/bin/make
--  Compiler                    : Clang
--  Configuration               :
--
--  __________________________ OPTIONS _____________________________
--  Build YDLidar-SDK as a shared library?   :  No
--  Build Examples?               : Yes
--  Build C Sharp API?             :  No
--  Build TEST?  			    : Yes
--
--  _________________________ INSTALL _____________________
--  Install prefix                    : /usr/local
--
--  _______________________ WRAPPERS/BINDINGS ______________________
--  Python bindings (pyydlidar)   :  No
--   - dep: Swig found?       :  No [Version: ]
--   - dep: PythonLibs found?  : Yes [Version: 3.11]
--
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/life/Downloads/YDLidar-SDK-1.1.1/build

and this is my error log when I written make

~/Downloads/YDLidar-SDK-1.1.1/build ❯ make
[  3%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/base/timer.cpp.o
[  7%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/common/ydlidar_def.cpp.o
[ 11%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/network/ActiveSocket.cpp.o
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:43:
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.h:46:
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:120:16: error: use of undeclared identifier 'SHUT_RD'
    Receives = SHUT_RD, ///< Shutdown passive socket.
               ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:121:13: error: use of undeclared identifier 'SHUT_WR'
    Sends = SHUT_WR,    ///< Shutdown active socket.
            ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:122:12: error: use of undeclared identifier 'SHUT_RDWR'
    Both = SHUT_RDWR    ///< Shutdown both active and passive sockets.
           ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:463:3: error: unknown type name 'SOCKET'
  SOCKET GetSocketDescriptor() {
  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:619:24: error: unknown type name 'SOCKET'
  void SetSocketHandle(SOCKET socket) {
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:653:3: error: unknown type name 'SOCKET'
  SOCKET               m_socket;            /// socket handle
  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:669:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stClientSockaddr;  /// client address
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:670:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stMulticastGroup;  /// multicast group to bind to
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:671:24: error: field has incomplete type 'struct linger'
  struct linger        m_stLinger;          /// linger flag
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:671:10: note: forward declaration of 'ydlidar::core::network::linger'
  struct linger        m_stLinger;          /// linger flag
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:506:26: error: use of undeclared identifier 'SO_RCVBUF'
    return GetWindowSize(SO_RCVBUF);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:513:26: error: use of undeclared identifier 'SO_SNDBUF'
    return GetWindowSize(SO_SNDBUF);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:520:26: error: use of undeclared identifier 'SO_RCVBUF'
    return SetWindowSize(SO_RCVBUF, nWindowSize);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:527:26: error: use of undeclared identifier 'SO_SNDBUF'
    return SetWindowSize(SO_SNDBUF, nWindowSize);
                         ^
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:43:
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.h:64:5: error: cannot initialize object parameter of type 'ydlidar::core::network::CSimpleSocket' with an expression of type 'ydlidar::core::network::CActiveSocket'
    Close();
    ^~~~~
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:62:18: error: variable has incomplete type 'struct in_addr'
  struct in_addr stIpAddress;
                 ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:62:10: note: forward declaration of 'in_addr'
  struct in_addr stIpAddress;
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:68:35: error: use of undeclared identifier 'AF_INET'
  m_stServerSockaddr.sin_family = AF_INET;
                                  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:70:16: error: use of undeclared identifier 'GETHOSTBYNAME'
  if ((m_pHE = GETHOSTBYNAME(pAddr)) == NULL) {
               ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:75:9: error: use of undeclared identifier 'h_errno'
    if (h_errno == HOST_NOT_FOUND) {
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/ydlidar_sdk.dir/core/network/ActiveSocket.cpp.o] Error 1
make[1]: *** [CMakeFiles/ydlidar_sdk.dir/all] Error 2
make: *** [all] Error 2

Looking at the source code, it seems that I have to fix the error directly. Am I the only one like that?

Have you solved the problem? 문제 혹시 해결하셨을까요?

@JHPHELAN
Copy link
Author

@mjlee111
@ghdic
I found that, although there are unsigned int errors in 'make', it didn't fail.
Also 'sudo make install' installs ok.

@beautyfree
Copy link

beautyfree commented Jun 22, 2023

I am also getting error in make. this is my configuration

-- +===========================================================================+
-- |         Resulting configuration for                             |
-- +===========================================================================+
--  _________________________ PLATFORM _____________________________
--  Host                        : Darwin22.3.0arm64
--  Is the system big endian?   :  No
--  Word size (32/64 bit)       : 64
--  CMake version               : 3.25.2
--  CMake generator             : Unix Makefiles
--  CMake build tool            : /usr/bin/make
--  Compiler                    : Clang
--  Configuration               :
--
--  __________________________ OPTIONS _____________________________
--  Build YDLidar-SDK as a shared library?   :  No
--  Build Examples?               : Yes
--  Build C Sharp API?             :  No
--  Build TEST?  			    : Yes
--
--  _________________________ INSTALL _____________________
--  Install prefix                    : /usr/local
--
--  _______________________ WRAPPERS/BINDINGS ______________________
--  Python bindings (pyydlidar)   :  No
--   - dep: Swig found?       :  No [Version: ]
--   - dep: PythonLibs found?  : Yes [Version: 3.11]
--
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/life/Downloads/YDLidar-SDK-1.1.1/build

and this is my error log when I written make

~/Downloads/YDLidar-SDK-1.1.1/build ❯ make
[  3%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/base/timer.cpp.o
[  7%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/common/ydlidar_def.cpp.o
[ 11%] Building CXX object CMakeFiles/ydlidar_sdk.dir/core/network/ActiveSocket.cpp.o
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:43:
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.h:46:
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:120:16: error: use of undeclared identifier 'SHUT_RD'
    Receives = SHUT_RD, ///< Shutdown passive socket.
               ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:121:13: error: use of undeclared identifier 'SHUT_WR'
    Sends = SHUT_WR,    ///< Shutdown active socket.
            ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:122:12: error: use of undeclared identifier 'SHUT_RDWR'
    Both = SHUT_RDWR    ///< Shutdown both active and passive sockets.
           ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:463:3: error: unknown type name 'SOCKET'
  SOCKET GetSocketDescriptor() {
  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:619:24: error: unknown type name 'SOCKET'
  void SetSocketHandle(SOCKET socket) {
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:653:3: error: unknown type name 'SOCKET'
  SOCKET               m_socket;            /// socket handle
  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:669:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stClientSockaddr;  /// client address
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:670:24: error: field has incomplete type 'struct sockaddr_in'
  struct sockaddr_in   m_stMulticastGroup;  /// multicast group to bind to
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:668:10: note: forward declaration of 'ydlidar::core::network::sockaddr_in'
  struct sockaddr_in   m_stServerSockaddr;  /// server address
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:671:24: error: field has incomplete type 'struct linger'
  struct linger        m_stLinger;          /// linger flag
                       ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:671:10: note: forward declaration of 'ydlidar::core::network::linger'
  struct linger        m_stLinger;          /// linger flag
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:506:26: error: use of undeclared identifier 'SO_RCVBUF'
    return GetWindowSize(SO_RCVBUF);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:513:26: error: use of undeclared identifier 'SO_SNDBUF'
    return GetWindowSize(SO_SNDBUF);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:520:26: error: use of undeclared identifier 'SO_RCVBUF'
    return SetWindowSize(SO_RCVBUF, nWindowSize);
                         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/SimpleSocket.h:527:26: error: use of undeclared identifier 'SO_SNDBUF'
    return SetWindowSize(SO_SNDBUF, nWindowSize);
                         ^
In file included from /Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:43:
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.h:64:5: error: cannot initialize object parameter of type 'ydlidar::core::network::CSimpleSocket' with an expression of type 'ydlidar::core::network::CActiveSocket'
    Close();
    ^~~~~
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:62:18: error: variable has incomplete type 'struct in_addr'
  struct in_addr stIpAddress;
                 ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:62:10: note: forward declaration of 'in_addr'
  struct in_addr stIpAddress;
         ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:68:35: error: use of undeclared identifier 'AF_INET'
  m_stServerSockaddr.sin_family = AF_INET;
                                  ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:70:16: error: use of undeclared identifier 'GETHOSTBYNAME'
  if ((m_pHE = GETHOSTBYNAME(pAddr)) == NULL) {
               ^
/Users/life/Downloads/YDLidar-SDK-1.1.1/core/network/ActiveSocket.cpp:75:9: error: use of undeclared identifier 'h_errno'
    if (h_errno == HOST_NOT_FOUND) {
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/ydlidar_sdk.dir/core/network/ActiveSocket.cpp.o] Error 1
make[1]: *** [CMakeFiles/ydlidar_sdk.dir/all] Error 2
make: *** [all] Error 2

Looking at the source code, it seems that I have to fix the error directly. Am I the only one like that?

same errors on my side

@JHPHELAN
Copy link
Author

Having upgraded to Ubuntu 22.04 and ROS2 Humble have re-attempted install and get the same "long unsigned int" warnings, but does not crash. Would be fantastic if a better coder that I (a very low bar indeed) would update the code to eliminate these warnings before they become errors with the next upgrade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants