Wireshark-dev: Re: [Wireshark-dev] Compilation issue on Mac OS
From: ajay saxena <aileronajay@xxxxxxxxx>
Date: Fri, 21 Apr 2017 14:01:16 -0400
I took the latest source from code.wireshark.org and on compiling I ran into GeoIP.h error

packet-ip.c:64:10: fatal error: 'GeoIP.h' file not found

#include <GeoIP.h>

         ^


In this source, i do have the commit, 2c52d954d5713be1b809c3b668b0353d2b355c16

Ajays-MacBook-Pro:wireshark ajasaxen$ git show 2c52d954d5713be1b809c3b668b0353d2b355c16

commit 2c52d954d5713be1b809c3b668b0353d2b355c16

Author: Guy Harris <guy@xxxxxxxxxxxx>

Date:   Fri Apr 21 03:10:21 2017 -0700


    Code in epan/dissectors may require GeoIP.h, so include LIBGEOIP_FLAGS.

    

    Change-Id: I31bd53c49906db24b64fa3f1e3078b0658db3158

    Reviewed-on: https://code.wireshark.org/review/21269

    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>

    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>

    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>


diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am

index 7cd515358b..8a6b501fd0 100644

--- a/epan/dissectors/Makefile.am

+++ b/epan/dissectors/Makefile.am

@@ -22,7 +22,7 @@ include $(top_srcdir)/Makefile.am.inc

 

 AM_CPPFLAGS = $(INCLUDEDIRS) -I$(top_srcdir)/epan $(WS_CPPFLAGS) \

        $(GLIB_CFLAGS) $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) \

-       $(KRB5_CFLAGS) $(LIBXML2_CFLAGS)

+       $(LIBGEOIP_CFLAGS) $(KRB5_CFLAGS) $(LIBXML2_CFLAGS)

 

 include Custom.common

 

and the compilation of packet-ip.c still fails

Thanks,
Ajay


On Fri, Apr 21, 2017 at 1:16 PM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
On Apr 21, 2017, at 10:07 AM, ajay saxena <aileronajay@xxxxxxxxx> wrote:

> The commits that you've referred to,
>
> 9e4c018e08d5a657f85f0cde0607db0a6d25ddf4
> 2c52d954d5713be1b809c3b668b0353d2b355c16
>
> Are they present in the master branch on github? I cant seem to find them in the latest pull from github

The *official* Git repository for Wireshark is not on GitHub, it's our own repository on code.wireshark.org.

Changes to Wireshark get checked into our own repository.  They should, eventually, get propagated to the GitHub repository, but that doesn't necessarily happen right after they're committed to the main repository.

I'm not sure why we have a GitHub repository, but I would recommend that anybody who wants to build from the master branch use the Wireshark repository, not the GitHub repository, if they can; see

        https://www.wireshark.org/develop.html

> Also like you have stated, i do have the libraries in the non standard paths as I installed them using brew. But i did update the PKG_CONFIG_PATH so that the configure script was able to find these libraries. It was when i used make that the compilation failed.

That's because epan/crypt/Makefile.am and epan/developer/Makefile.am were buggy in our code and failed to include, in the compiling commands, the -I flags for those packages, as determined by the configure script.  The two commits in question fix those bugs.

> I believe I am having issues with the make as I dont have the commits mentioned above.

Yes, so you either need to start using the main Wireshark repository or wait for the changes in question to be propagated to the GitHub repository.

> On a side note is compiling with cmake not recommended due to some reason?

No, you should be able to use either autotools or CMake on UN*Xes.  If one of them doesn't work, that's probably a bug.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe