Bug 246225

Summary: lang/io: fix build on !x86
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Pietro Cerutti <gahr>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: buildisok
Priority: --- Flags: bugzilla: maintainer-feedback? (gahr)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch none

Description Piotr Kubaj freebsd_committer freebsd_triage 2020-05-05 15:05:17 UTC
Created attachment 214157 [details]
patch

Build with clang fails with:
# /wrkdirs/usr/ports/lang/io/work/io-2017.09.06/libs/basekit/source/UArray_math.c:49:1: error: use of undeclared identifier 'simd_m128'

Explicitly disable SIMD.

The same concerns lang/io-devel.
Comment 1 Automation User 2020-05-20 01:07:05 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/147746993
Comment 2 Pietro Cerutti freebsd_committer freebsd_triage 2020-05-20 07:01:36 UTC
Thanks! I'm heading more towards

--- files/extra-patch-CMakeLists.txt    (revision 535983)
+++ files/extra-patch-CMakeLists.txt    (working copy)
@@ -1,10 +1,11 @@
 --- CMakeLists.txt.orig        2019-04-05 06:24:16 UTC
 +++ CMakeLists.txt
-@@ -39,7 +39,6 @@ IF(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_C
+@@ -39,7 +39,7 @@ IF(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_C
        SET(CMAKE_BUILD_TYPE_DebugFast)
        SET(CMAKE_CXX_FLAGS_DEBUGFAST "-g -O0")
        SET(CMAKE_C_FLAGS_DEBUGFAST "-g -O0")
 -      SET(CMAKE_C_FLAGS "-msse2")
++      SET(CMAKE_C_FLAGS "-D__SIMD_NO_SIMD__")
        if(NOT CMAKE_BUILD_TYPE)
                SET(CMAKE_BUILD_TYPE "DebugFast")
        endif(NOT CMAKE_BUILD_TYPE)

but I don't have an easy way to test it. Can you please give it a try?
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2020-05-20 13:28:55 UTC
Yes, that patch is also ok.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-05-26 09:16:28 UTC
A commit references this bug:

Author: gahr
Date: Tue May 26 09:15:56 UTC 2020
New revision: 536598
URL: https://svnweb.freebsd.org/changeset/ports/536598

Log:
  lang/io, lang/io-devel: fix build on !x86

  While at it, add test target to io-devel.

  PR:		246225
  Submitted by:	pkubaj

Changes:
  head/lang/io/Makefile
  head/lang/io/files/extra-patch-CMakeLists.txt
  head/lang/io-devel/Makefile
  head/lang/io-devel/files/extra-patch-CMakeLists.txt