[vpp-dev] a compiling error on vpp master

2021-03-03 Thread jiangxiaoming
Hi guys:
I have a compiling error on vpp master, is thre anyone have the save problem?

> 
> 
> 
> VPP library version : 21.06
> 
> 
> 
> GIT toplevel dir    : /home/dev/code/vpp
> 
> 
> 
> Build type          : debug
> 
> 
> 
> C flags             : -Wno-address-of-packed-member -g -fPIC -Werror -Wall
> -march=corei7 -mtune=corei7-avx -O0 -DCLIB_DEBUG -fstack-protector
> -fno-common
> 
> 
> 
> Linker flags (apps) : -z execstack
> 
> 
> 
> Linker flags (libs) : -z execstack
> 
> 
> 
> Host processor      : x86_64
> 
> 
> 
> Target processor    : x86_64
> 
> 
> 
> Prefix path         :
> /opt/vpp/external/x86_64;/home/dev/code/vpp/build-root/install-vpp_debug-native/external
> 
> 
> 
> 
> Install prefix      :
> /home/dev/code/vpp/build-root/install-vpp_debug-native/vpp
> 
> 
> 
> -- Configuring done
> 
> 
> 
> -- Generating done
> 
> 
> 
> -- Build files have been written to:
> /home/dev/code/vpp/build-root/build-vpp_debug-native/vpp
> 
> 
> 
>  Building vpp in
> /home/dev/code/vpp/build-root/build-vpp_debug-native/vpp 
> 
> 
> 
> [554/2614] Building C object
> vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o
> 
> 
> 
> FAILED: vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o
> 
> 
> 
> ccache /opt/rh/devtoolset-9/root/bin/cc -Dvppinfra_EXPORTS
> -I/home/dev/code/vpp/src -I. -Iinclude -Wno-address-of-packed-member -g
> -fPIC -Werror -Wall -march=corei7 -mtune=corei7-avx  -O0 -DCLIB_DEBUG
> -fstack-protector -fno-common  -fPIC   -fvisibility=hidden -MD -MT
> vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o -MF
> vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o.d -o
> vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o   -c
> /home/dev/code/vpp/src/vppinfra/unix-formats.c
> 
> 
> 
> /home/dev/code/vpp/src/vppinfra/unix-formats.c: In function
> ‘format_udp4_packet’:
> 
> 
> 
> /home/dev/code/vpp/src/vppinfra/unix-formats.c:319:19: error: ‘struct
> udphdr’ has no member named ‘uh_sport’
> 
> 
> 
> 319 |   u16 source = udp->uh_sport;
> 
> 
> 
> |                   ^~
> 
> 
> 
> /home/dev/code/vpp/src/vppinfra/unix-formats.c:320:17: error: ‘struct
> udphdr’ has no member named ‘uh_dport’
> 
> 
> 
> 320 |   u16 dest = udp->uh_dport;
> 
> 
> 
> |                 ^~
> 
> 
> 
> [565/2614] Building C object svm/CMakeFiles/svm.dir/fifo_segment.c.o
> 
> 
> 
> ninja: build stopped: subcommand failed.
> 
> 
> 
> make[1]: *** [vpp-build] Error 1
> 
> 
> 
> make[1]: Leaving directory `/home/dev/code/vpp/build-root'
> 
> 
> 
> make: *** [build] Error 2
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18846): https://lists.fd.io/g/vpp-dev/message/18846
Mute This Topic: https://lists.fd.io/mt/81068821/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] a compiling error on vpp master

2021-03-03 Thread Jieqiang Wang
Hi Xiaoming,

We met the same problem on CentOS 7 and proposed a 
patch(https://gerrit.fd.io/r/c/vpp/+/31421) to resolve this issue.
It looks to me that the root cause is the different declaration scheme for 
struct udphdr in musl libc and glibc. In older glibc(less than 2.19), field 
names of uh_sport/uh_dport are only used if macro __FAVOR_BSD is defined 
according to the header file. But we won’t encounter this issue with musl libc 
if macro _GNU_SOURCE is defined like Ben mentioned in 
https://gerrit.fd.io/r/c/vpp/+/30790/8/src/vppinfra/unix-formats.c#320 .
Anyway, this is just my thought and needs confirmation from VPP maintainers. 
But you can check your glibc version and try if this patch works for you.

Thanks,
Jieqiang Wang
From: vpp-dev@lists.fd.io  On Behalf Of jiangxiaoming via 
lists.fd.io
Sent: Thursday, March 4, 2021 10:25 AM
To: vpp-dev@lists.fd.io
Subject: [vpp-dev] a compiling error on vpp master


Hi guys:
I have a compiling error on vpp master, is thre anyone have the save 
problem?

VPP library version : 21.06

GIT toplevel dir: /home/dev/code/vpp

Build type  : debug

C flags : -Wno-address-of-packed-member -g -fPIC -Werror -Wall 
-march=corei7 -mtune=corei7-avx -O0 -DCLIB_DEBUG -fstack-protector -fno-common

Linker flags (apps) : -z execstack

Linker flags (libs) : -z execstack

Host processor  : x86_64

Target processor: x86_64

Prefix path : 
/opt/vpp/external/x86_64;/home/dev/code/vpp/build-root/install-vpp_debug-native/external

Install prefix  : /home/dev/code/vpp/build-root/install-vpp_debug-native/vpp

-- Configuring done

-- Generating done

-- Build files have been written to: 
/home/dev/code/vpp/build-root/build-vpp_debug-native/vpp

 Building vpp in /home/dev/code/vpp/build-root/build-vpp_debug-native/vpp 


[554/2614] Building C object vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o

FAILED: vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o

ccache /opt/rh/devtoolset-9/root/bin/cc -Dvppinfra_EXPORTS 
-I/home/dev/code/vpp/src -I. -Iinclude -Wno-address-of-packed-member -g -fPIC 
-Werror -Wall -march=corei7 -mtune=corei7-avx  -O0 -DCLIB_DEBUG 
-fstack-protector -fno-common  -fPIC   -fvisibility=hidden -MD -MT 
vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o -MF 
vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o.d -o 
vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o   -c 
/home/dev/code/vpp/src/vppinfra/unix-formats.c

/home/dev/code/vpp/src/vppinfra/unix-formats.c: In function 
‘format_udp4_packet’:

/home/dev/code/vpp/src/vppinfra/unix-formats.c:319:19: error: ‘struct udphdr’ 
has no member named ‘uh_sport’

  319 |   u16 source = udp->uh_sport;

  |   ^~

/home/dev/code/vpp/src/vppinfra/unix-formats.c:320:17: error: ‘struct udphdr’ 
has no member named ‘uh_dport’

  320 |   u16 dest = udp->uh_dport;

  | ^~

[565/2614] Building C object svm/CMakeFiles/svm.dir/fifo_segment.c.o

ninja: build stopped: subcommand failed.

make[1]: *** [vpp-build] Error 1

make[1]: Leaving directory `/home/dev/code/vpp/build-root'

make: *** [build] Error 2

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18847): https://lists.fd.io/g/vpp-dev/message/18847
Mute This Topic: https://lists.fd.io/mt/81068821/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] a compiling error on vpp master

2021-03-04 Thread Benoit Ganne (bganne) via lists.fd.io
I just merged the patch thanks Jieqiang!
Xiaoming you can retry with latest master and see if it fixes your issue.

Best
ben

> -Original Message-
> From: Jieqiang Wang 
> Sent: jeudi 4 mars 2021 06:49
> To: jiangxiaom...@outlook.com; vpp-dev 
> Cc: Benoit Ganne (bganne) ; Nathan Moos (nmoos)
> ; nd ; Lijian Zhang 
> Subject: RE: [vpp-dev] a compiling error on vpp master
> 
> Hi Xiaoming,
> 
> 
> 
> We met the same problem on CentOS 7 and proposed a
> patch(https://gerrit.fd.io/r/c/vpp/+/31421) to resolve this issue.
> 
> It looks to me that the root cause is the different declaration scheme for
> struct udphdr in musl libc and glibc. In older glibc(less than 2.19),
> field names of uh_sport/uh_dport are only used if macro __FAVOR_BSD is
> defined according to the header file. But we won’t encounter this issue
> with musl libc if macro _GNU_SOURCE is defined like Ben mentioned in
> https://gerrit.fd.io/r/c/vpp/+/30790/8/src/vppinfra/unix-formats.c#320
> <https://gerrit.fd.io/r/c/vpp/+/30790/8/src/vppinfra/unix-formats.c#320>
> .
> 
> Anyway, this is just my thought and needs confirmation from VPP
> maintainers. But you can check your glibc version and try if this patch
> works for you.
> 
> 
> 
> Thanks,
> 
> Jieqiang Wang
> 
> From: vpp-dev@lists.fd.io  On Behalf Of jiangxiaoming
> via lists.fd.io
> Sent: Thursday, March 4, 2021 10:25 AM
> To: vpp-dev@lists.fd.io
> Subject: [vpp-dev] a compiling error on vpp master
> 
> 
> 
> Hi guys:
> I have a compiling error on vpp master, is thre anyone have the save
> problem?
> 
> VPP library version : 21.06
> 
> GIT toplevel dir: /home/dev/code/vpp
> 
> Build type  : debug
> 
> C flags : -Wno-address-of-packed-member -g -fPIC -Werror -Wall
> -march=corei7 -mtune=corei7-avx -O0 -DCLIB_DEBUG -fstack-protector -fno-
> common
> 
> Linker flags (apps) : -z execstack
> 
> Linker flags (libs) : -z execstack
> 
> Host processor  : x86_64
> 
> Target processor: x86_64
> 
> Prefix path : /opt/vpp/external/x86_64;/home/dev/code/vpp/build-
> root/install-vpp_debug-native/external
> 
> Install prefix  : /home/dev/code/vpp/build-root/install-vpp_debug-
> native/vpp
> 
> -- Configuring done
> 
> -- Generating done
> 
> -- Build files have been written to: /home/dev/code/vpp/build-root/build-
> vpp_debug-native/vpp
> 
>  Building vpp in /home/dev/code/vpp/build-root/build-vpp_debug-
> native/vpp 
> 
> [554/2614] Building C object vppinfra/CMakeFiles/vppinfra.dir/unix-
> formats.c.o
> 
> FAILED: vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o
> 
> ccache /opt/rh/devtoolset-9/root/bin/cc -Dvppinfra_EXPORTS -
> I/home/dev/code/vpp/src -I. -Iinclude -Wno-address-of-packed-member -g -
> fPIC -Werror -Wall -march=corei7 -mtune=corei7-avx  -O0 -DCLIB_DEBUG -
> fstack-protector -fno-common  -fPIC   -fvisibility=hidden -MD -MT
> vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o -MF
> vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o.d -o
> vppinfra/CMakeFiles/vppinfra.dir/unix-formats.c.o   -c
> /home/dev/code/vpp/src/vppinfra/unix-formats.c
> 
> /home/dev/code/vpp/src/vppinfra/unix-formats.c: In function
> ‘format_udp4_packet’:
> 
> /home/dev/code/vpp/src/vppinfra/unix-formats.c:319:19: error: ‘struct
> udphdr’ has no member named ‘uh_sport’
> 
>   319 |   u16 source = udp->uh_sport;
> 
>   |   ^~
> 
> /home/dev/code/vpp/src/vppinfra/unix-formats.c:320:17: error: ‘struct
> udphdr’ has no member named ‘uh_dport’
> 
>   320 |   u16 dest = udp->uh_dport;
> 
>   | ^~
> 
> [565/2614] Building C object svm/CMakeFiles/svm.dir/fifo_segment.c.o
> 
> ninja: build stopped: subcommand failed.
> 
> make[1]: *** [vpp-build] Error 1
> 
> make[1]: Leaving directory `/home/dev/code/vpp/build-root'
> 
> make: *** [build] Error 2
> 
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18848): https://lists.fd.io/g/vpp-dev/message/18848
Mute This Topic: https://lists.fd.io/mt/81068821/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-