ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 10074] New: CMake build doesn't support "use this package

Date: Sun, 04 May 2014 23:59:01 +0000
Bug ID 10074
Summary CMake build doesn't support "use this package if present, otherwise don't"
Classification Unclassified
Product Wireshark
Version Git
Hardware x86
OS Mac OS X 10.8
Status UNCONFIRMED
Severity Major
Priority Low
Component Wireshark
Assignee [email protected]
Reporter [email protected]

Build Information:
Current
--
We have a number of CMake options to include various packages.

Options in CMake are, unfortunately, Boolean; you can say "build with this
package" or "don't build with this package", but you can't say "build with this
package if it's available, but don't build with it if it's not".

The user wouldn't explicitly request that for a package, but, for several
packages, that would be the appropriate *default* setting for the package.

This is breaking the build on the Ubuntu buildbot; for example, we're getting

    -- Could NOT find SBC (missing:  SBC_INCLUDE_DIR SBC_LIBRARY) 
    CMake Error at CMakeLists.txt:598 (message):
      SBC NOT FOUND

but that library is *NOT* a requirement for Wireshark.

It's also breaking the build on OS X:

-- Could NOT find NL (missing:  NL_LIBRARY NL_INCLUDE_DIR)
CMake Error at CMakeLists.txt:598 (message): 
  NL NOT FOUND

Netlink is Linux-specific, so neither OS X nor any of the other non-Linux OSes
we support has it, so it definitely will not be found there.

Perhaps *some* of these issues should be fixed by checking for particular
platforms and only defaulting the option to "build with this package" if it's
available on that platform, but that wouldn't, for example, fix this error:

    -- Could NOT find CARES (missing:  CARES_LIBRARY CARES_INCLUDE_DIR)
    CMake Error at CMakeLists.txt:598 (message):
      CARES NOT FOUND

which I'm seeing because I haven't installed C-ARES - I shouldn't have to
install it, *and* I shouldn't have to explicitly say "don't build with C-ARES".
I don't have to do so with the autotools; by default, they build with the
package iff it's available, and only if you use --with-XXX or --without-XXX do
they explicitly require it or refuse to use it if it's not present.


You are receiving this mail because:
  • You are watching all bug changes.