Ask Your Question
0

Anybody building Wireshark 3.1 under Cygwin using gcc 7.4.0 ?

asked 2019-09-16 10:53:28 +0000

wborkowsk gravatar image

updated 2019-09-16 12:01:09 +0000

grahamb gravatar image

I'm in fact in the work of it, but some errors appeared. Some of them I was able to get around with ad hoc modification of souces, but finally I stacked on:

[ 91%] Linking CXX executable run/wireshark.exe
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../x86_64-pc-cygwin/bin/ld: final link failed: File truncated
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/wireshark.dir/build.make:604: run/wireshark.exe] Błąd 1
make[1]: *** [CMakeFiles/Makefile2:914: CMakeFiles/wireshark.dir/all] Błąd 2
edit retag flag offensive close merge delete

Comments

These are the changes:

In "file_util.h":

#ifndef O_BINARY        /* WB TMP MODIF */
#define O_BINARY   0    /* Win32 needs the O_BINARY flag for open() */
#endif

"editcap.c", "ftype-time.c" (for strptime):

#ifdef      __CYGWIN__          /* WB TMP MODIF */
#define _XOPEN_SOURCE        700
#undef      __STRICT_ANSI__ /* Maybe also neded for strptime? */
#endif

"…/dissectors/packet-s1ap.c": warning error: argument ‘offset’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered].

So, in file "epan/dissectors/CMakeList.txt":

set_source_files_properties(
    ${CLEAN_FILES}
    PROPERTIES
    COMPILE_FLAGS "${WERROR_COMMON_FLAGS}"
)

#WB TMP MODIF
set_source_files_properties(
    ${CMAKE_CURRENT_SOURCE_DIR}/packet-s1ap.c
    PROPERTIES
    COMPILE_FLAGS "-O2 ${WERROR_COMMON_FLAGS} -Wno-error=clobbered" 
)

In file "interface_toolbar_reader.cpp":

/* WB TMP MODIF */
#include <sys/time.h>
#include <sys/select.h>
wborkowsk gravatar imagewborkowsk ( 2019-09-16 11:00:04 +0000 )edit

Building Wireshark using Cywin isn't a supported option, so you're on your own.

There is a buildable Windows version using Visual Studio Community editions, so what are you trying to achieve building under Cygwin?

grahamb gravatar imagegrahamb ( 2019-09-16 11:31:50 +0000 )edit

Grahamb - It'a simply :-) Because my boss doesn't like Microsoft license restrictions.

wborkowsk gravatar imagewborkowsk ( 2019-09-16 11:40:02 +0000 )edit

I hope you're being paid well to try to achieve this, good luck.

What are the perceived licence restrictions as regards to Wireshark on Windows built using VC? I ask as I'm not aware of any.

grahamb gravatar imagegrahamb ( 2019-09-16 11:59:17 +0000 )edit

Using for "commercial use" is not perfectly precised :-/ My firm made only linux software, but we need Windows Wireshark with our plugins for internal testing.

By the way, why there is no suport for Cygwin? It looks like not to much left to do.

wborkowsk gravatar imagewborkowsk ( 2019-09-16 12:07:29 +0000 )edit

Many companies large and small build Wireshark and plugins on Windows using MSVC with no issue whatsoever. Examining the Visual Studio 2019 Community Licence reveals that:

• Any number of your users may use the software to develop and test applications released under Open Source Initiative (OSI) approved open source software licenses.

Note that Wireshark and plugins are licenced under the GPL.

There is no support for Cygwin as no-one has come up with the time or motivation to add it. The result will likely be slower than the native Windows build (due to the Cygwin compatibility layer) and will require a modified installer to handle the additional Cygwin dependencies.

The Windows native build is a first class supported version of Wireshark.

grahamb gravatar imagegrahamb ( 2019-09-16 12:45:45 +0000 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-09-18 12:06:30 +0000

wborkowsk gravatar image

updated 2019-09-18 12:09:17 +0000

Looks like it is impossible in current Wireshark version. When I had deleted the linking of Wireshark.exe, the linking of next "exe" was more communicative. It's more - cmake even not detect that this is on-Windows-compilation :-D , so probably many things are missing at the stage of linking.

Thanks grahamb for all suggestions. I will go to MSVC++ :-)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-09-16 10:53:28 +0000

Seen: 378 times

Last updated: Sep 18 '19