Solved Wireshark build fails

Hello,

I am asking your help about Wireshark upgrade. I have old version installed:
Code:
portversion -v wireshark
[Reading data from pkg(8) ... - 1484 packages found - done]
wireshark-3.4.0_1           <  needs updating (port has 3.4.2)

Now, when trying to upgrade the port, the configure ends like this:

Code:
-- The following REQUIRED packages have been found:

 * GLIB2 (required version >= 2.32.0)
 * GTHREAD2
 * GCRYPT (required version >= 1.4.2)
 * CARES (required version >= 1.5.0), Library for asynchronous DNS requests, <https://c-ares.haxx.se/>
   DNS name resolution for captures
 * LEX
 * YACC
 * Perl
 * Python3 (required version >= 3.4)
 * M
 * Qt5Core
 * Qt5LinguistTools
 * Qt5Network (required version >= 5.15.2)
 * Qt5Gui (required version >= 5.15.2)
 * Qt5Multimedia
 * Qt5PrintSupport
 * Qt5Widgets
 * POD

-- The following OPTIONAL packages have not been found:

 * SBC, Bluetooth low-complexity, subband codec (SBC) decoder, <https://git.kernel.org/pub/scm/bluetooth/sbc.git>
   Support for playing SBC codec in RTP player
 * BCG729, G.729 decoder, <https://www.linphone.org/technical-corner/bcg729/overview>
   Support for G.729 codec in RTP player
 * ILBC, iLBC decoder, <https://github.com/TimothyGu/libilbc>
   Support for iLBC codec in RTP player

-- Configuring incomplete, errors occurred!
See also "/usr/ports/net/wireshark/work/.build/CMakeFiles/CMakeOutput.log".
See also "/usr/ports/net/wireshark/work/.build/CMakeFiles/CMakeError.log".
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/wireshark
*** Error code 1

Stop.
make: stopped in /usr/ports/net/wireshark

I have removed all options with make config, but no improvement. Looks like these 3 components are missing, but shouldn't these be installed automatically? Also, I do not find any relevant ports. There is nothing interesting in /usr/ports/net/wireshark/work/.build/CMakeFiles/CMakeError.log
 
Missing dependencies are automatically installed. But you may have some older versions of those dependencies, upgrade those first.
 
Missing dependencies are automatically installed. But you may have some older versions of those dependencies, upgrade those first.
I tried portupgrade -R wireshark first. All dependencies are up to date.

Code:
portversion -R wireshark
[Reading data from pkg(8) ... - 1484 packages found - done]
atk                         =
c-ares                      =
desktop-file-utils          =
gdk-pixbuf2                 =
gettext-runtime             =
glib                        =
gnutls                      =
gtk-update-icon-cache       =
libgcrypt                   =
libgpg-error                =
liblz4                      =
libmaxminddb                =
libnghttp2                  =
libsmi                      =
libxml2                     =
openssl                     =
pango                       =
python37                    =
qt5-core                    =
qt5-gui                     =
qt5-multimedia              =
qt5-printsupport            =
qt5-svg                     =
qt5-widgets                 =
shared-mime-info            =
snappy                      =
wireshark                   <

Does not make any difference, using make or portupgrade.
 
It's been a while since I last used Wireshark and my build server is on the fritz (keeps crashing half way through builds) so it's a little difficult to test for me. But what I generally do when I run into build issues is by checking the FreeBSD build servers and see if it builds there. If you see build failures there too it's likely there's a problem with the port. If it builds fine on the build servers but not on my systems I'm almost certain it's something I did (or didn't do).

I checked http://pkg-status.freebsd.org (admittedly it's a rather daunting interface) and it looks like the latest Wireshark builds fine there, you can see the build log here. Have a look through it and compare it with yours, that might provide clues why it's failing for you.

There may be one major difference, the builds on the FreeBSD cluster are for 12.1. If you have 12.2 then it could be some specific change between 12.1 and 12.2, but issues like these don't happen often. At least not between two minor versions. This is quite different compared to two major versions (11 vs. 12 vs. 13 for example).
 
There may be one major difference, the builds on the FreeBSD cluster are for 12.1. If you have 12.2 then it could be some specific change between 12.1 and 12.2, but issues like these don't happen often. At least not between two minor versions. This is quite different compared to two major versions (11 vs. 12 vs. 13 for example).
I have tried on another independently built machine I have and get the same error.

The error file /usr/ports/net/wireshark/work/.build/CMakeFiles/CMakeError.log ends with a totally uninformative message:

Code:
Performing C SOURCE FILE Test HAVE_STRUCT_STAT___ST_BIRTHTIME failed with the following output:
Change Dir: /usr/ports/net/wireshark/work/.build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/local/bin/ninja cmTC_84f67 && [1/2] Building C object CMakeFiles/cmTC_84f67.dir/src.c.o
FAILED: CMakeFiles/cmTC_84f67.dir/src.c.o
/usr/bin/cc -DHAVE_STRUCT_STAT___ST_BIRTHTIME  -fvisibility=hidden  -Qunused-arguments -Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat
-security -fwrapv -fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wn
o-long-long -Wheader-guard -Wcomma -Wshorten-64-to-32 -Wframe-larger-than=32768 -Wc++-compat -Wunused-const-variable -Wshadow -Wold-style-de
finition -Wstrict-prototypes -Werror=implicit -Wno-pointer-sign -std=gnu99 -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -
fno-strict-aliasing -fmacro-prefix-map=/usr/ports/net/wireshark/work/wireshark-3.4.2/= -fmacro-prefix-map=/usr/ports/net/wireshark/work/.bui
ld/=  -fPIE -MD -MT CMakeFiles/cmTC_84f67.dir/src.c.o -MF CMakeFiles/cmTC_84f67.dir/src.c.o.d -o CMakeFiles/cmTC_84f67.dir/src.c.o -c src.c
src.c:6:36: error: no member named '__st_birthtime' in 'struct stat'; did you mean 'st_birthtim'?
  (void)sizeof(((struct stat *)0)->__st_birthtime);
                                   ^~~~~~~~~~~~~~
                                   st_birthtim
/usr/include/sys/stat.h:185:18: note: 'st_birthtim' declared here
        struct  timespec st_birthtim;   /* time of file creation */
                         ^
1 error generated.
ninja: build stopped: subcommand failed.


Source file was:

#include <sys/stat.h>

int main()
{
  (void)sizeof(((struct stat *)0)->__st_birthtime);
  return 0;
}
 
Looks like a similar error as my build server has been giving me for some time. Try a reboot and start the build right after the reboot. That often helps for me.
 
Back
Top