Wireshark-dev: Re: [Wireshark-dev] Compiling on Centos7
From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Thu, 1 Sep 2016 22:01:15 +0200
On Thu, Sep 01, 2016 at 11:29:19AM +0200, Dario Lombardo wrote:
> After removing libnl3-devel I get (from cmake)
> 
> -- The following OPTIONAL packages have not been found:
> 
>  * NL
>  * PORTAUDIO
>  * YAPP
> 
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/osboxes/wireshark/build
> 
> But I have libnl-devel. That sounds a bit confusing to me... Which lib is
> cmake looking for? Libnl or libnl3?
> 
> Anyway, without libnl3-devel compilation goes to the end.

This is a problem with the FindNL.cmake file which puts the wrong
NL_INCLUDE_DIR in the cache if you install libnl3-devel after running
cmake with libnl-devel installed. If you clean CMakeCache.txt and start
over after installing, it seems to work (I tested it on CentOS 6).

Will look into this.

Kind regards,
Peter

> On Thu, Sep 1, 2016 at 11:01 AM, Dario Lombardo <dario.lombardo.ml@xxxxxxxxx
> > wrote:
> 
> > I' trying to compile the current master on Centos7. Some of the code in
> > caputils doesn't compile, so I patched it. Now the compilation stops with
> >
> > Linking C executable run/dumpcap
> > /usr/bin/ld: run/libcaputils.a(ws80211_utils.c.o): undefined reference to
> > symbol 'nl_socket_free'
> > /usr/bin/ld: note: 'nl_socket_free' is defined in DSO
> > /lib64/libnl-3.so.200 so try adding it to the linker command line
> > /lib64/libnl-3.so.200: could not read symbols: Invalid operation
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [run/dumpcap] Error 1
> > make[1]: *** [CMakeFiles/dumpcap.dir/all] Error 2
> > make: *** [all] Error 2
> >
> > I'm using cmake and this is the list of libnl(s) installed
> >
> > libnl.x86_64
> >                 1.1.4-3.el7
> >                          @base
> > libnl-devel.x86_64
> >                 1.1.4-3.el7
> >                          @base
> > libnl3.x86_64
> >                  3.2.21-10.el7
> >                            @anaconda
> > libnl3-cli.x86_64
> >                  3.2.21-10.el7
> >                            @anaconda
> > libnl3-devel.x86_64
> >                  3.2.21-10.el7
> >                            @base
> >
> > Compilation in-tree with autotools works fine.
> > Any idea?
> >