Wireshark-dev: Re: [Wireshark-dev] Pointers needed for building Wireshark 2.6.3 on a Raspberry

From: João Valverde <joao.valverde@xxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Sep 2018 02:31:29 +0100


On 13/09/18 01:25, João Valverde wrote:


On 13/09/18 01:07, Geoff Lee wrote:
Many thanks indeed to everyone who posted answers to help me! Much
appreciated.

  (And apologies if this fails to attach to the thread properly - I foolishly set the daily digest option when I subscribed to the list, and can't figure out how to respond properly to individual messages.  I've fixed that now).

I'm making much better progress now :-)

As explained in Guy Harris's most recent and very illuminating post,
(almost) all of the "error" messages were in fact part of the CMake process,
for probing my gcc compiler to see what features and options it supports.

I have now managed to track down the cause of my (CMake) problem. The final
on screen error message was

fatal: Not a git repository (or any of the parent directories): .git
CMake Error at CMakeLists.txt:3082 (string):
   string begin index: 1 is out of range 0 - 0

Looking at the CMakelists.txt file around line 3082, I found a comment in
line 3042 which said

# This will fail if we're not building from a git checkout.

Since I had downloaded and unzipped / untarred the wireshark code (ie I
wasn't using a git checkout!), I suspected this might be the cause of my
problem, so I created a new directory and cloned a copy of the code directly
from the Github repository, via :

`git clone -b master-2.6 --single-branch
https://github.com/wireshark/wireshark.git`

Executing (from a build directory parallel to the cloned git directory)
`cmake -G Ninja ../wireshark` ran successfully, first time :-) , and
produced a build.ninja file.  So now I am able to run `ninja` and see many
compilations happening on my Raspberry Pi.

I'm not really sure why the downloaded untarred unzipped version wouldn't
pass cmake safely, but since the cloned git version does, the cmake part of
my problem is now behind me.

Seems like a bug in the Wireshark source distribution (you did well to move past it).

Proposed fix here: https://code.wireshark.org/review/c/29653/

Unfortunately I haven't succeeded yet to get to the end of the complete
wireshark compilation process.  `ninja` runs for quite a while (several
hours) than fails with a message about a gcc or c++ internal compiler bug.
Restarting ninja picks up from where it fell over, and gets a bit further
down the track before failing again. If I am interpreting the ninja messages
correctly, I began with around 3000 compilation steps required; my first
attempt managed about 1500 of these before failing; my second completed
another 300 or so;  I'm currently down to only 262 left - but am only
managing about 10 to 20 steps per ninja attempt before the compiler
collapses.  I rather fear this is a limitation of my Raspberry Pi hardware
(memory limit maybe, causing the compiler to choke on larger and more
complex parts of the wireshark project??), but I'll keep on trying.  My
fallback is to use the other options available in cmake to limit the
compilation to only tshark, and dumpcap, since those are the elements that I
most need.

Ninja by default runs several compilation processes in parallel. It's possible (as you suggest) that you are hitting memory limits, in which case you should run the command "ninja -j1" instead.

Once again, many thanks indeed for the suggestions and help provided.

Regards

Geoff

___________________________________________________________________________
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@xxxxxxxxxxxxx?subject=unsubscribe

___________________________________________________________________________
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@xxxxxxxxxxxxx?subject=unsubscribe