Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-21 Thread Maynard, Christopher via Wireshark-dev
FYI: Guy Harris provided a fix, originally with 
https://gitlab.com/wireshark/wireshark/-/commit/de50666ec077a0b09f3d61ccd20870a03db52c92
 but then more simply with 
https://gitlab.com/wireshark/wireshark/-/commit/de50666ec077a0b09f3d61ccd20870a03db52c92.

- Chris

From: Wireshark-dev  On Behalf Of Fulko Hew
Sent: Thursday, October 20, 2022 12:55 PM
To: Developer support list for Wireshark 
Cc: w...@comcast.net
Subject: Re: [Wireshark-dev] can't compile wireshark version 4.0

On Thu, Oct 20, 2022 at 11:22 AM mailto:w...@comcast.net 
<mailto:w...@comcast.net> wrote:
I can't compile wireshark version 4.0 on Raspberry Pi ubuntu 22.04
Here is the error from make.
I've attached cmake success and make error logs.txt, CMakeError.log and 
CMakeOutput.log
[ 84%] Building CXX object ui/qt/CMakeFiles/qtui.dir/sequence_dialog.cpp.o
[ 84%] Building CXX object 
ui/qt/CMakeFiles/qtui.dir/service_response_time_dialog.cpp.o
[ 84%] Building CXX object 
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp: In member function 
‘void ShowPacketBytesDialog::symbolizeBuffer(QByteArray&)’:
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:474:20: error: 
comparison is always false due to limited range of data type 
[-Werror=type-limits]
  474 | if ((ba[i] < '\0' || ba[i] >= ' ') && ba[i] != (char)0x7f && 
!g_ascii_isprint(ba[i])) {
cc1plus: all warnings being treated as errors

My guess as to what could be wrong according to the error is that
ba[i] < '\0' is 'always false'  because ba (although declared as a QByteArray) 
is probably
an unsigned byte array, and as such a value can never be less than zero.
So that test will always be false as the error message says.

Now how to fix it is another story.
My first crack at it would be to disable that warning.
My second approach would be to correct that test (as appropriate).







CONFIDENTIALITY NOTICE: This message is the property of International Game 
Technology PLC and/or its subsidiaries and may contain proprietary, 
confidential or trade secret information. This message is intended solely for 
the use of the addressee. If you are not the intended recipient and have 
received this message in error, please delete this message from your system. 
Any unauthorized reading, distribution, copying, or other use of this message 
or its attachments is strictly prohibited.
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-21 Thread chuck c
https://www.wireshark.org/download.html
The current stable release of Wireshark is 4.0.0.
https://1.na.dl.wireshark.org/src/wireshark-4.0.0.tar.xz

On Fri, Oct 21, 2022 at 10:29 AM w...@comcast.net  wrote:

> Gerald,
>
> It's a development build.  Where do I get the production build.
> I followed your instructions at:
>
> https://www.wireshark.org/docs/wsdg_html_chunked/ChSrcObtain
>
> https://www.wireshark.org/docs/wsdg_html_chunked/ChapterSetup#ChSetupUNIX
>
> tools/debian-setup.sh --install-all
>
> mkdir build
>
> cd build
>
> cmake -G Ninja ..
>
> ninja
>
> It error-ed again, cc1plus: all warnings being treated as errors
> so...
>
> I looked at CMakeOptions.txt
> and changed "option(ENABLE_WERROR "Treat warnings as errors" ON)" to
> option(ENABLE_WERROR "Treat warnings as errors" OFF)
>
> mkdir build
>
> cd build
>
> cmake -G Ninja ..
>
> ninja
>
> it crashed the system at [2434/2541] Building CXX object
> ui/qt/.../qtui.dir/wlan_statistics_dialog.cpp.o
>
> I think I ran out of Swap.  I increased swap from 1G to 4G and tried again.
>
> It compiled with errors but I can't install it.  HELP!!
>
> wptracy@wptracy-desktop:~/wireshark/build$ sudo make install
> make: *** No rule to make target 'install'.  Stop.
>
> wptracy@wptracy-desktop:~/wireshark/build$
>
> wptracy@wptracy-desktop:~$ wireshark
> wireshark: error while loading shared libraries: libwireshark.so.0: cannot
> open shared object file: No such file or directory
> wptracy@wptracy-desktop:~$
>
> wptracy@wptracy-desktop:~/wireshark/build$ run/wireshark
>
> It appears to be working, even with the error.  I don't know what doesn't
> work.
>
> It's a development build.  Where do I get the production build.
>
> It compiles on x64 ubuntu without errors, but not on Raspberry Pi arch
> aarch64 ubuntu
>
> [2412/2541] Building CXX object 
> ui/qt/...tui.dir/show_packet_bytes_dialog.cpp.o
> FAILED: ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
> /usr/bin/c++ -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES 
> -DQT_CONCURRENT_LIB
> -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB 
> -DQT_MULTIMEDIA_LIB
> -DQT_NETWORK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DWS_DEBUG_UTF_8
> -I/home/wptracy/wireshark/build/ui/qt/qtui_autogen/include
> -I/home/wptracy/wireshark/build -I/home/wptracy/wireshark 
> -I/home/wptracy/wireshark/include
> -isystem /usr/include/glib-2.0 -isystem 
> /usr/lib/aarch64-linux-gnu/glib-2.0/include
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtCore -isystem 
> /usr/include/aarch64-linux-gnu/qt6
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtGui -isystem 
> /usr/include/aarch64-linux-gnu/qt6/QtDBus
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtPrintSupport
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtWidgets
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtConcurrent
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtCore5Compat
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtMultimedia
> -isystem /usr/include/aarch64-linux-gnu/qt6/QtNetwork -isystem 
> /home/wptracy/wireshark/build/ui/qt
> -isystem /home/wptracy/wireshark/ui/qt -fexcess-precision=fast -Wall -Wextra 
> -Wendif-labels
> -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla 
> -Waddress -Wattributes
> -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings 
> -Wno-long-long
> -Wredundant-decls -Wno-error=maybe-uninitialized 
> -Wno-error=alloc-size-larger-than=
> -Wno-error=stringop-overflow= -Wno-format-truncation 
> -Wno-error=deprecated-declarations
> -Wframe-larger-than=32768 -fdiagnostics-color=always -Wextra-semi
> -fmacro-prefix-map=/home/wptracy/wireshark/= 
> -fmacro-prefix-map=/home/wptracy/wireshark/build/=
> -fmacro-prefix-map=../= -O2 -g -DNDEBUG -fPIC -std=c++17
> -Werror -MD -MT ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
> -MF ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o.d
> -o ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
> -c /home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp
> /home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:
> In member function ‘void ShowPacketBytesDialog::symbolizeBuffer(QByteArray&)’:
> /home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:474:20:
> error: comparison is always false due to limited range of data type 
> [-Werror=type-limits]
>   474 | if ((ba[i] < '\0' || ba[i] >= ' ') && ba[i] != (char)0x7f && 
> !g_ascii_isprint(ba[i])) {cc1plus: all warnings being treated as errors
> [2417/2541] Building CXX object 
> ui/qt/CMakeFiles/qtui.dir/sequence_dialog.cpp.o
> ninja: build stopped: subcommand failed.
>
> Pat Tracy | +1 303.933.9035
>
> On 10/20/22 11:19, Gerald Combs wrote:
>
> On 10/20/22 9:54 AM, Fulko Hew wrote:
>
> [ ... ]
>
> Now how to fix it is another story.
> My first crack at it would be to disable that warning.
> My second approach would be to correct that test (as appropriate).
>
>
> Another question might be why this is an error instead of a warning.
> ENABLE_WERROR is enabled by 

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-21 Thread w...@comcast.net

Gerald,

It's a development build.  Where do I get the production build.

I followed your instructions at:

https://www.wireshark.org/docs/wsdg_html_chunked/ChSrcObtain

https://www.wireshark.org/docs/wsdg_html_chunked/ChapterSetup#ChSetupUNIX

tools/debian-setup.sh --install-all

mkdir build

cd build

cmake -G Ninja ..

ninja

It error-ed again, cc1plus: all warnings being treated as errors
so...

I looked at CMakeOptions.txt
and changed "option(ENABLE_WERROR "Treat warnings as errors" ON)" to
option(ENABLE_WERROR "Treat warnings as errors" OFF)

mkdir build

cd build

cmake -G Ninja ..

ninja

it crashed the system at [2434/2541] Building CXX object 
ui/qt/.../qtui.dir/wlan_statistics_dialog.cpp.o


I think I ran out of Swap.  I increased swap from 1G to 4G and tried again.

It compiled with errors but I can't install it.  HELP!!

wptracy@wptracy-desktop:~/wireshark/build$ sudo make install
make: *** No rule to make target 'install'.  Stop.

wptracy@wptracy-desktop:~/wireshark/build$

wptracy@wptracy-desktop:~$ wireshark
wireshark: error while loading shared libraries: libwireshark.so.0: 
cannot open shared object file: No such file or directory

wptracy@wptracy-desktop:~$

wptracy@wptracy-desktop:~/wireshark/build$ run/wireshark

It appears to be working, even with the error.  I don't know what 
doesn't work.


It's a development build.  Where do I get the production build.


It compiles on x64 ubuntu without errors, but not on Raspberry Pi arch 
aarch64 ubuntu


[2412/2541] Building CXX object 
ui/qt/...tui.dir/show_packet_bytes_dialog.cpp.o FAILED: 
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o /usr/bin/c++ 
-DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DQT_CONCURRENT_LIB 
-DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB 
-DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_PRINTSUPPORT_LIB 
-DQT_WIDGETS_LIB -DWS_DEBUG_UTF_8 
-I/home/wptracy/wireshark/build/ui/qt/qtui_autogen/include 
-I/home/wptracy/wireshark/build -I/home/wptracy/wireshark 
-I/home/wptracy/wireshark/include -isystem /usr/include/glib-2.0 
-isystem /usr/lib/aarch64-linux-gnu/glib-2.0/include -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtCore -isystem 
/usr/include/aarch64-linux-gnu/qt6 -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtGui -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtDBus -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtPrintSupport -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtWidgets -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtConcurrent -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtCore5Compat -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtMultimedia -isystem 
/usr/include/aarch64-linux-gnu/qt6/QtNetwork -isystem 
/home/wptracy/wireshark/build/ui/qt -isystem 
/home/wptracy/wireshark/ui/qt -fexcess-precision=fast -Wall -Wextra 
-Wendif-labels -Wpointer-arith -Wformat-security -fwrapv 
-fno-strict-overflow -Wvla -Waddress -Wattributes -Wdiv-by-zero 
-Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long 
-Wredundant-decls -Wno-error=maybe-uninitialized 
-Wno-error=alloc-size-larger-than= -Wno-error=stringop-overflow= 
-Wno-format-truncation -Wno-error=deprecated-declarations 
-Wframe-larger-than=32768 -fdiagnostics-color=always -Wextra-semi 
-fmacro-prefix-map=/home/wptracy/wireshark/= 
-fmacro-prefix-map=/home/wptracy/wireshark/build/= 
-fmacro-prefix-map=../= -O2 -g -DNDEBUG -fPIC -std=c++17 -Werror -MD -MT 
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o -MF 
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o.d -o 
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o -c 
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp 
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp: In member 
function ‘void ShowPacketBytesDialog::symbolizeBuffer(QByteArray&)’: 
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:474:20: 
error: comparison is always false due to limited range of data type 
[-Werror=type-limits] 474 | if ((ba[i] < '\0' || ba[i] >= ' ') && ba[i] 
!= (char)0x7f && !g_ascii_isprint(ba[i])) { cc1plus: all warnings being 
treated as errors [2417/2541] Building CXX object 
ui/qt/CMakeFiles/qtui.dir/sequence_dialog.cpp.o ninja: build stopped: 
subcommand failed.




Pat Tracy | +1 303.933.9035

On 10/20/22 11:19, Gerald Combs wrote:

On 10/20/22 9:54 AM, Fulko Hew wrote:

[ ... ]


Now how to fix it is another story.
My first crack at it would be to disable that warning.
My second approach would be to correct that test (as appropriate).


Another question might be why this is an error instead of a warning. 
ENABLE_WERROR is enabled by default in CMakeOptions.txt in master, but 
it's disabled in the release branches.___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-21 Thread Guy Harris
On Oct 20, 2022, at 10:08 PM, Guy Harris  wrote:

> Nope, do
> 
>   if (!g_ascii_isprint(ba[i]) && !g_ascii_iscntlr(ba[i])) {

Done in

https://gitlab.com/wireshark/wireshark/-/merge_requests/8606

with a backport to the 4.0 branch in

https://gitlab.com/wireshark/wireshark/-/merge_requests/8607

and to the 3.6 branch in

https://gitlab.com/wireshark/wireshark/-/merge_requests/8608

___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 5:15 PM, Guy Harris  wrote:

> Or just
>   if (!g_ascii_isprint(ba[i])) {
> 
> as g_ascii_isprint() 1) is a macro, so no subroutine call overhead and 2) 
> already correctly handles both signed and unsigned char.

Nope, do

if (!g_ascii_isprint(ba[i]) && !g_ascii_iscntlr(ba[i])) {
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 4:31 PM, Guy Harris  wrote:

>   #if CHAR_MIN == 0
>   #define CHAR_VALUE_IS_NEGATIVE(c)   (0)
>   #else
>   #define CHAR_VALUE_IS_NEGATIVE(c)   ((c) < 0)
>   #endif
> 
>   if ((CHAR_VALUE_IS_NEGAIVE(ba[i]) || ba[i] >= ' ') && ba[i] != 
> (char)0x7f && !g_ascii_isprint(ba[i])) {

Or just
if (!g_ascii_isprint(ba[i])) {

as g_ascii_isprint() 1) is a macro, so no subroutine call overhead and 2) 
already correctly handles both signed and unsigned char.
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 4:02 PM, Guy Harris  wrote:

> Definitely signed, unless I'm missing something.

Please hand me the Sad Old Man With Fading Memory prize of the year.

*Nothing guarantees that a char is signed*.  This is still true as of C18:

An object declared as type char is large enough to store any member of 
the basic execution character set. If a member of the basic execution character 
set is stored in a char object, its value is guaranteed to be nonnegative. If 
any other character is stored in a char object, the resulting value is 
implemen- tation-defined but shall be within the range of values that can be 
represented in that type.

This dates, as I remember, back to some instruction sets having a 
sign-extending byte load instruction and others having a non-sign-extending 
byte load instruction.

The "signed" keyword was added to C to allow code that expects a char-sized 
signed integer value type to say "signed char"; for generality, you can say 
"signed short int" or "signed int", or "signed long int" or..., but that's 
redundant.

So, given that this is the result of

> [compiling] wireshark version 4.0 on Raspberry Pi ubuntu 22.04

perhaps ARM32 or ARM64, whichever this is, is a target with *unsigned* char 
variables, so that "signed char" is an 8-bit signed integral type and both 
"char" and "unsigned char" are 8-bit unsigned integral types.

And, at least according to this StackOverflow item:


https://stackoverflow.com/questions/2054939/is-char-signed-or-unsigned-by-default

on *most* platforms char is unsigned on ARM - "iOS", presumably meaning "all 
Apple operating systems" at this point, is different (sort of makes sense for 
macOS, to avoid throwing in Another Portability Problem when adding Apple 
silicon support, and maybe, given that a ton of code from the kernel on up to 
frameworks in iOS came from macOS, they did that to simplify porting to iOS.  I 
think Apple silicon macOS is the first target for which we've done main-branch 
builds, so the "sorry, char is unsigned" problem didn't show up for us.

So code should not assume that char is signed or that it's unsigned.

This might call for a test such as

#if CHAR_MIN == 0
do "char is unsigned" stuff
#else
do "char is signed" stuff
#endif

e.g.

#if CHAR_MIN == 0
#define CHAR_VALUE_IS_NEGATIVE(c)   (0)
#else
#define CHAR_VALUE_IS_NEGATIVE(c)   ((c) < 0)
#endif

if ((CHAR_VALUE_IS_NEGAIVE(ba[i]) || ba[i] >= ' ') && ba[i] != 
(char)0x7f && !g_ascii_isprint(ba[i])) {

and hope that the compiler doesn't warn that we're doing "0 || x", because, in 
*that* case, we'd need to do something more complicated.
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Guy Harris
On Oct 20, 2022, at 9:54 AM, Fulko Hew  wrote:

> My guess as to what could be wrong according to the error is that
> ba[i] < '\0' is 'always false'  because ba (although declared as a 
> QByteArray) is probably
> an unsigned byte array,

Qt 5.12.12 qbytearray.h:

inline char *data();

...

inline char operator[](int i) const;
inline char operator[](uint i) const;
inline QByteRef operator[](int i);
inline QByteRef operator[](uint i);

...

inline char QByteArray::operator[](int i) const
{ Q_ASSERT(uint(i) < uint(size())); return d->data()[i]; }
inline char QByteArray::operator[](uint i) const
{ Q_ASSERT(i < uint(size())); return d->data()[i]; }

...

inline QByteRef QByteArray::operator[](int i)
{ Q_ASSERT(i >= 0); return QByteRef(*this, i); }
inline QByteRef QByteArray::operator[](uint i)
{ return QByteRef(*this, i); }
inline QByteRef QByteArray::front() { return operator[](0); }
inline QByteRef QByteArray::back() { return operator[](size() - 1); }

Definitely signed, unless I'm missing something.

Qt 6.2.4 qbytearray.h:

inline char *data();

...

inline char operator[](qsizetype i) const;
[[nodiscard]] inline char [](qsizetype i);
inline QByteRef operator[](int i);
inline QByteRef operator[](uint i);

...

inline char QByteArray::operator[](qsizetype i) const
{ Q_ASSERT(size_t(i) < size_t(size())); return d.data()[i]; }

...

inline char ::operator[](qsizetype i)
{ Q_ASSERT(i >= 0 && i < size()); return data()[i]; }
inline char ::front() { return operator[](0); }
inline char ::back() { return operator[](size() - 1); }

Also definitely signed, unless I'm missing something.
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Gerald Combs

On 10/20/22 9:54 AM, Fulko Hew wrote:

[ ... ]


Now how to fix it is another story.
My first crack at it would be to disable that warning.
My second approach would be to correct that test (as appropriate).


Another question might be why this is an error instead of a warning. 
ENABLE_WERROR is enabled by default in CMakeOptions.txt in master, but it's 
disabled in the release branches.
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Stig Bjørlykke
On Thu, Oct 20, 2022 at 6:54 PM Fulko Hew  wrote:

> My guess as to what could be wrong according to the error is that
> ba[i] < '\0' is 'always false'  because ba (although declared as a
> QByteArray) is probably
> an unsigned byte array, and as such a value can never be less than zero.
>

It's documented as char here: https://doc.qt.io/qt-6/qbytearray.html#at
I never had any issues compiling this code on my RPi.


-- 
Stig Bjørlykke
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Maynard, Christopher via Wireshark-dev
I suppose it's complaining about this test as always evaluating to false: ba[i] 
< '\0'

What if you simply remove that part, does it compile then?
- Chris

From: Wireshark-dev  On Behalf Of 
w...@comcast.net
Sent: Wednesday, October 19, 2022 10:17 AM
To: wireshark-dev@wireshark.org; w...@comcast.net
Subject: [Wireshark-dev] can't compile wireshark version 4.0

I can't compile wireshark version 4.0 on Raspberry Pi ubuntu 22.04
Here is the error from make.
I've attached cmake success and make error logs.txt, CMakeError.log and 
CMakeOutput.log
[ 84%] Building CXX object ui/qt/CMakeFiles/qtui.dir/sequence_dialog.cpp.o
[ 84%] Building CXX object 
ui/qt/CMakeFiles/qtui.dir/service_response_time_dialog.cpp.o
[ 84%] Building CXX object 
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp: In member function 
‘void ShowPacketBytesDialog::symbolizeBuffer(QByteArray&)’:
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:474:20: error: 
comparison is always false due to limited range of data type 
[-Werror=type-limits]
  474 | if ((ba[i] < '\0' || ba[i] >= ' ') && ba[i] != (char)0x7f && 
!g_ascii_isprint(ba[i])) {
cc1plus: all warnings being treated as errors
make[2]: *** [ui/qt/CMakeFiles/qtui.dir/build.make:1806: 
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:10816: ui/qt/CMakeFiles/qtui.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
wptracy@wptracy-desktop:~/wireshark/build$
I have these libraries installed:
wptracy@wptracy-desktop:~/wireshark/build$ sudo apt install gcc \
g++\
libglib2.0-dev \
libc-ares-dev \
libpcap-dev \
libpcre2-dev \
flex \
make \
python3 \
libgcrypt-dev\
qttools5-dev \
qttools5-dev-tools \
libqt5svg5-dev \
qtmultimedia5-dev \
qtbase5-dev \
qtchooser \
qt5-qmake \
qtbase5-dev-tools\
qt6-base-dev \
qt6-multimedia-dev \
qt6-tools-dev \
qt6-tools-dev-tools \
qt6-l10n-tools \
libqt6core5compat6-dev \
libxkbcommon-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libgcrypt20-dev' instead of 'libgcrypt-dev'
flex is already the newest version (2.6.4-8build2).
g++ is already the newest version (4:11.2.0-1ubuntu1).
gcc is already the newest version (4:11.2.0-1ubuntu1).
libc-ares-dev is already the newest version (1.18.1-1build1).
libgcrypt20-dev is already the newest version (1.9.4-3ubuntu3).
libglib2.0-dev is already the newest version (2.72.1-1).
libpcap-dev is already the newest version (1.10.1-4build1).
libvulkan-dev is already the newest version (1.3.204.1-2).
libxkbcommon-dev is already the newest version (1.4.0-1).
make is already the newest version (4.3-4.1build1).
freeglut3-dev is already the newest version (2.8.1-6).
libqt5svg5-dev is already the newest version (5.15.3-1).
libqt6core5compat6-dev is already the newest version (6.2.4-1).
qt6-base-dev is already the newest version (6.2.4+dfsg-2ubuntu1).
qt6-l10n-tools is already the newest version (6.2.4-1).
qt6-multimedia-dev is already the newest version (6.2.4-1).
qt6-tools-dev is already the newest version (6.2.4-1).
qt6-tools-dev-tools is already the newest version (6.2.4-1).
qtchooser is already the newest version (66-2build1).
qtmultimedia5-dev is already the newest version (5.15.3-1).
qttools5-dev is already the newest version (5.15.3-1).
qttools5-dev-tools is already the newest version (5.15.3-1).
libpcre2-dev is already the newest version (10.39-3ubuntu0.1).
python3 is already the newest version (3.10.6-1~22.04).
qt5-qmake is already the newest version (5.15.3+dfsg-2ubuntu0.2).
qtbase5-dev is already the newest version (5.15.3+dfsg-2ubuntu0.2).
qtbase5-dev-tools is already the newest version (5.15.3+dfsg-2ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
wptracy@wptracy-desktop:~/wireshark/build$
--
Pat Tracy | +1 303-933-9035






CONFIDENTIALITY NOTICE: This message is the property of International Game 
Technology PLC and/or its subsidiaries and may contain proprietary, 
confidential or trade secret information. This message is intended solely for 
the use of the addressee. If you are not the intended recipient and have 
received this message in error, please delete this message from your system. 
Any unauthorized reading, distribution, copying, or other use of this message 
or its attachments is strictly prohibited.
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Fulko Hew
On Thu, Oct 20, 2022 at 11:22 AM w...@comcast.net  wrote:

> I can't compile wireshark version 4.0 on Raspberry Pi ubuntu 22.04
>
> Here is the error from make.
>
> I've attached cmake success and make error logs.txt, CMakeError.log and
> CMakeOutput.log
>
> [ 84%] Building CXX object ui/qt/CMakeFiles/qtui.dir/sequence_dialog.cpp.o
> [ 84%] Building CXX object
> ui/qt/CMakeFiles/qtui.dir/service_response_time_dialog.cpp.o
> [ 84%] Building CXX object
> ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
> /home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp: In member
> function ‘void ShowPacketBytesDialog::symbolizeBuffer(QByteArray&)’:
> /home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:474:20: error:
> comparison is always false due to limited range of data type
> [-Werror=type-limits]
>   474 | if ((ba[i] < '\0' || ba[i] >= ' ') && ba[i] != (char)0x7f
> && !g_ascii_isprint(ba[i])) {
> cc1plus: all warnings being treated as errors
>

My guess as to what could be wrong according to the error is that
ba[i] < '\0' is 'always false'  because ba (although declared as a
QByteArray) is probably
an unsigned byte array, and as such a value can never be less than zero.
So that test will always be false as the error message says.

Now how to fix it is another story.
My first crack at it would be to disable that warning.
My second approach would be to correct that test (as appropriate).
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe


Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread Roland Knall
Please attach your cmake outputAm 20.10.2022 um 17:30 schrieb chuck c :Can you add a link to the source bundle you downloaded.On Thu, Oct 20, 2022 at 10:22 AM w...@comcast.net  wrote:
  


  
  
I can't compile wireshark version 4.0 on Raspberry Pi ubuntu
  22.04

Here is the error from make.
I've attached cmake success and make error logs.txt,
  CMakeError.log and CMakeOutput.log

[ 84%] Building CXX object
ui/qt/CMakeFiles/qtui.dir/sequence_dialog.cpp.o
[ 84%] Building CXX object
ui/qt/CMakeFiles/qtui.dir/service_response_time_dialog.cpp.o
[ 84%] Building CXX object
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp: In
member function ‘void
ShowPacketBytesDialog::symbolizeBuffer(QByteArray&)’:
/home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:474:20:
error: comparison is always false due to limited range of data
type [-Werror=type-limits]
  474 | if ((ba[i] < '\0' || ba[i] >= ' ')
&& ba[i] != (char)0x7f &&
!g_ascii_isprint(ba[i])) {
cc1plus: all warnings being treated as errors
make[2]: *** [ui/qt/CMakeFiles/qtui.dir/build.make:1806:
ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o] Error
1
make[1]: *** [CMakeFiles/Makefile2:10816:
ui/qt/CMakeFiles/qtui.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
wptracy@wptracy-desktop:~/wireshark/build$ 
  
I have these libraries installed:
wptracy@wptracy-desktop:~/wireshark/build$
sudo apt install gcc \
    g++\
    libglib2.0-dev \
    libc-ares-dev \
    libpcap-dev \
    libpcre2-dev \
    flex \
    make \
    python3 \
    libgcrypt-dev\
    qttools5-dev \
    qttools5-dev-tools \
    libqt5svg5-dev \
    qtmultimedia5-dev \
    qtbase5-dev \
    qtchooser \
    qt5-qmake \
    qtbase5-dev-tools\
    qt6-base-dev \
    qt6-multimedia-dev \
    qt6-tools-dev \
    qt6-tools-dev-tools \
    qt6-l10n-tools \
    libqt6core5compat6-dev \
    libxkbcommon-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libgcrypt20-dev' instead of 'libgcrypt-dev'
flex is already the newest version (2.6.4-8build2).
g++ is already the newest version (4:11.2.0-1ubuntu1).
gcc is already the newest version (4:11.2.0-1ubuntu1).
libc-ares-dev is already the newest version (1.18.1-1build1).
libgcrypt20-dev is already the newest version (1.9.4-3ubuntu3).
libglib2.0-dev is already the newest version (2.72.1-1).
libpcap-dev is already the newest version (1.10.1-4build1).
libvulkan-dev is already the newest version (1.3.204.1-2).
libxkbcommon-dev is already the newest version (1.4.0-1).
make is already the newest version (4.3-4.1build1).
freeglut3-dev is already the newest version (2.8.1-6).
libqt5svg5-dev is already the newest version (5.15.3-1).
libqt6core5compat6-dev is already the newest version (6.2.4-1).
qt6-base-dev is already the newest version
(6.2.4+dfsg-2ubuntu1).
qt6-l10n-tools is already the newest version (6.2.4-1).
qt6-multimedia-dev is already the newest version (6.2.4-1).
qt6-tools-dev is already the newest version (6.2.4-1).
qt6-tools-dev-tools is already the newest version (6.2.4-1).
qtchooser is already the newest version (66-2build1).
qtmultimedia5-dev is already the newest version (5.15.3-1).
qttools5-dev is already the newest version (5.15.3-1).
qttools5-dev-tools is already the newest version (5.15.3-1).
libpcre2-dev is already the newest version (10.39-3ubuntu0.1).
python3 is already the newest version (3.10.6-1~22.04).
qt5-qmake is already the newest version
(5.15.3+dfsg-2ubuntu0.2).
qtbase5-dev is already the newest version
(5.15.3+dfsg-2ubuntu0.2).
qtbase5-dev-tools is already the newest version
(5.15.3+dfsg-2ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
wptracy@wptracy-desktop:~/wireshark/build$ 
  

-- 
Pat Tracy | +1 303-933-9035
  

___
Sent via:    Wireshark-dev mailing list 
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             

Re: [Wireshark-dev] can't compile wireshark version 4.0

2022-10-20 Thread chuck c
Can you add a link to the source bundle you downloaded.

On Thu, Oct 20, 2022 at 10:22 AM w...@comcast.net  wrote:

> I can't compile wireshark version 4.0 on Raspberry Pi ubuntu 22.04
>
> Here is the error from make.
>
> I've attached cmake success and make error logs.txt, CMakeError.log and
> CMakeOutput.log
>
> [ 84%] Building CXX object ui/qt/CMakeFiles/qtui.dir/sequence_dialog.cpp.o
> [ 84%] Building CXX object
> ui/qt/CMakeFiles/qtui.dir/service_response_time_dialog.cpp.o
> [ 84%] Building CXX object
> ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o
> /home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp: In member
> function ‘void ShowPacketBytesDialog::symbolizeBuffer(QByteArray&)’:
> /home/wptracy/wireshark/ui/qt/show_packet_bytes_dialog.cpp:474:20: error:
> comparison is always false due to limited range of data type
> [-Werror=type-limits]
>   474 | if ((ba[i] < '\0' || ba[i] >= ' ') && ba[i] != (char)0x7f
> && !g_ascii_isprint(ba[i])) {
> cc1plus: all warnings being treated as errors
> make[2]: *** [ui/qt/CMakeFiles/qtui.dir/build.make:1806:
> ui/qt/CMakeFiles/qtui.dir/show_packet_bytes_dialog.cpp.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:10816: ui/qt/CMakeFiles/qtui.dir/all]
> Error 2
> make: *** [Makefile:146: all] Error 2
> wptracy@wptracy-desktop:~/wireshark/build$
>
> I have these libraries installed:
>
> wptracy@wptracy-desktop:~/wireshark/build$ sudo apt install gcc \
> g++\
> libglib2.0-dev \
> libc-ares-dev \
> libpcap-dev \
> libpcre2-dev \
> flex \
> make \
> python3 \
> libgcrypt-dev\
> qttools5-dev \
> qttools5-dev-tools \
> libqt5svg5-dev \
> qtmultimedia5-dev \
> qtbase5-dev \
> qtchooser \
> qt5-qmake \
> qtbase5-dev-tools\
> qt6-base-dev \
> qt6-multimedia-dev \
> qt6-tools-dev \
> qt6-tools-dev-tools \
> qt6-l10n-tools \
> libqt6core5compat6-dev \
> libxkbcommon-dev
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> Note, selecting 'libgcrypt20-dev' instead of 'libgcrypt-dev'
> flex is already the newest version (2.6.4-8build2).
> g++ is already the newest version (4:11.2.0-1ubuntu1).
> gcc is already the newest version (4:11.2.0-1ubuntu1).
> libc-ares-dev is already the newest version (1.18.1-1build1).
> libgcrypt20-dev is already the newest version (1.9.4-3ubuntu3).
> libglib2.0-dev is already the newest version (2.72.1-1).
> libpcap-dev is already the newest version (1.10.1-4build1).
> libvulkan-dev is already the newest version (1.3.204.1-2).
> libxkbcommon-dev is already the newest version (1.4.0-1).
> make is already the newest version (4.3-4.1build1).
> freeglut3-dev is already the newest version (2.8.1-6).
> libqt5svg5-dev is already the newest version (5.15.3-1).
> libqt6core5compat6-dev is already the newest version (6.2.4-1).
> qt6-base-dev is already the newest version (6.2.4+dfsg-2ubuntu1).
> qt6-l10n-tools is already the newest version (6.2.4-1).
> qt6-multimedia-dev is already the newest version (6.2.4-1).
> qt6-tools-dev is already the newest version (6.2.4-1).
> qt6-tools-dev-tools is already the newest version (6.2.4-1).
> qtchooser is already the newest version (66-2build1).
> qtmultimedia5-dev is already the newest version (5.15.3-1).
> qttools5-dev is already the newest version (5.15.3-1).
> qttools5-dev-tools is already the newest version (5.15.3-1).
> libpcre2-dev is already the newest version (10.39-3ubuntu0.1).
> python3 is already the newest version (3.10.6-1~22.04).
> qt5-qmake is already the newest version (5.15.3+dfsg-2ubuntu0.2).
> qtbase5-dev is already the newest version (5.15.3+dfsg-2ubuntu0.2).
> qtbase5-dev-tools is already the newest version (5.15.3+dfsg-2ubuntu0.2).
> 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
> wptracy@wptracy-desktop:~/wireshark/build$
>
> --
> Pat Tracy | +1 303-933-9035
>
> ___
> Sent via:Wireshark-dev mailing list 
> Archives:https://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
>  mailto:wireshark-dev-requ...@wireshark.org
> ?subject=unsubscribe
>
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe