Bug 260430

Summary: net/frr7: configure: error: This FRR version needs pthreads
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Olivier Cochard <olivier>
Status: Closed FIXED    
Severity: Affects Many People CC: franco
Priority: --- Flags: bugzilla: maintainer-feedback? (olivier)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
-Wno-error patch none

Description O. Hartmann 2021-12-15 07:18:19 UTC
Environment: base host running  FreeBSD 14.0-CURRENT #3 main-n251599-bf839416381: Sun Dec 12 15:55:51 CET 2021 amd64, poudriere host, failing to build port net/frr7 for target 13-STABLE as shown below:

[...]
=>> Building net/frr7
build started at Wed Dec 15 07:06:44 UTC 2021
port directory: /usr/ports/net/frr7
package name: frr7-7.5.1_3
building for: FreeBSD poudriere.gdr.de 13.0-STABLE FreeBSD 13.0-STABLE 1300522 amd64
maintained by: olivier@FreeBSD.org
Makefile datestamp: -rw-r--r--  1 root  wheel  3609 Oct 28 16:13 /usr/ports/net/frr7/Makefile
Ports top last git commit: 9d362e791d8a
Ports top unclean checkout: no
Port dir last git commit: 4460e8dbd810
Port dir unclean checkout: no
Poudriere version: poudriere-git-3.3.99.20211130
Host OSVERSION: 1400044
Jail OSVERSION: 1300522
Job Id: 01

---Begin Environment---
SHELL=/bin/csh
OSVERSION=1300522
UNAME_v=FreeBSD 13.0-STABLE 1300522
UNAME_r=13.0-STABLE
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
POUDRIERE_NAME=poudriere-git
LIBEXECPREFIX=/usr/local/libexec/poudriere
POUDRIERE_VERSION=3.3.99.20211130
MAKEOBJDIRPREFIX=/pool/sources/13-STABLE/obj/
MASTERMNT=/pool/poudriere/data/.m/13-amd64-head-default/ref
LC_COLLATE=C
POUDRIERE_BUILD_TYPE=bulk
PACKAGE_BUILDING=yes
SAVED_TERM=screen
OUTPUT_REDIRECTED_STDERR=4
OUTPUT_REDIRECTED=1
PWD=/pool/poudriere/data/.m/13-amd64-head-default/01/.p
OUTPUT_REDIRECTED_STDOUT=3
P_PORTS_FEATURES=FLAVORS SELECTED_OPTIONS
MASTERNAME=13-amd64-head-default
SCRIPTPREFIX=/usr/local/share/poudriere
SCRIPTNAME=bulk.sh
OLDPWD=/pool/poudriere/data/.m/13-amd64-head-default/ref/.p/pool
POUDRIERE_PKGNAME=poudriere-git-3.3.99.20211130
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---
===> The following configuration options are available for frr7-7.5.1_3:
     CONFIGROLLBACKS=off: Enable configuration rollback support
     DATACENTER=off: Use reduced BGP timers
     FPM=on: Enable Forwarding Plane Manager support
     LDPD=off: Build ldpd
     MANPAGES=on: Build and/or install manual pages
     MULTIPATH=off: Enable multipath function
     PAM=off: Use libpam for PAM support in vtysh
     RPKI=on: Add BGP RPKI (RFC 6810) support
     SHELLACCESS=off: Allow users to access shell/telnet/ssh
     SNMP=off: SNMP support
     TCMALLOC=off: Use tcmalloc
     VTYSH=on: Build integrated vty shell
===> Use 'make config' to modify these settings
---End OPTIONS List---

ERROR:


[...]
checking whether cc -std=gnu11 supports -fplugin=tools/gcc-plugins/frr-format.so... no
checking whether cc -std=gnu11 supports -fplugin=frr-format... no
checking if compiler needs -Werror to reject unknown flags... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
checking for pthread-config... no
configure: error: in `/wrkdirs/usr/ports/net/frr7/work/frr-frr-7.5.1':
configure: error: This FRR version needs pthreads
See `config.log' for more details
===>  Script "configure" failed unexpectedly.
Please report the problem to olivier@FreeBSD.org [maintainer] and attach the
"/wrkdirs/usr/ports/net/frr7/work/frr-frr-7.5.1/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/net/frr7
=>> Cleaning up wrkdir
===>  Cleaning for frr7-7.5.1_3
build of net/frr7 | frr7-7.5.1_3 ended at Wed Dec 15 07:09:43 UTC 2021
build time: 00:02:59
!!! build failure encountered !!!
Comment 1 Franco Fichtner 2022-01-03 12:28:35 UTC
Created attachment 230667 [details]
-Wno-error patch

Likely caused by llvm update to version 13.

    configure:9654: checking for the pthreads library -lpthread
    configure:9692: cc -std=gnu11 -o conftest -O2 -pipe  -std=gnu99 -fstack-protector-strong -fno-strict-aliasing  -fno-omit-frame-pointer -funwind-tables -Wall -Wextra -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -     Wbad-function-cast -Wwrite-strings -Wundef -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers  -Werror -I/usr/local/include -I/usr/local/include  -L/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local/li     b -fstack-protector-strong  conftest.c -lpthread  >&5
    conftest.c:27:51: error: parameter 'a' set but not used [-Werror,-Wunused-but-set-parameter]
                            static void routine(void *a) { a = 0; }
    1 error generated.

Patch attached.


Cheers,
Franco
Comment 2 O. Hartmann 2022-01-22 13:25:48 UTC
When will the patch hit the ports tree? The problem is still present.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-01-26 14:32:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8a633e7f6cff0d786d477cb36fa93d307989c44d

commit 8a633e7f6cff0d786d477cb36fa93d307989c44d
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2022-01-26 14:28:33 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2022-01-26 14:28:33 +0000

    net/frr7: Fix build

    PR:             260430
    Reported by:    O. Hartmann <ohartmann@walstatt.org>
    Obtained from:  Franco Fichtner <franco@opnsense.org>

 net/frr7/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 Olivier Cochard freebsd_committer freebsd_triage 2022-01-26 14:32:56 UTC
Sorry for the delay and thanks for the report and the patch.