Closed ac000 closed 3 years ago
Thanks for the fix!
Merged. Thanks for the fix!
neal
On Wed, Oct 7, 2020 at 4:01 PM Andrew Clayton notifications@github.com wrote:
When compiling with GCC 10.2 under Fedora 32 compilation failed with a bunch of messages like
/usr/bin/ld: tcp_packet.o:/tmp/packetdrill/gtests/net/packetdrill/tcp_options.h:108: multiple definition of `tcp_option'; packet_to_string.o:/tmp/packetdrill/gtests/net/packetdrill/tcp_options.h:108: first defined here ... collect2: error: ld returned 1 exit status make: *** [Makefile.common:37: packetdrill] Error 1
This is due to GCC 10 defaulting0 https://gcc.gnu.org/gcc-10/porting_to.html to -fno-common and because tcp_option is both defined and declared in tcp_option.h.
Simply removing the declaration part fixes the compilation.
Signed-off-by: Andrew Clayton andrew@digital-domain.net
You can view, comment on, or merge this pull request online at:
https://github.com/google/packetdrill/pull/45 Commit Summary
- packetdrill: fix compilation with GCC 10
File Changes
- M gtests/net/packetdrill/tcp_options.h https://github.com/google/packetdrill/pull/45/files#diff-ddf0de324e6145b2a0020f79b84ba0e8 (2)
Patch Links:
- https://github.com/google/packetdrill/pull/45.patch
- https://github.com/google/packetdrill/pull/45.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/packetdrill/pull/45, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZHSHNM7TSTIINB5OEIGYLSJTCJBANCNFSM4SH26DFQ .
When compiling with GCC 10.2 under Fedora 32 compilation failed with a bunch of messages like
/usr/bin/ld: tcp_packet.o:/tmp/packetdrill/gtests/net/packetdrill/tcp_options.h:108: multiple definition of `tcp_option'; packet_to_string.o:/tmp/packetdrill/gtests/net/packetdrill/tcp_options.h:108: first defined here ... collect2: error: ld returned 1 exit status make: *** [Makefile.common:37: packetdrill] Error 1
This is due to GCC 10 defaulting0 to -fno-common and because tcp_option is both defined and declared in tcp_option.h.
Simply removing the declaration part fixes the compilation.
Signed-off-by: Andrew Clayton andrew@digital-domain.net