Bug 228443 - audio/moony-lv2: fails to find the 'clog' function (using check_function_exists) in 12
Summary: audio/moony-lv2: fails to find the 'clog' function (using check_function_exis...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-23 18:43 UTC by Yuri Victorovich
Modified: 2018-05-24 17:19 UTC (History)
3 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
patch the patch (1.14 KB, patch)
2018-05-23 22:07 UTC, Tobias C. Berner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2018-05-24 17:19:33 UTC
Committed.
Thank you, Tobias!
Comment 4 commit-hook freebsd_committer freebsd_triage 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