Skip to content

ASIO doesn't compile on Mac OS (IDFGH-13243) #614

Closed
@moreana

Description

@moreana

Answers checklist.

  • I have read the documentation for esp-protocols components and the issue is not addressed there.
  • I have updated my esp-protocols branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

esp-idf: v5.2.2
asio: v1.28.2

I am trying to compile tcp_echo_server example from ASIO and I get such linking errors:

/Users/attila/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/espressif__asio/libespressif__asio.a(asio.cpp.obj):(.literal._ZN4asio6detail10socket_ops9inet_ntopEiPKvPcjmRSt10error_code+0x4): undefined reference to `if_indextoname'
/Users/attila/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/espressif__asio/libespressif__asio.a(asio.cpp.obj):(.literal._ZN4asio6detail18signal_set_service16open_descriptorsEv+0x4): undefined reference to `pipe'
/Users/attila/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/espressif__asio/libespressif__asio.a(asio.cpp.obj): in function `_ZN4asio6detail10socket_ops9inet_ntopEiPKvPcjmRSt10error_code':
/Users/attila/projects/esp/esp-idf/examples/wifi/scan/managed_components/espressif__asio/asio/asio/include/asio/detail/impl/socket_ops.ipp:2519:(.text._ZN4asio6detail10socket_ops9inet_ntopEiPKvPcjmRSt10error_code+0xa2): undefined reference to `if_indextoname'
/Users/attila/.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/espressif__asio/libespressif__asio.a(asio.cpp.obj): in function `_ZN4asio6detail18signal_set_service16open_descriptorsEv':
/Users/attila/projects/esp/esp-idf/examples/wifi/scan/managed_components/espressif__asio/asio/asio/include/asio/execution_context.hpp:400:(.text._ZN4asio6detail18signal_set_service16open_descriptorsEv+0xa): undefined reference to `pipe'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /Users/attila/projects/esp/esp-idf/examples/wifi/scan/managed_components/espressif__asio/examples/tcp_echo_server/build/log/idf_py_stderr_output_14993 and /Users/attila/projects/esp/esp-idf/examples/wifi/scan/managed_components/espressif__asio/examples/tcp_echo_server/build/log/idf_py_stdout_output_14993

There is no definition for pipe and if_indextoname and I am not sure where these functions should come from.

Could you please help me to solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions