[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] Desiderata for 2.2.0: (1) fix slipif undefined refs
From: |
Renzo Davoli |
Subject: |
[lwip-devel] Desiderata for 2.2.0: (1) fix slipif undefined refs |
Date: |
Tue, 17 Jan 2023 16:37:20 +0100 |
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.
>
> 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