Bug 228443

Summary: audio/moony-lv2: fails to find the 'clog' function (using check_function_exists) in 12
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Individual Port(s)Assignee: kde
Status: Closed FIXED    
Severity: Affects Only Me CC: adridg, rhurlin, tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch the patch none

Description Yuri Victorovich freebsd_committer 2018-05-23 18:43:42 UTC
'clog' has been recently added in 12 @ /usr/include/complex.h:104.
However, cmake's check_function_exists doesn't find it, see this log:
http://beefy11.nyi.freebsd.org/data/head-i386-default/p470591_s333820/logs/moony-lv2-0.22.0.log

This port's CMakeLists.txt has "check_function_exists(clog FreeBSD_CLOG_EXISTS)".

The log says that it isn't found (in libraries):
> -- Looking for clog
> -- Looking for clog - not found

But the build later fails because 'clog' is present in the headers:
> lcomplex/lcomplex.c:84:16: error: static declaration of 'clog' follows non-static declaration
> static Complex clog(Complex z) {return log(cabs(z)) + I * carg(z);}
               ^
> /usr/include/complex.h:104:16: note: previous declaration is here
> double complex  clog(double complex);
>                 ^
Comment 1 Tobias C. Berner freebsd_committer 2018-05-23 22:02:09 UTC
Hi Yuri

You can pass a flag to cmake to see why the check for clog fails -- that should hopefully point you into the right direction.


mfg Tobias
Comment 2 Tobias C. Berner freebsd_committer 2018-05-23 22:07:58 UTC
Created attachment 193638 [details]
patch the patch

-- Looking for clog in m
-- Looking for clog in m - found
-- Looking for cpow in m
-- Looking for cpow in m - not found
Comment 3 Yuri Victorovich freebsd_committer 2018-05-24 17:19:33 UTC
Committed.
Thank you, Tobias!
Comment 4 commit-hook freebsd_committer 2018-05-24 17:19:58 UTC
A commit references this bug:

Author: yuri
Date: Thu May 24 17:19:00 UTC 2018
New revision: 470793
URL: https://svnweb.freebsd.org/changeset/ports/470793

Log:
  audio/moony-lv2: Fix built on 10

  Also change USES=cmake -> USES=cmake:outsource

  As it turned out, cmake's check_function_exists doesn't find functions
  in libm.so, so check_library_exists should be used.

  PR:		228443
  Submitted by:	tcberner (cmake part)

Changes:
  head/audio/moony-lv2/Makefile
  head/audio/moony-lv2/files/patch-CMakeLists.txt