Bug 249152 - math/flann: fix build on GCC architectures
Summary: math/flann: fix build on GCC architectures
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: Piotr Kubaj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-06 17:46 UTC by Piotr Kubaj
Modified: 2020-09-06 18:00 UTC (History)
2 users (show)

See Also:
yuri: maintainer-feedback+


Attachments
patch (1.36 KB, patch)
2020-09-06 17:49 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (yuri)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2020-09-06 17:46:41 UTC

    
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2020-09-06 17:48:46 UTC
Sorry for empty message, I pressed enter too early.

Last update broke flann with GCC. Since it was about the patch you added, I wasn't sure about it.

Anyway, this breaks GCC:

-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+if(CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|DragonFly" AND CMAKE_COMPILER_IS_GNUCC)
     add_library(flann_cpp SHARED "")
     set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
     target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)

Removing it makes things work (and requiring newer GCC).
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2020-09-06 17:49:15 UTC
Created attachment 217792 [details]
patch
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2020-09-06 17:54:17 UTC
Approved.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-09-06 18:00:10 UTC
A commit references this bug:

Author: pkubaj
Date: Sun Sep  6 17:59:16 UTC 2020
New revision: 547860
URL: https://svnweb.freebsd.org/changeset/ports/547860

Log:
  math/flann: fix build on GCC architectures

  Last addition to files/patch-src_cpp_CMakeLists.txt breaks build.

  Also require newer GCC.

  PR:		249152
  Approved by:	yuri (maintainer)

Changes:
  head/math/flann/Makefile
  head/math/flann/files/patch-src_cpp_CMakeLists.txt