Wireshark fails to build when cross-compiling on Gentoo/ChromeOS
systems because the lemon command is not properly specified or
included in PATH, failing with:
/bin/sh: lemon: command not found
The relevant excerpt from build.ninja is:
COMMAND = cd ..._build/plugins/epan/mate && lemon -T.../tools/lemon/lempar.c
-d. .../plugins/epan/mate/mate_grammar.lemon
By specifying the full path to "lemon" we ensure it is
always searched and found in the correct location.
Changes:
- Drop the old basename modification that was present in the Wireshark
version of lemon.c. Use a new option available since 2018-04-20
("Add the -dDIRECTORY command-line option to LEMON.")
- Redo the static analyzer warning fixes, identifying the root causes
and adding assertions instead of hiding code with __clang_analyzer__.
- Ignore compiler warnings instead of adding config.h, _U_, extra const
keywords, unsigned/signed changes, etc.
- Remove lemon.html, it is out-of-date and external links are available.
In order to make future updates easier, document the exact steps that
were followed to create the lemon.c and lempar.c files. Future changes
SHOULD follow the same process.
My process to reach this updated lemon version:
1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync
with latest trunk.") which seems based on sqlite commit 2b3d584ffe.
2. Check successive Wireshark patches. Identified many non-functional
changes to silence compiler warnings and static analyzer issues.
Found one feature (basename) that can be replaced with upstream -d.
3. Write minimal patches and document changes.
Upstream typos and coding style issues (other than trailing whitespace)
were deliberately not fixed to remain as close as possible to upstream.
Change-Id: I606f46dede86e34520f962a9e7163912392aad57
Reviewed-on: https://code.wireshark.org/review/30290
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This generates a top level target, checkAPI, that is
excluded from the ALL build target, so must be run separately.
On Windows using a Visual Studio generator, call
msbuild /p:Configuration=RelWithDebInfo checkAPI.vcxproj
Change-Id: I44a57c564dcfc75499463b942436f4b920a82478
Reviewed-on: https://code.wireshark.org/review/14873
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Update from SQLite trunk (19 April 2015)
Add include <config.h>
Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_)
Fix implicit conversion loses integer precision
Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
Fix function declaration isn’t a prototype [-Wstrict-prototypes]
Fix warning: old-style function definition [-Wold-style-definition]
Fix trailing whitespace
Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake
Fix -Wmissing-prototypes Remove unused function (acttab_free)
Add basename the filename with only filename (no path...)
Fix lemon.c:3435: warning: implicit conversion shortens 64-bit value into a 32-bit value
Add "new" version of lempar.c (3 November 2009).
LEMPAR: fix trailing whitespace
LEMPAR: fix -Wunused-parameter
Change-Id: I2df7e39c9a6846de26743a981fb76aca423fe813
Reviewed-on: https://code.wireshark.org/review/6502
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Add a dependency on the lemon binary and lempar.c files because the
output depends on these tools. This is already done for autotools and
nmake.
In addition, clean up the generated .h and .out files.
Change-Id: Ic1fa2c23949abf05e976a67d226c90293b2ce834
Reviewed-on: https://code.wireshark.org/review/9139
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This reverts commit 5855dd8d53.
This Lemon update fails to compile on OSX and triggers asserts on other platforms
Change-Id: I12a8a2bf32db31e5a9b0cb1a67a39724e30f3e91
Reviewed-on: https://code.wireshark.org/review/6496
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Fix warning: declaration shadows a variable in the global scope [-Wshadow]
Add include <config.h>
Fix warning: unused parameter 'argc' [-Wunused-parameter] (using _U_)
Fix implicit conversion loses integer precision
Fix comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
Fix function declaration isn’t a prototype [-Wstrict-prototypes]
Fix warning: old-style function definition [-Wold-style-definition]
Fix trailing whitespace
Fix use -T for template for epan\Makefile.nmake, epan\dfilter\Makefile.nmake, plugins\mate\Makefile.nmake, plugins\tpg\Makefile.nmake and cmake/modules/UseLemon.cmake
Fix -Wmissing-prototypes
Remove unused function (acttab_free)
Add basename the filename with only filename (no path...)
Change-Id: Ia79f61e29f828575df61cc89134c6c553044e86d
Reviewed-on: https://code.wireshark.org/review/3976
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)
Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
http://www.itk.org/Bug/view.php?id=9219
Note that CMAKE_CFG_INTDIR is no longer necessary for this purpose but
has been left for compatibility with existing projects. Instead
add_custom_command() recognizes executable target names in its COMMAND
So just use "lemon" instead of specifying the full path.
svn path=/trunk/; revision=30109
- FindHtmlViewer.cmake: Try to add reading the name of the
html viewer from the HTML_VIEWER environment variable (untested)
svn path=/trunk/; revision=30104
That's what the packages are for, so instead of creating
WSWIN32, the stuff should probably go into the GLIB2
package.
- libwireshark now compiles - no time to add linking with
it until tonight
svn path=/trunk/; revision=29756
It's only beginnings, so epan is commented out in
the subdirs statement.
This is more a synch to avoid duplicate work and creating
conflicting patches to the cmake stuff.
svn path=/trunk/; revision=29666