Not being able to build the code
Posted: Wed Jan 22, 2025 2:58 am
im trying to build this library:https://github.com/martin-ger/esp32_nat_router
without changing anything, and whatever version I use of esp-idf, I get the same error
the error:
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj):(.literal.apply_portmap_tab+0x8): undefined reference to ip_portmap_add' /home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj):(.literal.delete_portmap_tab+0x0): undefined reference to ip_portmap_remove'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function apply_portmap_tab': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:324: undefined reference to ip_portmap_add'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function delete_portmap_tab': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:134: undefined reference to ip_portmap_remove'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function add_portmap': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:201: undefined reference to ip_portmap_add'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function del_portmap': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:227: undefined reference to ip_portmap_remove'
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 /home/mersin/esp/esp32_nat_router/esp32_nat_router/build/log/idf_py_stderr_output_8810 and /home/mersin/esp/esp32_nat_router/esp32_nat_router/build/log/idf_py_stdout_output_8810
without changing anything, and whatever version I use of esp-idf, I get the same error
the error:
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj):(.literal.apply_portmap_tab+0x8): undefined reference to ip_portmap_add' /home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj):(.literal.delete_portmap_tab+0x0): undefined reference to ip_portmap_remove'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function apply_portmap_tab': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:324: undefined reference to ip_portmap_add'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function delete_portmap_tab': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:134: undefined reference to ip_portmap_remove'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function add_portmap': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:201: undefined reference to ip_portmap_add'
/home/mersin/.espressif/tools/xtensa-esp32-elf/esp-12.2.0_20230208/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/12.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/main/libmain.a(esp32_nat_router.c.obj): in function del_portmap': /home/mersin/esp/esp32_nat_router/esp32_nat_router/main/esp32_nat_router.c:227: undefined reference to ip_portmap_remove'
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 /home/mersin/esp/esp32_nat_router/esp32_nat_router/build/log/idf_py_stderr_output_8810 and /home/mersin/esp/esp32_nat_router/esp32_nat_router/build/log/idf_py_stdout_output_8810