Skip to content

use of undeclared identifier 'udp' #372

@letalvoj

Description

@letalvoj

Hey. I tried to build the lib via the steps from the readme. It failed on

/Applications/Xcode.app/Contents/Developer/usr/bin/make -j9  check-am
  CC       examples/echoserver/echoserver.o
  CC       examples/echoserver/tests_api_test-echoserver.o
  CC       examples/echoserver/tests_testsuite_test-echoserver.o
  CCLD     src/libwolfssh.la
In file included from examples/echoserver/echoserver.c:40:
./wolfssh/test.h:444:33: error: use of undeclared identifier 'udp'
            hints.ai_socktype = udp ? SOCK_DGRAM : SOCK_STREAM;
                                ^
In file included from examples/echoserver/echoserver.c:40:
./wolfssh/test.h:444:33: error: use of undeclared identifier 'udp'
            hints.ai_socktype = udp ? SOCK_DGRAM : SOCK_STREAM;
                                ^
./wolfssh/test.h:445:33: error: use of undeclared identifier 'udp'
            hints.ai_protocol = udp ? IPPROTO_UDP : IPPROTO_TCP;
                                ^
./wolfssh/test.h:445:33: error: use of undeclared identifier 'udp'
            hints.ai_protocol = udp ? IPPROTO_UDP : IPPROTO_TCP;
                                ^
In file included from examples/echoserver/echoserver.c:40:
./wolfssh/test.h:444:33: error: use of undeclared identifier 'udp'
            hints.ai_socktype = udp ? SOCK_DGRAM : SOCK_STREAM;
                                ^
./wolfssh/test.h:445:33: error: use of undeclared identifier 'udp'
            hints.ai_protocol = udp ? IPPROTO_UDP : IPPROTO_TCP;
                                ^
2 errors generated.
2 errors generated.
2 errors generated.
make[1]: *** [examples/echoserver/tests_api_test-echoserver.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [examples/echoserver/tests_testsuite_test-echoserver.o] Error 1
make[1]: *** [examples/echoserver/echoserver.o] Error 1
Undefined symbols for architecture x86_64:
  "_mp_clear", referenced from:
      _DoPacket in libwolfssh_la-internal.o
  "_mp_init", referenced from:
      _DoPacket in libwolfssh_la-internal.o
  "_mp_read_unsigned_bin", referenced from:
      _DoPacket in libwolfssh_la-internal.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [src/libwolfssh.la] Error 1
make: *** [check] Error 2

My compiler is

$gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.3)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```

Does it ring a bell? Could someone help me make it compile please? 🙏 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions