Bug 249152

Summary: math/flann: fix build on GCC architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Piotr Kubaj <pkubaj>
Status: Closed FIXED    
Severity: Affects Only Me CC: pkubaj, yuri
Priority: --- Flags: yuri: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch pkubaj: maintainer-approval? (yuri)

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