|
From: | address@hidden |
Subject: | Re: [lwip-devel] Desiderata for 2.2.0: (1) fix slipif undefined refs |
Date: | Tue, 17 Jan 2023 20:43:10 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
Am 17.01.2023 um 16:37 schrieb Renzo Davoli:
Hi, Thank you Joan. I am working to update the patches following your suggestions. In the meanwhile regarding the test to show the undefined references:I have just: * got the debian package source: 'apt-get source liblwip0' * added slipif.c in /src/FileLists.cmake set(lwipnetif_SRCS ${LWIP_DIR}/src/netif/ethernet.c ${LWIP_DIR}/src/netif/bridgeif.c ${LWIP_DIR}/src/netif/bridgeif_fdb.c ${LWIP_DIR}/src/netif/slipif.c ) * built and installed the debian package: $ debuild -b -us -uc $ cd .. $ sudo dpkg -i liblwip0_2.1.3+dfsg1-2_amd64.deb $ sudo dpkg -i liblwip-dev_2.1.3+dfsg1-2_amd64.deb * compiled a test source... here is what I got: $ gcc -o cli cli.c -I /usr/include/lwip -llwip /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/liblwip.so: undefined reference to `sio_tryread' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/liblwip.so: undefined reference to `sio_read' collect2: error: ld returned 1 exit status IMO slipif.c must be skipped, or an implementation of sio_tryread and sio_read must be provided, maybe a stub implementation, otherwise there are unresolved symbols.
The whole design of using undefined functions is probably bad for a library (where a struct with function pointers would fit better), but ok for an embedded target with only one big binary. However, as long as we don't need that code for the posix library, I'm ok with leaving it out somehow. Regards, Simon
OK, I'm probably wrong here, could you send me the code for cli.c, please?Any source requiring the library fits. For example I have tested the following cli.c: ---------- #include <lwip/tcpip.h> int main(int argc, char *argv[]) { tcpip_init(NULL, NULL); } ---------- more messages soon... ciao renzo
[Prev in Thread] | Current Thread | [Next in Thread] |