Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails to find <config.h> #6

Open
RunningDroid opened this issue Feb 23, 2022 · 5 comments
Open

Build fails to find <config.h> #6

RunningDroid opened this issue Feb 23, 2022 · 5 comments

Comments

@RunningDroid
Copy link

cc -fPIC -pthread -I/usr/include/wireshark -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -c -o packet-minecraft.o packet-minecraft.c
packet-minecraft.c:1:10: fatal error: config.h: No such file or directory
    1 | #include <config.h>
      |          ^~~~~~~~~~
compilation terminated.
make: *** [<builtin>: packet-minecraft.o] Error 1

Without that line it fails differently:

cc -fPIC -pthread -I/usr/include/wireshark -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -c -o packet-minecraft.o packet-minecraft.c
packet-minecraft.c:13:49: error: 'VERSION_MAJOR' undeclared here (not in a function)
   13 | WS_DLL_PUBLIC_DEF const int plugin_want_major = VERSION_MAJOR;
      |                                                 ^~~~~~~~~~~~~
packet-minecraft.c:14:49: error: 'VERSION_MINOR' undeclared here (not in a function)
   14 | WS_DLL_PUBLIC_DEF const int plugin_want_minor = VERSION_MINOR;
      |                                                 ^~~~~~~~~~~~~
packet-minecraft.c: In function 'plugin_register':
packet-minecraft.c:315:12: error: unknown type name 'proto_plugin'
  315 |     static proto_plugin plug;
      |            ^~~~~~~~~~~~
packet-minecraft.c:317:9: error: request for member 'register_protoinfo' in something not a structure or union
  317 |     plug.register_protoinfo = proto_register_minecraft;
      |         ^
packet-minecraft.c:318:9: error: request for member 'register_handoff' in something not a structure or union
  318 |     plug.register_handoff = proto_reg_handoff_minecraft;
      |         ^
packet-minecraft.c:319:5: warning: implicit declaration of function 'proto_register_plugin'; did you mean 'proto_register_prefix'? [-Wimplicit-function-declaration]
  319 |     proto_register_plugin(&plug);
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     proto_register_prefix
make: *** [<builtin>: packet-minecraft.o] Error 1
@DeltaEvo
Copy link
Member

Could you share your OS and your Wireshark version ?

@RunningDroid
Copy link
Author

I'm using Void Linux and Wireshark version 3.4.5

@lilithium-hydride
Copy link

Same issue here on Artix Linux, wireshark-qt version 4.0.2-1. pacman -F config.h does not pull up anything for Wireshark.

@schnism
Copy link

schnism commented Jun 26, 2023

In case someone stumbles over this: config.h is really missing, but only two defines are needed.

So in packet-minecraft.c if you delete the

#include config.h

and add

#define VERSION_MAJOR 4
#define VERSION_MINOR 0

instead, all fine. I will submit a pull request but I am afraid this project is no longer maintained?

schnism added a commit to schnism/minecraft-dissector that referenced this issue Jun 26, 2023
@DeltaEvo
Copy link
Member

This project is indeed no longer maintained but I'm up to review and merge PRs, however your PR is not the ideal way to solve this.

This is an interesting information anyway that it's able to compile and work without the config.h, i'll try to take a quick look to see if I canno't use something else to get the wireshark version 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants