Bug 275014 - audio/linux-c7-alsa-plugins-oss: fails to build with -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
Summary: audio/linux-c7-alsa-plugins-oss: fails to build with -enable-trivial-auto-var...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-10 17:58 UTC by Sean McBride
Modified: 2024-03-26 16:38 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean McBride 2023-11-10 17:58:54 UTC
I build my own packages with poudriere.

I recently globally added the clang `-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang` flag and that broke `audio/linux-c7-alsa-plugins-oss` from building.  The other 419 packages I build had no problem.

The error is:

```
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... Segmentation fault (core dumped)
configure: error: in `/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/32/alsa-plugins-1.1.6':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
*** Error code 77

Stop.
make: stopped in /usr/ports/audio/linux-c7-alsa-plugins-oss
```

The `-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang` flag has a dubious name I agree, but that's only because FreeBSD 13.2's clang 14 is rather old.  In newer clang the flag was promoted from experimental to fully legit and is now named `-ftrivial-auto-var-init=zero`.  See https://discourse.llvm.org/t/making-ftrivial-auto-var-init-zero-a-first-class-option/55143

My reason for using the flag is the same as others: security.  Android, Chrome OS, Windows, Apple, and others use this in production builds too.

From the error output, I would guess that something is building and running a C program to test something, and that program is crashing.
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2023-11-15 07:08:26 UTC
(In reply to Sean McBride from comment #0)
What does config.log say?
Comment 2 Sean McBride 2023-11-19 20:08:17 UTC
Fernando, thanks for your reply. I'm just headed on vacation, but will retry and get that log file in 3 weeks.
Comment 3 Sean McBride 2023-12-26 02:48:48 UTC
So I re-enabled that flag but the build error didn't come back until a week or so later (maybe because the port and its dependencies didn't change recently?).  Anyway, here is the detail that gets emailed to me by poudriere:

Maintainer:     emulation@FreeBSD.org
Last committer: @FreeBSD.org
Ident:          Makefile ident:
Log URL:        https://nemesis.rogue-research.com//data/amd64-13-2-default/2023-12-25_03h00m06s/logs/linux-c7-alsa-plugins-oss-1.1.6_3.log
Build URL:      https://nemesis.rogue-research.com//build.html?mastername=amd64-13-2-default&build=2023-12-25_03h00m06s
Log:

=>> Building audio/linux-c7-alsa-plugins-oss
build started at Mon Dec 25 08:58:18 EST 2023
port directory: /usr/ports/audio/linux-c7-alsa-plugins-oss
package name: linux-c7-alsa-plugins-oss-1.1.6_3
building for: FreeBSD amd64-13-2-default-job-02 13.2-RELEASE-p9 FreeBSD 13.2-RELEASE-p9 amd64
maintained by: emulation@FreeBSD.org
Makefile ident:
Poudriere version: 3.3.7_4
Host OSVERSION: 1302001
Jail OSVERSION: 1302001
Job Id: 02

---Begin Environment---
SHELL=/bin/csh
OSVERSION=1302001
UNAME_v=FreeBSD 13.2-RELEASE-p9
UNAME_r=13.2-RELEASE-p9
BLOCKSIZE=K
MAIL=/var/mail/root
MM_CHARSET=UTF-8
LANG=C.UTF-8
STATUS=1
HOME=/root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
LOCALBASE=/usr/local
USER=root
LIBEXECPREFIX=/usr/local/libexec/poudriere
POUDRIERE_VERSION=3.3.7_4
MASTERMNT=/usr/local/poudriere/data/.m/amd64-13-2-default/ref
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=
GID=0
UID=0
PWD=/usr/local/poudriere/data/.m/amd64-13-2-default/ref/.p/pool
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=amd64-13-2-default
SCRIPTPREFIX=/usr/local/share/poudriere
OLDPWD=/usr/local/poudriere/data/.m/amd64-13-2-default/ref/.p
SCRIPTPATH=/usr/local/share/poudriere/bulk.sh
POUDRIEREPATH=/usr/local/bin/poudriere
---End Environment---

---Begin Poudriere Port Flags/Env---
PORT_FLAGS=
PKGENV=
FLAVOR=
DEPENDS_ARGS=
MAKE_ARGS=
---End Poudriere Port Flags/Env---

---Begin OPTIONS List---
---End OPTIONS List---

--MAINTAINER--
emulation@FreeBSD.org
--End MAINTAINER--

--CONFIGURE_ARGS--

--End CONFIGURE_ARGS--

--CONFIGURE_ENV--
MAKE=gmake PKG_CONFIG=pkgconf XDG_DATA_HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/.cache  HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig SHELL=/bin/sh CONFIG_SHELL=/bin/sh DEFAULT_AUTOCONF=2.71
--End CONFIGURE_ENV--

--MAKE_ENV--
XDG_DATA_HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work  XDG_CONFIG_HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work  XDG_CACHE_HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/.cache  HOME=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work TMPDIR="/tmp" PATH=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES DEFAULT_AUTOCONF=2.71 PREFIX=/compat/linux  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang  --sysroot=/compat/linux -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-DFREEBSD_OSS -DFREEBSD_OSS_USE_IO_PTR"  LDFLAGS=" -fstack-protector-strong
  " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang --sysroot=/compat/linux -fstack-protector-strong -fno-strict-aliasing -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang  "  MANPREFIX="/compat/linux" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444"
--End MAKE_ENV--

--PLIST_SUB--
OSREL=13.2 PREFIX=%D LOCALBASE=/usr/local  RESETPREFIX=/compat/linux LIB32DIR=lib DOCSDIR="usr/share/doc/alsa-plugins-1.1.6"  EXAMPLESDIR="share/examples/alsa-plugins"  DATADIR="usr/share/alsa-plugins"  WWWDIR="www/alsa-plugins"  ETCDIR="etc/alsa-plugins"
--End PLIST_SUB--

--SUB_LIST--
PREFIX=/compat/linux LOCALBASE=/usr/local  DATADIR=/compat/linux/usr/share/alsa-plugins DOCSDIR=/compat/linux/usr/share/doc/alsa-plugins-1.1.6 EXAMPLESDIR=/compat/linux/share/examples/alsa-plugins  WWWDIR=/compat/linux/www/alsa-plugins ETCDIR=/compat/linux/etc/alsa-plugins
--End SUB_LIST--

---Begin make.conf---
USE_PACKAGE_DEPENDS=yes
BATCH=yes
WRKDIRPREFIX=/wrkdirs
PORTSDIR=/usr/ports
PACKAGES=/packages
DISTDIR=/distfiles
FORCE_PACKAGE=yes
PACKAGE_BUILDING=yes
PACKAGE_BUILDING_FLAVORS=yes
#### /usr/local/etc/poudriere.d/make.conf ####
OPTIONS_SET = LDAP LDAPS LDAP-SASL AUTHNZ_LDAP
OPTIONS_UNSET += EXAMPLES TEST TESTS X11 GUI
CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
CXXFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang

#### Misc Poudriere ####
.include "/etc/make.conf.ports_env"
DISABLE_MAKE_JOBS=poudriere
---End make.conf---
--Resource limits--
cpu time               (seconds, -t)  unlimited
file size           (512-blocks, -f)  unlimited
data seg size           (kbytes, -d)  33554432
stack size              (kbytes, -s)  524288
core file size      (512-blocks, -c)  unlimited
max memory size         (kbytes, -m)  unlimited
locked memory           (kbytes, -l)  unlimited
max user processes              (-u)  34304
open files                      (-n)  1024
virtual mem size        (kbytes, -v)  unlimited
swap limit              (kbytes, -w)  unlimited
socket buffer size       (bytes, -b)  unlimited
pseudo-terminals                (-p)  unlimited
kqueues                         (-k)  unlimited
umtx shared locks               (-o)  unlimited
--End resource limits--
=======================<phase: check-sanity   >============================
===>  License LGPL21+ accepted by the user
===========================================================================
=======================<phase: pkg-depends    >============================
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on file: /usr/local/sbin/pkg - not found
===>   Installing existing package /packages/All/pkg-1.20.9.pkg
[amd64-13-2-default-job-02] Installing pkg-1.20.9...
[amd64-13-2-default-job-02] Extracting pkg-1.20.9: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on file: /usr/local/sbin/pkg - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===========================================================================
=======================<phase: fetch-depends  >============================
===========================================================================
=======================<phase: fetch          >============================
===>  License LGPL21+ accepted by the user
===> Fetching all distfiles required by linux-c7-alsa-plugins-oss-1.1.6_3 for building
===========================================================================
=======================<phase: checksum       >============================
===>  License LGPL21+ accepted by the user
===> Fetching all distfiles required by linux-c7-alsa-plugins-oss-1.1.6_3 for building
=> SHA256 Checksum OK for centos/alsa-plugins-1.1.6-1.el7.src.rpm.
===========================================================================
=======================<phase: extract-depends>============================
===========================================================================
=======================<phase: extract        >============================
===>  License LGPL21+ accepted by the user
===> Fetching all distfiles required by linux-c7-alsa-plugins-oss-1.1.6_3 for building
===>  Extracting for linux-c7-alsa-plugins-oss-1.1.6_3
=> SHA256 Checksum OK for centos/alsa-plugins-1.1.6-1.el7.src.rpm.
===========================================================================
=======================<phase: patch-depends  >============================
===========================================================================
=======================<phase: patch          >============================
===>  Patching for linux-c7-alsa-plugins-oss-1.1.6_3
===========================================================================
=======================<phase: build-depends  >============================
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: gmake>=4.3 - not found
===>   Installing existing package /packages/All/gmake-4.3_2.pkg
[amd64-13-2-default-job-02] Installing gmake-4.3_2...
[amd64-13-2-default-job-02] `-- Installing gettext-runtime-0.22.3...
[amd64-13-2-default-job-02] |   `-- Installing indexinfo-0.3.1...
[amd64-13-2-default-job-02] |   `-- Extracting indexinfo-0.3.1: .... done
[amd64-13-2-default-job-02] `-- Extracting gettext-runtime-0.22.3: .......... done
[amd64-13-2-default-job-02] Extracting gmake-4.3_2: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: gmake>=4.3 - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on executable: libtool - not found
===>   Installing existing package /packages/All/libtool-2.4.7_1.pkg
[amd64-13-2-default-job-02] Installing libtool-2.4.7_1...
[amd64-13-2-default-job-02] `-- Installing m4-1.4.19,1...
[amd64-13-2-default-job-02] `-- Extracting m4-1.4.19,1: .......... done
[amd64-13-2-default-job-02] Extracting libtool-2.4.7_1: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on executable: libtool - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: linux-c7-alsa-lib>0 - not found
===>   Installing existing package /packages/All/linux-c7-alsa-lib-1.1.8.pkg
[amd64-13-2-default-job-02] Installing linux-c7-alsa-lib-1.1.8...
[amd64-13-2-default-job-02] `-- Installing alsa-lib-1.2.10...
[amd64-13-2-default-job-02] `-- Extracting alsa-lib-1.2.10: .......... done
[amd64-13-2-default-job-02] `-- Installing linux_base-c7-7.9.2009_1...
[amd64-13-2-default-job-02] `-- Extracting linux_base-c7-7.9.2009_1: .......... done
[amd64-13-2-default-job-02] Extracting linux-c7-alsa-lib-1.1.8: .......... done
=====
Message from linux_base-c7-7.9.2009_1:

--
Some programs need linprocfs mounted on /compat/linux/proc.  Add the
following line to /etc/fstab:

linprocfs   /compat/linux/proc	linprocfs	rw	0	0

Then run "mount /compat/linux/proc".

Some programs need linsysfs mounted on /compat/linux/sys.  Add the
following line to /etc/fstab:

linsysfs    /compat/linux/sys	linsysfs	rw	0	0

Then run "mount /compat/linux/sys".

Some programs need tmpfs mounted on /compat/linux/dev/shm.  Add the
following line to /etc/fstab:

tmpfs    /compat/linux/dev/shm	tmpfs	rw,mode=1777	0	0

Then run "mount /compat/linux/dev/shm".
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: linux-c7-alsa-lib>0 - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: linux-c7-alsa-lib-devel>0 - not found
===>   Installing existing package /packages/All/linux-c7-alsa-lib-devel-1.1.8.pkg
[amd64-13-2-default-job-02] Installing linux-c7-alsa-lib-devel-1.1.8...
[amd64-13-2-default-job-02] Extracting linux-c7-alsa-lib-devel-1.1.8: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: linux-c7-alsa-lib-devel>0 - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: linux_base-c7>=7.6.1810_7 - found
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: linux-c7-devtools>0 - not found
===>   Installing existing package /packages/All/linux-c7-devtools-7.9.2009_1.pkg
[amd64-13-2-default-job-02] Installing linux-c7-devtools-7.9.2009_1...
[amd64-13-2-default-job-02] `-- Installing linux-c7-libgfortran-4.8.5_6...
[amd64-13-2-default-job-02] `-- Extracting linux-c7-libgfortran-4.8.5_6: .... done
[amd64-13-2-default-job-02] Extracting linux-c7-devtools-7.9.2009_1: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: linux-c7-devtools>0 - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: pkgconf>=1.3.0_1 - not found
===>   Installing existing package /packages/All/pkgconf-2.0.3_1,1.pkg
[amd64-13-2-default-job-02] Installing pkgconf-2.0.3_1,1...
[amd64-13-2-default-job-02] Extracting pkgconf-2.0.3_1,1: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: pkgconf>=1.3.0_1 - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: autoconf>=2.71 - not found
===>   Installing existing package /packages/All/autoconf-2.71.pkg
[amd64-13-2-default-job-02] Installing autoconf-2.71...
[amd64-13-2-default-job-02] `-- Installing autoconf-switch-20220527...
[amd64-13-2-default-job-02] `-- Extracting autoconf-switch-20220527: .......... done
[amd64-13-2-default-job-02] `-- Installing perl5-5.36.3_1...
[amd64-13-2-default-job-02] `-- Extracting perl5-5.36.3_1: .......... done
[amd64-13-2-default-job-02] Extracting autoconf-2.71: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: autoconf>=2.71 - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: automake>=1.16.5 - not found
===>   Installing existing package /packages/All/automake-1.16.5.pkg
[amd64-13-2-default-job-02] Installing automake-1.16.5...
[amd64-13-2-default-job-02] Extracting automake-1.16.5: .......... done
===>   linux-c7-alsa-plugins-oss-1.1.6_3 depends on package: automake>=1.16.5 - found
===>   Returning to build of linux-c7-alsa-plugins-oss-1.1.6_3
===========================================================================
=======================<phase: lib-depends    >============================
===========================================================================
=======================<phase: configure      >============================
===>  Configuring for linux-c7-alsa-plugins-oss-1.1.6_3
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:14: warning: The macro `AM_PROG_LIBTOOL' is obsolete.
configure.ac:14: You should run autoupdate.
m4/libtool.m4:101: AM_PROG_LIBTOOL is expanded from...
configure.ac:14: the top level
configure.ac:15: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:15: You should run autoupdate.
./lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:15: the top level
configure.ac:17: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
./lib/autoconf/lang.m4:199: AC_LANG_CONFTEST is expanded from...
./lib/autoconf/general.m4:2894: _AC_LINK_IFELSE is expanded from...
./lib/autoconf/general.m4:2911: AC_LINK_IFELSE is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/general.m4:2249: AC_CACHE_VAL is expanded from...
./lib/autoconf/general.m4:2270: AC_CACHE_CHECK is expanded from...
m4/attributes.m4:87: CC_CHECK_LDFLAGS is expanded from...
m4/attributes.m4:104: CC_NOUNDEFINED is expanded from...
configure.ac:17: the top level
configure.ac:21: warning: The macro `AC_ERROR' is obsolete.
configure.ac:21: You should run autoupdate.
./lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from...
configure.ac:21: the top level
configure.ac:88: warning: The macro `AC_ERROR' is obsolete.
configure.ac:88: You should run autoupdate.
./lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from...
configure.ac:88: the top level
configure.ac:239: warning: AC_OUTPUT should be used without arguments.
configure.ac:239: You should run autoupdate.
configure.ac:11: installing './compile'
configure.ac:3: installing './missing'
a52/Makefile.am: installing './depcomp'
checking for a BSD-compatible install... /compat/linux/usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether /usr/local/bin/gmake sets $(MAKE)... yes
checking whether /usr/local/bin/gmake supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... Segmentation fault (core dumped)
configure: error: in `/wrkdirs/usr/ports/audio/linux-c7-alsa-plugins-oss/work/32/alsa-plugins-1.1.6':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
*** Error code 77

Stop.
make: stopped in /usr/ports/audio/linux-c7-alsa-plugins-oss
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2024-03-25 14:55:38 UTC
audio/linux-c7-alsa-plugins-oss is built using Linux gcc, not FreeBSD clang.  You'll have to exclude the port using something like:

.if empty(.CURDIR:M*/audio/linux-c7-alsa-plugins-oss)
CFLAGS+=...
.endif
Comment 5 Sean McBride 2024-03-25 15:24:51 UTC
Tijl, thanks for your reply!

So it's simply that gcc doesn't know/accept the -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang flag, which makes sense.

Why does it compile with gcc?  I've not encountered a lot of C/C++ code these days that doesn't compile with both gcc and clang...
Comment 6 Tijl Coosemans freebsd_committer freebsd_triage 2024-03-25 16:41:27 UTC
(In reply to Sean McBride from comment #5)
This port is essentially building a Linux package, not a FreeBSD package.  So it uses a Linux compiler and the only one we have is gcc.
Comment 7 Sean McBride 2024-03-25 17:03:26 UTC
Tijl, I guess what I'm asking though is: does it really actually require gcc?  Clang fails to build it?

Even the linux kernel can be built with Clang, and in fact Android and ChromeOS ship with such a kernel:

https://www.kernel.org/doc/html/latest/kbuild/llvm.html
Comment 8 Tijl Coosemans freebsd_committer freebsd_triage 2024-03-25 17:13:51 UTC
(In reply to Sean McBride from comment #7)
We don't have Linux clang anywhere in the ports tree.
Comment 9 Sean McBride 2024-03-25 17:17:39 UTC
Wait, is this thing being cross-compiled to run in the linuxulator?
Comment 10 Tijl Coosemans freebsd_committer freebsd_triage 2024-03-25 17:30:41 UTC
(In reply to Sean McBride from comment #9)
Yes.
Comment 11 Sean McBride 2024-03-26 16:38:52 UTC
(In reply to Tijl Coosemans from comment #4)

Your conditionalization suggestion worked, thanks!  But looks like I need to generalize it to other ports too, like www/linux-c7-qtwebkit.

What language/syntax is that?  Does it allow wildcards like this?

```
.if empty(.CURDIR:M*/linux-c7-*)
CFLAGS+=...
.endif
```