You are not logged in.

#1 2023-04-06 03:43:49

curlywei
Member
Registered: 2022-05-30
Posts: 10

[SOLVED] makepkg: invalid option -- '2' invalid option -- '4'

I run makepkg in my local package folder(retrieved from AUR).

I get these error messages:

> $ makepkg                                                                   
==> Making package: yay 12.0.3-1 (Thu 06 Apr 2023 11:34:35 AM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found yay-12.0.3.tar.gz
==> Validating source files with sha256sums...
    yay-12.0.3.tar.gz ... Passed
==> Extracting sources...
  -> Extracting yay-12.0.3.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
: invalid option -- '2'
: invalid option -- '4'
Usage: make [options] [target] ...
Options:
  -b, -m                      Ignored for compatibility.
  -B, --always-make           Unconditionally make all targets.
  -C DIRECTORY, --directory=DIRECTORY
                              Change to DIRECTORY before doing anything.
  -d                          Print lots of debugging information.
  --debug[=FLAGS]             Print various types of debugging information.
  -e, --environment-overrides
                              Environment variables override makefiles.
  -E STRING, --eval=STRING    Evaluate STRING as a makefile statement.
  -f FILE, --file=FILE, --makefile=FILE
                              Read FILE as a makefile.
  -h, --help                  Print this message and exit.
  -i, --ignore-errors         Ignore errors from recipes.
  -I DIRECTORY, --include-dir=DIRECTORY
                              Search DIRECTORY for included makefiles.
  -j [N], --jobs[=N]          Allow N jobs at once; infinite jobs with no arg.
  --jobserver-style=STYLE     Select the style of jobserver to use.
  -k, --keep-going            Keep going when some targets can't be made.
  -l [N], --load-average[=N], --max-load[=N]
                              Don't start multiple jobs unless load is below N.
  -L, --check-symlink-times   Use the latest mtime between symlinks and target.
  -n, --just-print, --dry-run, --recon
                              Don't actually run any recipe; just print them.
  -o FILE, --old-file=FILE, --assume-old=FILE
                              Consider FILE to be very old and don't remake it.
  -O[TYPE], --output-sync[=TYPE]
                              Synchronize output of parallel jobs by TYPE.
  -p, --print-data-base       Print make's internal database.
  -q, --question              Run no recipe; exit status says if up to date.
  -r, --no-builtin-rules      Disable the built-in implicit rules.
  -R, --no-builtin-variables  Disable the built-in variable settings.
  --shuffle[={SEED|random|reverse|none}]
                              Perform shuffle of prerequisites and goals.
  -s, --silent, --quiet       Don't echo recipes.
  --no-silent                 Echo recipes (disable --silent mode).
  -S, --no-keep-going, --stop
                              Turns off -k.
  -t, --touch                 Touch targets instead of remaking them.
  --trace                     Print tracing information.
  -v, --version               Print the version number of make and exit.
  -w, --print-directory       Print the current directory.
  --no-print-directory        Turn off -w, even if it was turned on implicitly.
  -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
                              Consider FILE to be infinitely new.
  --warn-undefined-variables  Warn when an undefined variable is referenced.

This program built for x86_64-pc-linux-gnu
Report bugs to <bug-make@gnu.org>
==> ERROR: A failure occurred in build().
    Aborting...


There
: invalid option -- '2'
: invalid option -- '4'

Why are "2" and "4" added to my command arguments?

Last edited by curlywei (2023-04-06 07:27:09)

Offline

#2 2023-04-06 03:57:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,778

Re: [SOLVED] makepkg: invalid option -- '2' invalid option -- '4'

Check your makepkg.conf, I'm guessing the MAKEFLAGS are wrong.

Offline

#3 2023-04-06 07:04:39

curlywei
Member
Registered: 2022-05-30
Posts: 10

Re: [SOLVED] makepkg: invalid option -- '2' invalid option -- '4'

Scimmia wrote:

Check your makepkg.conf, I'm guessing the MAKEFLAGS are wrong.

Thank your reply.

my MAKEFLAGS in /etc/makepkg.conf is:

MAKEFLAGS="$(nproc)"

It seems a little strange.

How do I reset or reinstall for default makepkg?

Offline

#4 2023-04-06 07:13:56

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,557

Re: [SOLVED] makepkg: invalid option -- '2' invalid option -- '4'

Looks like its missing a "-j"

Offline

#5 2023-04-06 07:26:11

curlywei
Member
Registered: 2022-05-30
Posts: 10

Re: [SOLVED] makepkg: invalid option -- '2' invalid option -- '4'

skunktrader wrote:

Looks like its missing a "-j"


Many thanks your.

I solved this problem after I modify it.

But there is a very strange place, I don't know which program modified it after upgrading with yay.

Offline

Board footer

Powered by FluxBB