Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 894076 - net-misc/frr-8.4.2 - emake failed
Summary: net-misc/frr-8.4.2 - emake failed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alarig Le Lay
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-12 19:06 UTC by Toralf Förster
Modified: 2024-10-04 08:13 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,18.83 KB, text/plain)
2023-02-12 19:06 UTC, Toralf Förster
Details
emerge-history.txt.bz2 (emerge-history.txt.bz2,55.70 KB, application/x-bzip)
2023-02-12 19:06 UTC, Toralf Förster
Details
environment (environment,138.44 KB, text/plain)
2023-02-12 19:06 UTC, Toralf Förster
Details
etc.clang.tar.bz2 (etc.clang.tar.bz2,689 bytes, application/x-bzip)
2023-02-12 19:06 UTC, Toralf Förster
Details
etc.portage.tar.bz2 (etc.portage.tar.bz2,31.34 KB, application/x-bzip)
2023-02-12 19:06 UTC, Toralf Förster
Details
logs.tar.bz2 (logs.tar.bz2,23.06 KB, application/x-bzip)
2023-02-12 19:06 UTC, Toralf Förster
Details
net-misc:frr-8.4.2:20230212-181654.log (net-misc:frr-8.4.2:20230212-181654.log,23.78 KB, text/plain)
2023-02-12 19:06 UTC, Toralf Förster
Details
temp.tar.bz2 (temp.tar.bz2,39.28 KB, application/x-bzip)
2023-02-12 19:06 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-02-12 19:06:38 UTC
make[1]: *** [Makefile:17685: lib/command_lex.c] Error 1
make[1]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc/frr/\" -DCONFDATE=0 -I. -I./lib/assert -I. -I./include -I./lib -I. -fms-extensions -fno-omit-frame-pointer -funwind-tables -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wundef -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -pipe -march=native -fno-diagnostics-color -O2 -c lib/command_match.c  -fPIC -DPIC -o lib/.libs/command_match.o
make[1]: Leaving directory '/var/tmp/portage/net-misc/frr-8.4.2/work/frr-frr-8.4.2'
make: *** [Makefile:6380: all] Error 2
 * ERROR: net-misc/frr-8.4.2::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-misc/frr-8.4.2::gentoo'`,

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd-j4-20230210-100021

  -------------------------------------------------------------------

GNUMAKEFLAGS="$GNUMAKEFLAGS --jobserver-style=pipe"
gcc-config -l:
 [1] x86_64-pc-linux-gnu-12 *
clang/llvm (if any):
clang version 15.0.7
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/15/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/15
15.0.7
Python 3.10.10
Available Ruby profiles:
  [1]   ruby27 (with Rubygems)
  [2]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.67.1 *
The following VMs are available for generation-2:
*)	Eclipse Temurin JDK 17.0.6_p10 [openjdk-bin-17]
2)	Eclipse Temurin JDK 8.362_p09 [openjdk-bin-8]
3)	Eclipse Temurin JRE 17.0.6_p10 [openjdk-jre-bin-17]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-17  system-vm
  [3]   openjdk-jre-bin-17 

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):

  HEAD of ::gentoo
commit b68688bd34489e80f8516b16317f3c0db39fdfd4
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Feb 12 16:16:57 2023 +0000

    2023-02-12 16:16:56 UTC

emerge -qpvO net-misc/frr
[ebuild  N    ] net-misc/frr-8.4.2  USE="ipv6 pam -doc -fpm -grpc -nhrp -ospfapi -rpki -snmp -test" PYTHON_SINGLE_TARGET="python3_10 -python3_9 -python3_11"
Comment 1 Toralf Förster gentoo-dev 2023-02-12 19:06:39 UTC
Created attachment 850540 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-02-12 19:06:40 UTC
Created attachment 850542 [details]
emerge-history.txt.bz2
Comment 3 Toralf Förster gentoo-dev 2023-02-12 19:06:42 UTC
Created attachment 850544 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-02-12 19:06:43 UTC
Created attachment 850546 [details]
etc.clang.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2023-02-12 19:06:44 UTC
Created attachment 850548 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2023-02-12 19:06:45 UTC
Created attachment 850550 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2023-02-12 19:06:46 UTC
Created attachment 850552 [details]
net-misc:frr-8.4.2:20230212-181654.log
Comment 8 Toralf Förster gentoo-dev 2023-02-12 19:06:47 UTC
Created attachment 850554 [details]
temp.tar.bz2
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-07-08 02:31:17 UTC
Hm needs flex..?

make[1]: Entering directory '/var/tmp/portage/net-misc/frr-8.4.2/work/frr-frr-8.4.2'
reflex   lib/command_lex.l
bison -y -d -Dapi.prefix={cmd_yy} -Dparse.error=verbose -Wno-yacc  lib/command_parse.y
"lib/command_lex.l", line 25: unrecognized '%' directive
"lib/command_lex.l", line 26: bad character: #
"lib/command_lex.l", line 26: unknown error processing section 1
"lib/command_lex.l", line 26: unknown error processing section 1
"lib/command_lex.l", line 26: unknown error processing section 1
"lib/command_lex.l", line 27: bad character: #
"lib/command_lex.l", line 27: unknown error processing section 1
"lib/command_lex.l", line 27: bad character: "
"lib/command_lex.l", line 27: unknown error processing section 1
"lib/command_lex.l", line 27: bad character: .
"lib/command_lex.l", line 27: unknown error processing section 1
"lib/command_lex.l", line 27: bad character: "
"lib/command_lex.l", line 28: bad character: #
"lib/command_lex.l", line 28: unknown error processing section 1
"lib/command_lex.l", line 29: bad character: }
"lib/command_lex.l", line 64: unrecognized %option: header-file
"lib/command_lex.l", line 66: unrecognized %option: reentrant
"lib/command_lex.l", line 67: unrecognized %option: bison-bridge
"lib/command_lex.l", line 68: unrecognized %option: bison-locations
Comment 10 Alarig Le Lay 2023-07-14 14:25:55 UTC
sys-devel/flex is listed in BDEPEND but I don’t see it in emerge-history.txt, that’s quite weird
Comment 11 Toralf Förster gentoo-dev 2023-07-14 16:07:13 UTC
from the log:


checking for flex... reflex
checking for lex output file root... lex.yy
checking for lex library... none needed
checking whether yytext is a pointer... yes
checking version of flex... (20230206)
Comment 12 Alarig Le Lay 2023-07-15 16:42:44 UTC
I set an empty LXC up to test the build with reflex, so I installed it:
frr ~ # eix sys-devel/*flex
[I] sys-devel/flex
     Available versions:  2.6.4-r5^t 2.6.4-r6^t {nls static test ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  2.6.4-r6^t(12:04:34 07/15/23)(nls -static -test ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
     Homepage:            https://github.com/westes/flex
     Description:         The Fast Lexical Analyzer

[I] sys-devel/reflex
     Available versions:  20221012 20230206 20230521 ~20230523 {verify-sig}
     Installed versions:  20230521(18:03:12 07/15/23)(-verify-sig)
     Homepage:            https://invisible-island.net/reflex/
     Description:         This is a variant of the flex fast lexical scanner

Found 2 matches

But I can’t remove flex, because packages are depending on it:
frr ~ # emerge -vac sys-devel/flex
setlocale: unsupported locale setting
setlocale: unsupported locale setting

Calculating dependencies... done!
  sys-devel/flex-2.6.4-r6 pulled in by:
    dev-libs/elfutils-0.188 requires >=sys-devel/flex-2.5.4a
    dev-util/clippy-8.4.2 requires sys-devel/flex
    sys-apps/iproute2-6.3.0 requires sys-devel/flex
    sys-devel/bc-1.07.1-r6 requires sys-devel/flex
    sys-devel/binutils-2.40-r5 requires sys-devel/flex
    sys-devel/bison-3.8.2-r2 requires sys-devel/flex
    sys-devel/gcc-12.3.1_p20230526 requires >=sys-devel/flex-2.5.4
    sys-libs/pam-1.5.3 requires sys-devel/flex

>>> No packages selected for removal by depclean
frr ~ #

But the configure script still uses flex instead of reflex:
samis ~ # grep lex /var/lib/lxc/frr/rootfs/var/tmp/portage/net-misc/frr-8.4.2/temp/build.log
checking for flex... flex
checking for lex output file root... lex.yy
checking for lex library... none needed
checking version of flex... 2.6.4

So, I’m wondering why the flex package isn’t installed in your case, and if I should depend on app-alternatives/lex[flex] rather than on sys-devel/flex directly.
Comment 13 Alarig Le Lay 2024-10-02 14:49:06 UTC
8.5 isn’t in the tree anymore, to maybe we can close this one?
Comment 14 Jaco Kroon 2024-10-03 07:39:19 UTC
I don't think this is solved.  Looking at ./configure it determines the lex to invoke from the LEX variable, which if set to reflex will fail.  So not only do we need to depend on flex (>=2.5.20) specifically, we also need to export LEX=flex.

Current dep is on app-alternatives/lex.

Even on current master from git LEX=reflex ./configure && make results in failure.  LEX=flex ./configure && make works.

Patching ebuilds accordingly.
Comment 15 Larry the Git Cow gentoo-dev 2024-10-04 08:13:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7800989084810e6f4f07971406c29c99f2852832

commit 7800989084810e6f4f07971406c29c99f2852832
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2024-10-02 10:31:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-10-04 08:11:48 +0000

    net-misc/frr: add 9.1.2 (security)
    
    CVE-2024-31950
    CVE-2024-31951
    CVE-2024-31949
    CVE-2024-44070
    
    Closes: https://bugs.gentoo.org/907879
    Closes: https://bugs.gentoo.org/872323
    Closes: https://bugs.gentoo.org/894076
    Bug: https://bugs.gentoo.org/940744
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Reviewed-by: Alarig Le Lay <alarig@swordarmor.fr>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/frr/Manifest         |   1 +
 net-misc/frr/frr-9.1.2.ebuild | 147 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 148 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36fd816e93e82764783b0f1d7d74f252c5e77863

commit 36fd816e93e82764783b0f1d7d74f252c5e77863
Author:     Jaco Kroon <jaco@uls.co.za>
AuthorDate: 2024-10-02 10:24:14 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-10-04 08:11:47 +0000

    net-misc/frr: add 9.0.4 (CVE-2024-31950, CVE-2024-31951, CVE-2024-44070)
    
    Bug: https://bugs.gentoo.org/907879
    Bug: https://bugs.gentoo.org/872323
    Bug: https://bugs.gentoo.org/894076
    Bug: https://bugs.gentoo.org/940744
    Signed-off-by: Jaco Kroon <jaco@uls.co.za>
    Reviewed-by: Alarig Le Lay <alarig@swordarmor.fr>
    Signed-off-by: Sam James <sam@gentoo.org>

 net-misc/frr/Manifest         |   1 +
 net-misc/frr/frr-9.0.4.ebuild | 156 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 157 insertions(+)