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
Not being able to build the code
-
- Posts: 138
- Joined: Thu Oct 03, 2019 10:52 pm
- Contact:
Re: Not being able to build the code
I was able to build this version.
Code: Select all
$ idf.py --version
ESP-IDF v5.3.2-1-g9a6aba7401-dirty
Code: Select all
$ idf.py build
Project build complete. To flash, run:
idf.py flash
or
idf.py -p PORT flash
or
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 2MB --flash_freq 40m 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/esp32_nat_router.bin
or from the "/home/nop/esp32_nat_router/build" directory
python -m esptool --chip esp32 -b 460800 --before default_reset --after hard_reset write_flash "@flash_args"
Re: Not being able to build the code
Thanks for the awnser, solved my problem !!
Who is online
Users browsing this forum: No registered users and 94 guests