Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • wireshark wireshark
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,366
    • Issues 1,366
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 170
    • Merge requests 170
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Wireshark FoundationWireshark Foundation
  • wiresharkwireshark
  • Issues
  • #17911
Closed
Open
Issue created Jan 26, 2022 by Paul Koning@pkoning2Contributor

Build failure with GCC 7.5, Linux

Summary

Compile error in glib-compat.h included from funnel.c

Steps to reproduce

On SUSE Linux 15, GCC 7.5 installed: checkout current sources, cmake, make.

What is the current bug behavior?

[ 75%] Building C object epan/CMakeFiles/epan.dir/frame_data_sequence.c.o
[ 75%] Building C object epan/CMakeFiles/epan.dir/funnel.c.o
In file included from /home/paul_koning/wireshark/epan/funnel.c:18:0:
/home/paul_koning/wireshark/wsutil/glib-compat.h: In function ‘g_memdup2’:
/home/paul_koning/wireshark/wsutil/glib-compat.h:32:7: error: implicit declaration of function ‘memcpy’ [-Werror=implicit-function-declaration]
       memcpy(new_mem, mem, byte_size);
       ^~~~~~
/home/paul_koning/wireshark/wsutil/glib-compat.h:32:7: error: incompatible implicit declaration of built-in function ‘memcpy’ [-Werror]
/home/paul_koning/wireshark/wsutil/glib-compat.h:32:7: note: include ‘<string.h’ or provide a declaration of ‘memcpy’
cc1: all warnings being treated as errors
make[2]: *** [epan/CMakeFiles/epan.dir/build.make:926: epan/CMakeFiles/epan.dir/funnel.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2360: epan/CMakeFiles/epan.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

What is the expected correct behavior?

Good build

I found that I can cure the issue, as suggested by the error message, by adding #include <string.h> in glib-compat.h

Sample capture file

N/A

Relevant logs and/or screenshots

(Paste any relevant logs here)

(Paste any relevant screenshots here)

Build information

:~/wireshark/build> gcc --version
gcc (SUSE Linux) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Edited Jan 26, 2022 by Guy Harris
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking