Bug 269134 - devel/ninja Error in Argument when doing make on 1.11.1,2
Summary: devel/ninja Error in Argument when doing make on 1.11.1,2
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-24 20:33 UTC by Weldon Godfrey
Modified: 2023-05-02 20:49 UTC (History)
3 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Weldon Godfrey 2023-01-24 20:33:19 UTC
I cannot compile 1.11.1,2 on FreeBSD 12.3-RELEASEp10 r372803

even after a "make clean" in the port.


Response from compile attempt:

root@senna:/usr/ports/devel/ninja # make clean
===>  Cleaning for ninja-1.11.1,2
root@senna:/usr/ports/devel/ninja # make
===>  License APACHE20 accepted by the user
===>   ninja-1.11.1,2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by ninja-1.11.1,2 for building
===>  Extracting for ninja-1.11.1,2
=> SHA256 Checksum OK for ninja-build-ninja-v1.11.1_GH0.tar.gz.
===>  Patching for ninja-1.11.1,2
===>   ninja-1.11.1,2 depends on file: /usr/local/bin/python3.9 - found
===>  Configuring for ninja-1.11.1,2
===>  Building for ninja-1.11.1,2
bootstrapping ninja...
Error in argument 4, char 1: no argument for option -
usage: re2c [-bcdDefFghirsuvVwx18] [-o of] [-t th] file

-? -h  --help           Display this info.

-b     --bit-vectors    Implies -s. Use bit vectors as well in the attempt to
                        coax better code out of the compiler. Most useful for
                        specifications with more than a few keywords (e.g. for
                        most programming languages).

-c     --conditions     Require start conditions.

-d     --debug-output   Creates a parser that dumps information during
                        about the current position and in which state the
                        parser is.

-D     --emit-dot       Emit a Graphviz dot view of the DFA graph

-e     --ecb            Generate a parser that supports EBCDIC. The generated code
                        can deal with any character up to 0xFF. In this mode re2c
                        assumes that input character size is 1 byte. This switch is
                        incompatible with -w, -u, -x and -8

-f     --storable-state Generate a scanner that supports storable states.

-F     --flex-syntax    Partial support for flex syntax.

-g     --computed-gotos Implies -b. Generate computed goto code (only useable
                        with gcc).

-i     --no-debug-info  Do not generate '#line' info (usefull for versioning).

-o of  --output=of      Specify the output file (of) instead of stdout

-r     --reusable       Allow reuse of scanner definitions.

-s     --nested-ifs     Generate nested ifs for some switches. Many compilers
                        need this assist to generate better code.

-t th  --type-header=th Generate a type header file (th) with type definitions.

-u     --unicode        Generate a parser that supports UTF-32. The generated code
                        can deal with any valid Unicode character up to 0x10FFFF.
                        In this mode re2c assumes that input character size is 4 bytes.
                        This switch is incompatible with -e, -w, -x and -8. It implies -s.

-v     --version        Show version information.

-V     --vernum         Show version as one number.

-w     --wide-chars     Generate a parser that supports UCS-2. The generated code can
                        deal with any valid Unicode character up to 0xFFFF. In this mode
                        re2c assumes that input character size is 2 bytes. This switch is
                        incompatible with -e, -x, -u and -8. It implies -s.
-x     --utf-16         Generate a parser that supports UTF-16. The generated code can
                        deal with any valid Unicode character up to 0x10FFFF. In this mode
                        re2c assumes that input character size is 2 bytes. This switch is
                        incompatible with -e, -w, -u and -8. It implies -s.
-8     --utf-8          Generate a parser that supports UTF-8. The generated code can
                        deal with any valid Unicode character up to 0x10FFFF. In this mode
                        re2c assumes that input character size is 1 byte. This switch is
                        incompatible with -e, -w, -x and -u.
-1     --single-pass    Force single pass generation, this cannot be combined
                        with -f and disables YYMAXFILL generation prior to last
                        re2c block.

--no-generation-date    Suppress date output in the generated output so that it
                        only shows the re2c version.

--case-insensitive      All strings are case insensitive, so all "-expressions
                        are treated in the same way '-expressions are.

--case-inverted         Invert the meaning of single and double quoted strings.
                        With this switch single quotes are case sensitive and
                        double quotes are case insensitive.

--encoding-policy ep    Specify what re2c should do when given bad code unit.
                        ep can be one of the following: fail, substitute, ignore.

--input i               Specify re2c input API.
                        i can be one of the following: default, custom.
when running:  re2c -b -i --no-generation-date --no-version -o ./src/depfile_parser.cc ./src/depfile_parser.in.cc
Traceback (most recent call last):
  File "/usr/ports/devel/ninja/work/ninja-1.11.1/configure.py", line 485, in <module>
    n.build(src('depfile_parser.cc'), 're2c', src('depfile_parser.in.cc'))
  File "/usr/ports/devel/ninja/work/ninja-1.11.1/configure.py", line 169, in build
    self._run_command(self._expand(cmd, local_vars))
  File "/usr/ports/devel/ninja/work/ninja-1.11.1/configure.py", line 194, in _run_command
    subprocess.check_call(cmdline, shell=True)
  File "/usr/local/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 're2c -b -i --no-generation-date --no-version -o ./src/depfile_parser.cc ./src/depfile_parser.in.cc' returned non-zero exit status 2.
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/ninja
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2023-01-25 05:24:34 UTC
Moin moi

Looks like you have devel/re2c installed, which it is picking up during the build and failing to call properly. What version of re2c do you have?

mfg Tobias
Comment 2 PeterH 2023-01-26 12:37:30 UTC
Had same problem on FreeBSD 12.4.

Removing old re2c (v1.something) and installing re2c-2.2 solved problem.
Comment 3 Weldon Godfrey 2023-01-26 22:56:57 UTC
Thanks, that was it.   Upgrading re2c fixed the issue.   For some reason re2c isnt being picked up in the dependencies for ninja so portmaster wasnt addressing it.

Thanks,

Weldon
Comment 4 dewayne 2023-05-02 20:25:38 UTC
(In reply to PeterH from comment #2)
Thank-you, I'm also on 12.4S. Resolved by adding to lang/python39/Makefile with
BUILD_DEPENDS=  re2c:devel/re2c
Perhaps a suggestion for the maintainer...?
Comment 5 dewayne 2023-05-02 20:49:17 UTC
(In reply to dewayne from comment #4)
oops of course I meant devel/ninja/Makefile. I was modifying python for lto at time of replying.