Bug 254305 - devel/ispc does not build after 567872
Summary: devel/ispc does not build after 567872
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-15 11:22 UTC by pr
Modified: 2021-03-28 16:54 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pr 2021-03-15 11:22:14 UTC
ispc requires bleeding edge llvm but devel/llvm-devel does not seem to be bleeding enough:
...
[103/123] /usr/local/llvm-devel/bin/clang++ -DBUILD_DATE=\"20210313\" -DBUILD_VERSION=\"\" -DISPC_ANDROID_TARGE
T_OFF -DISPC_IOS_TARGET_OFF -DISPC_LINUX_TARGET_OFF -DISPC_MACOS_TARGET_OFF -DISPC_PS4_TARGET_OFF -DISPC_WINDOW
S_TARGET_OFF -DISPC_X86_ENABLED -DLLVM_13_0 -D_FORTIFY_SOURCE=2 -I/usr/local/llvm-devel/include -I/include -I/w
rkdirs/usr/ports/devel/ispc/work/ispc-1.15.0/src -I. -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O
2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-sign-compare -Wno-unused-function -Werror -I/u
sr/local/llvm-devel/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fstack-prote
ctor-strong -fdata-sections -ffunction-sections -fno-delete-null-pointer-checks -Wformat -Wformat-security -fpi
e -fwrapv -Wno-c99-extensions -Wno-deprecated-register -fno-rtti -std=c++14 -MD -MT CMakeFiles/ispc.dir/parse.c
c.o -MF CMakeFiles/ispc.dir/parse.cc.o.d -o CMakeFiles/ispc.dir/parse.cc.o -c parse.cc
FAILED: CMakeFiles/ispc.dir/parse.cc.o 
/usr/local/llvm-devel/bin/clang++ -DBUILD_DATE=\"20210313\" -DBUILD_VERSION=\"\" -DISPC_ANDROID_TARGET_OFF -DISPC_IOS_TARGET_OFF -DISPC_LINUX_TARGET_OFF -DISPC_MACOS_TARGET_OFF -DISPC_PS4_TARGET_OFF -DISPC_WINDOWS_TARGET_OFF -DISPC_X86_ENABLED -DLLVM_13_0 -D_FORTIFY_SOURCE=2 -I/usr/local/llvm-devel/include -I/include -I/wrkdirs/usr/ports/devel/ispc/work/ispc-1.15.0/src -I. -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -Wall -Wno-sign-compare -Wno-unused-function -Werror -I/usr/local/llvm-devel/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fstack-protector-strong -fdata-sections -ffunction-sections -fno-delete-null-pointer-checks -Wformat -Wformat-security -fpie -fwrapv -Wno-c99-extensions -Wno-deprecated-register -fno-rtti -std=c++14 -MD -MT CMakeFiles/ispc.dir/parse.cc.o -MF CMakeFiles/ispc.dir/parse.cc.o.d -o CMakeFiles/ispc.dir/parse.cc.o -c parse.cc
In file included from src/parse.yy:88:
In file included from /wrkdirs/usr/ports/devel/ispc/work/ispc-1.15.0/src/ispc.h:40:
/wrkdirs/usr/ports/devel/ispc/work/ispc-1.15.0/src/ispc_version.h:66:2: error: "Unhandled LLVM version"
#error "Unhandled LLVM version"
 ^
In file included from src/parse.yy:88:
/wrkdirs/usr/ports/devel/ispc/work/ispc-1.15.0/src/ispc.h:45:2: error: "Only LLVM 8.0 - 11.0 and 12.0 development branch are supported"
#error "Only LLVM 8.0 - 11.0 and 12.0 development branch are supported"
 ^
2 errors generated.
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/ispc

Or maybe it's bleeding too much:
/usr/local/llvm-devel/bin/clang++ -v
clang version 13.0.0
Target: x86_64-portbld-freebsd12.2
Thread model: posix
InstalledDir: /usr/local/llvm-devel/bin

https://ispc.github.io/downloads.html mentions LLVM 11.0.0, so I switched to LLVM_VERSION= 11 (wich is today at 11.0.1) and it builds with poudriere:
--- /usr/ports/devel/ispc/Makefile.orig 2020-12-21 22:01:05.000000000 +0100
+++ /usr/ports/devel/ispc/Makefile      2021-03-15 12:03:03.007261000 +0100
@@ -24,7 +24,7 @@
 USE_GITHUB=    yes
 SHEBANG_FILES= *.py
 
-LLVM_VERSION=  -devel # Release notes https://github.com/ispc/ispc/blob/master/docs/ReleaseNotes.txt list compatible LLVM versions, but they assume that extra patches are applied to LLVM
+LLVM_VERSION=  11 # Release notes https://github.com/ispc/ispc/blob/master/docs/ReleaseNotes.txt list compatible LLVM versions, but they assume that extra patches are applied to LLVM
                # LLVM build script: https://github.com/ispc/ispc/blob/master/scripts/build.sh
 
 CONFIGURE_ENV= PATH=${LOCALBASE}/llvm${LLVM_VERSION}/bin:${PATH}

Can you please have a look? Thank you.
Comment 1 Shane 2021-03-28 08:28:25 UTC
While llvm 10 and 11 can build ispc, that seems to have stopped in later versions.

Using llvm-devel 13.0.d20210308 fails to build ispc.

When llvm-devel was at 12.0.d20201027 ispc did build.

llvm12 at 12.0.0.r2 fails to build ispc.

llvm11 11.0.1 does build ispc.

llvm10 10.0.1_5 does build ispc.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2021-03-28 16:54:05 UTC
Switched dependency to devel/llvm11.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-03-28 16:54:28 UTC
A commit references this bug:

Author: yuri
Date: Sun Mar 28 16:54:05 UTC 2021
New revision: 569401
URL: https://svnweb.freebsd.org/changeset/ports/569401

Log:
  devel/ispc: Fix build by switching dependency to devel/llvm11, the last version that currently works.

  PR:		254305
  Reported by:	pr@aoek.com

Changes:
  head/devel/ispc/Makefile