miniupnp / miniupnp

UPnP IGD implementation

Home Page:http://miniupnp.free.fr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build fail if enable portmap and miniupnp with last commit

GreatMichaelLee opened this issue · comments

in debian and ubuntu

when I set configure to enable miniupnp and natpmp like the following(it works on last month's build)

./configure --enable-pthread --enable-miniupnp --enable-natpmp --enable-cap --enable-pcap CFLAGS="-O3 -march=native -U__RDSEED__ -DN2N_OPTION_USE_PORTMAPPING"

it finally output the following link error:

x86_64-linux-gnu-gcc -O3 -march=native -U__RDSEED__ -DN2N_OPTION_USE_PORTMAPPING -I./include -I../include -g3 -c -o n2n-benchmark.o n2n-benchmark.c
x86_64-linux-gnu-gcc -pthread -L. -L.. n2n-benchmark.o -ln2n -o n2n-benchmark
x86_64-linux-gnu-gcc -O3 -march=native -U__RDSEED__ -DN2N_OPTION_USE_PORTMAPPING -I./include -I../include -g3 -c -o n2n-keygen.o n2n-keygen.c
x86_64-linux-gnu-gcc -pthread -L. -L.. n2n-keygen.o -ln2n -o n2n-keygen
x86_64-linux-gnu-gcc -O3 -march=native -U__RDSEED__ -DN2N_OPTION_USE_PORTMAPPING -I./include -I../include -g3 -c -o n2n-route.o n2n-route.c
x86_64-linux-gnu-gcc -pthread -L. -L.. n2n-route.o -ln2n -o n2n-route
x86_64-linux-gnu-gcc -O3 -march=native -U__RDSEED__ -DN2N_OPTION_USE_PORTMAPPING -I./include -I../include -g3 -c -o n2n-portfwd.o n2n-portfwd.c
x86_64-linux-gnu-gcc -pthread -L. -L.. n2n-portfwd.o -ln2n -o n2n-portfwd
/usr/bin/ld: ../libn2n.a(n2n_port_mapping.o): in function n2n_natpmp_initialization': n2n_port_mapping.c:(.text+0x21): undefined reference to initnatpmp'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x5f): undefined reference to sendpublicaddressrequest' /usr/bin/ld: n2n_port_mapping.c:(.text+0xc2): undefined reference to getnatpmprequesttimeout'
/usr/bin/ld: n2n_port_mapping.c:(.text+0xe1): undefined reference to readnatpmpresponseorretry' /usr/bin/ld: n2n_port_mapping.c:(.text+0x218): undefined reference to closenatpmp'
/usr/bin/ld: ../libn2n.a(n2n_port_mapping.o): in function n2n_UPNP_GetValidIGD': n2n_port_mapping.c:(.text+0x27f): undefined reference to upnpDiscover'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x348): undefined reference to UPNP_GetValidIGD' /usr/bin/ld: n2n_port_mapping.c:(.text+0x358): undefined reference to freeUPNPDevlist'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x391): undefined reference to UPNP_GetExternalIPAddress' /usr/bin/ld: n2n_port_mapping.c:(.text+0x3b3): undefined reference to strupnperror'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x409): undefined reference to strupnperror' /usr/bin/ld: n2n_port_mapping.c:(.text+0x436): undefined reference to freeUPNPDevlist'
/usr/bin/ld: ../libn2n.a(n2n_port_mapping.o): in function n2n_upnp_set_port_mapping': n2n_port_mapping.c:(.text+0x536): undefined reference to UPNP_AddPortMapping'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x5a3): undefined reference to UPNP_AddPortMapping' /usr/bin/ld: n2n_port_mapping.c:(.text+0x5b8): undefined reference to strupnperror'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x5f3): undefined reference to FreeUPNPUrls' /usr/bin/ld: n2n_port_mapping.c:(.text+0x613): undefined reference to strupnperror'
/usr/bin/ld: ../libn2n.a(n2n_port_mapping.o): in function n2n_upnp_del_port_mapping': n2n_port_mapping.c:(.text+0x75b): undefined reference to UPNP_DeletePortMapping'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x7a9): undefined reference to UPNP_DeletePortMapping' /usr/bin/ld: n2n_port_mapping.c:(.text+0x7ba): undefined reference to strupnperror'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x7f1): undefined reference to FreeUPNPUrls' /usr/bin/ld: n2n_port_mapping.c:(.text+0x813): undefined reference to strupnperror'
/usr/bin/ld: ../libn2n.a(n2n_port_mapping.o): in function n2n_natpmp_port_mapping_request': n2n_port_mapping.c:(.text+0x8f6): undefined reference to sendnewportmappingrequest'
/usr/bin/ld: n2n_port_mapping.c:(.text+0x957): undefined reference to getnatpmprequesttimeout' /usr/bin/ld: n2n_port_mapping.c:(.text+0x976): undefined reference to readnatpmpresponseorretry'
/usr/bin/ld: ../libn2n.a(n2n_port_mapping.o): in function n2n_set_port_mapping': n2n_port_mapping.c:(.text+0xb47): undefined reference to closenatpmp'
/usr/bin/ld: n2n_port_mapping.c:(.text+0xbd8): undefined reference to closenatpmp' /usr/bin/ld: n2n_port_mapping.c:(.text+0xc1e): undefined reference to closenatpmp'
/usr/bin/ld: ../libn2n.a(n2n_port_mapping.o): in function n2n_del_port_mapping': n2n_port_mapping.c:(.text+0xcee): undefined reference to closenatpmp'
/usr/bin/ld: n2n_port_mapping.c:(.text+0xd67): undefined reference to closenatpmp' /usr/bin/ld: ../libn2n.a(n2n_port_mapping.o):n2n_port_mapping.c:(.text+0xdaa): more undefined references to closenatpmp' follow
collect2: error: ld returned 1 exit status
make[1]: *** [: n2n-portfwd] Error 1
make[1]: Leaving directory '/root/n2n-3.0/tools'
make: *** [Makefile:199: tools] Error 2
root@Supernode-AL:~/n2n-3.0#

I guess you are not in the right place :) @GreatMichaelLee