tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Latest AIX Status: bootstrap fails with gcc 13



On 1/15/26 2:04 PM, Roland Illig wrote:
Am 15.01.2026 um 17:47 schrieb Louis Guillaume:
Trying again to get pkgsrc going on AIX 7.2, pkgsrc-current.

===> running: (cd /opt/pkgsrc/pkgtools/libnbcompat &&
/opt/pkg/obj/bootstrap/bin/bmake  MAKE_JOBS=1 PKG_COMPRESSION=none
PKGSRC_KEEP_BIN_PKGS=no MAKECONF=/opt/pkg/obj/bootstrap/mk.conf install)
bmake: "/opt/pkgsrc/mk/compiler/gcc.mk" line 1055: Comparison with '>'
requires both operands 'gcc-13' and '2' to be numeric

I'd like to know where the string "gcc-13" comes from. At this point in
bootstrap, the pkgsrc infrastructure is already in place, so you can run
these commands:

$ cd /opt/pkgsrc/pkgtools/libnbcompat
$ /opt/pkg/obj/bootstrap/bin/bmake \
     MAKECONF=/opt/pkg/obj/bootstrap/mk.conf \
     show-all-gcc

This will print the value of lots of make(1) variables related to GCC.
Maybe you get a hint from their values, especially for
_GCC_VERSION_STRING, _GCC_VERSION, _GCC_PKG.

If you are still unsure, you can run make(1) with the options "-dcpv" to
trace the conditions, the parsing and the variables.

You can compare the runtime values with the code in
/opt/pkgsrc/mk/compiler/gcc.mk to track the values through the
variables, it's really just variable assignments and conditions all the
way down.

Roland


Running without the `-dcpv' shows the error straight away, before printing anything. But with the flags I think there are some clues.

Seems this pattern "gcc-([0-9]+\.[0-9]+).*" is not matched because "gcc-13" doesn't have a "." in it and the result keeps the whole value when filling out _GCC_PKG_MAJOR_MINOR.

Is this the problem?

  # /opt/freeware/bin/gcc -dumpversion
  13

... Here's NetBSD:

  # gcc -dumpversion
  10.5.0

... and MacOS...

  $ gcc -dumpversion
  17.0.0



--
Louis




# /opt/pkg/obj/bootstrap/bin/bmake -dcpv MAKECONF=/opt/pkg/obj/bootstrap/mk.conf show-all-gcc 2>&1| grep -n -12 gcc-13 28977-Parsing line 1054: _GCC_PKG_MAJOR_MINOR=${_GCC_PKG:C/gcc-([0-9]+\.[0-9]+).*/\1/} 28978-Global: _GCC_PKG_MAJOR_MINOR = ${_GCC_PKG:C/gcc-([0-9]+\.[0-9]+).*/\1/} 28979-Parsing line 1055: . if ${_GCC_PKG_MAJOR_MINOR:R} > ${_GCC_REQD:R} || (${_GCC_PKG_MAJOR_MINOR:R} == ${_GCC_REQD:R} && ${_GCC_PKG_MAJOR_MINOR:E} >= ${_GCC_REQD:E}) 28980-CondParser_Eval: ${_GCC_PKG_MAJOR_MINOR:R} > ${_GCC_REQD:R} || (${_GCC_PKG_MAJOR_MINOR:R} == ${_GCC_REQD:R} && ${_GCC_PKG_MAJOR_MINOR:E} >= ${_GCC_REQD:E}) 28981-Var_Parse: ${_GCC_PKG_MAJOR_MINOR:R} > ${_GCC_REQD:R} || (${_GCC_PKG_MAJOR_MINOR:R} == ${_GCC_REQD:R} && ${_GCC_PKG_MAJOR_MINOR:E} >= ${_GCC_REQD:E}) (eval-defined)
28982-Var_Parse: ${_GCC_PKG:C/gcc-([0-9]+\.[0-9]+).*/\1/} (eval-defined)
28983-Var_Parse: ${_GCC_VERSION:C/-.*$//} (eval-defined)
28984-Evaluating modifier ${_GCC_VERSION:C...} on value "13"
28985-Modifier part: "-.*$"
28986-Modifier part: ""
28987-ModifyWords: split "13" into 1 word
28988-Result of ${_GCC_VERSION:C/-.*$//} is "13"
28989:Evaluating modifier ${_GCC_PKG:C...} on value "gcc-13"
28990-Modifier part: "gcc-([0-9]+\.[0-9]+).*"
28991-Modifier part: "\1"
28992:ModifyWords: split "gcc-13" into 1 word
28993:Result of ${_GCC_PKG:C/gcc-([0-9]+\.[0-9]+).*/\1/} is "gcc-13"
28994:Evaluating modifier ${_GCC_PKG_MAJOR_MINOR:R} on value "gcc-13"
28995:ModifyWords: split "gcc-13" into 1 word
28996:Result of ${_GCC_PKG_MAJOR_MINOR:R} is "gcc-13"
28997-Var_Parse: ${_GCC_REQD:R} || (${_GCC_PKG_MAJOR_MINOR:R} == ${_GCC_REQD:R} && ${_GCC_PKG_MAJOR_MINOR:E} >= ${_GCC_REQD:E}) (eval-defined)
28998-Var_Parse: ${_GCC_STRICTEST_REQD} (eval-defined)
28999-Evaluating modifier ${_GCC_REQD:R} on value "2.8"
29000-ModifyWords: split "2.8" into 1 word
29001-Result of ${_GCC_REQD:R} is "2"
29002:bmake: "/opt/pkgsrc/mk/compiler/gcc.mk" line 1055: Comparison with '>' requires both operands 'gcc-13' and '2' to be numeric 29003- in .for loop from /opt/pkgsrc/mk/compiler.mk:221 with _compiler_ = gcc
29004-  in /opt/pkgsrc/mk/bsd.pkg.mk:448
29005-  in /opt/pkgsrc/pkgtools/libnbcompat/Makefile:31
29006-Parsing line 1060: .  endif
29007-Parsing line 1061: .endif
29008-Parsing line 1066: .if !defined(_NEED_NEWER_GCC)
29009-CondParser_Eval: !defined(_NEED_NEWER_GCC)
29010-Parsing line 1067: _GCC_DIST_MAJOR_MINOR=${_GCC_DIST_VERSION:C/([0-9]+\.[0-9]+).*/\1/} 29011-Global: _GCC_DIST_MAJOR_MINOR = ${_GCC_DIST_VERSION:C/([0-9]+\.[0-9]+).*/\1/} 29012-Parsing line 1068: . if ${_GCC_DIST_MAJOR_MINOR:R} > ${_GCC_REQD:R} || (${_GCC_DIST_MAJOR_MINOR:R} == ${_GCC_REQD:R} && ${_GCC_DIST_MAJOR_MINOR:E} >= ${_GCC_REQD:E}) 29013-CondParser_Eval: ${_GCC_DIST_MAJOR_MINOR:R} > ${_GCC_REQD:R} || (${_GCC_DIST_MAJOR_MINOR:R} == ${_GCC_REQD:R} && ${_GCC_DIST_MAJOR_MINOR:E} >= ${_GCC_REQD:E}) 29014-Var_Parse: ${_GCC_DIST_MAJOR_MINOR:R} > ${_GCC_REQD:R} || (${_GCC_DIST_MAJOR_MINOR:R} == ${_GCC_REQD:R} && ${_GCC_DIST_MAJOR_MINOR:E} >= ${_GCC_REQD:E}) (eval-defined)



Home | Main Index | Thread Index | Old Index