Wireshark-dev: Re: [Wireshark-dev] Building RPM proprietarry plugin including math.h fails
From: João Valverde <[email protected]>
Date: Wed, 29 Aug 2018 05:27:31 +0100

On 29/08/18 05:15, Anders Broman wrote:

-----Original Message-----
From: Wireshark-dev <[email protected]> On Behalf Of João Valverde
Sent: den 29 augusti 2018 01:40
To: [email protected]
Subject: Re: [Wireshark-dev] Building RPM proprietarry plugin including math.h fails

On 29/08/18 00:30, João Valverde wrote:

On 28/08/18 19:39, João Valverde wrote:

On 28/08/18 16:59, Anders Broman wrote:

Den tis 28 aug. 2018 16:25Ed Beroset <[email protected]
<mailto:[email protected]>> skrev:

     On 08/28/2018 09:35 AM, Anders Broman wrote:
      > Hi,
      > tfo/packet-tfo.c:3754: undefined reference to `pow'
      > collect2: error: ld returned 1 exit status
      > when running make-rpm-package

     That's the symptom of missing the math library on the linker
     line.  You'd need to add '-lm' to the linker line, if that's
     asking about.


Sure but somthing changed recently in the cmake files and broke it,
as it has worked before.
I'm trying a fix in the cmake file in epan.

You could try using PUBLIC with M_LIBRARIES.


Is this your own custom build or not?
I see now that you said proprietary plugin in the subject. Just add
M_LIBRARIES to your build?
If indeed that is the problem (very likely) the decision to make these libraries PRIVATE was intentional because the only external linkage requirement that I saw was glib.

Yes this was the problem as I suspected yesterday, it just took a while to verify as I had to delete the build directory to have the cmake changes take effect. Another question
It's not a bug in Wireshark, it's a bug in your build, IMO.

Is this bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=15084 also related to the cmake changes?
I'll look into it.