camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

fix make generate-crd error

Open SubhasmitaSw opened this issue 2 years ago • 9 comments

kind/bug fixes #3453

Release Note

NONE

SubhasmitaSw avatar Jul 15 '22 15:07 SubhasmitaSw

As this seems to be related to BSD/macOS sed and Camel K has stopped to support this please consider installing gnu-sed on your machine (see also #3372 and #3398).

christophd avatar Jul 15 '22 17:07 christophd

@christophd @tadayosi I already have gnu-sed installed in my system still there was this error and it got resolved if I changed to this

When I run brew install gnu-sed shows: Warning: gnu-sed 4.8 is already installed and up-to-date.

SubhasmitaSw avatar Jul 16 '22 07:07 SubhasmitaSw

@SubhasmitaSw What's the output of the following command?

$ sed --version

tadayosi avatar Jul 16 '22 08:07 tadayosi

@tadayosi sed --version gives:

sed: illegal option -- -
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]

strings $(which sed) gives:

@(#)PROGRAM:sed  PROJECT:text_cmds-138.100.3
33333Ca@
$FreeBSD$
$FreeBSD$
$FreeBSD$
$FreeBSD$
malloc
%lu: %s: unexpected EOF (pending }'s)
0123456789/\$
%lu: %s: command expected
%lu: %s: invalid command code %c
%lu: %s: command %c expects up to %d address(es), found %d
%lu: %s: unexpected }
%lu: %s: extra characters at the end of %c command
%lu: %s: command %c expects \ followed by text
%lu: %s: extra characters after \ at the end of %c command
%lu: %s: filename expected
w command
read command
branch
label
%lu: %s: empty label
%lu: %s: substitute pattern can not be delimited by newline or backslash
%lu: %s: unterminated substitute pattern
%lu: %s: extra text at the end of a transform command
%lu: %s: unterminated regular expression
%lu: %s: expected context address
realloc
%lu: %s: whitespace after %s
%lu: %s: duplicate label '%s'
%lu: %s: \ can not be used as a string delimiter
%lu: %s: newline can not be used as a string delimiter
%lu: %s: unbalanced brackets ([])
%lu: %s: RE error: %s
%lu: %s: \%c not defined in the RE
%lu: %s: unescaped newline inside substitute pattern
%lu: %s: unterminated substitute in regular expression
%lu: %s: more than one number or 'g' in substitute flags
%lu: %s: overflow in the 'N' substitute flag
wfile too long
%lu: %s: no wfile specified
%lu: %s: bad flag in substitute command: '%c'
%lu: %s: transform pattern can not be delimited by newline or backslash
%lu: %s: unterminated transform source string
%lu: %s: unterminated transform target string
%lu: %s: transform strings are not the same length
%lu: %s: undefined label '%s'
%lu: %s: unused label '%s'
EI:ae:f:i:lnru
setting line buffered output failed
setting unbuffered output failed
stdout
stdin
"%s"
 ..."
-I or -i may not be used with stdin
rename()
fclose()
%s: %s %s
in-place editing only
works for regular files
%s: name too long
strdup
%s/.!%ld!%s
usage: %s script [-Ealnru] [-i extension] [file ...]
%s [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]
first RE may not be empty
RE error: %s
%lu: %s: \%u not defined in the RE
%s: %s
COLUMNS
\abfrtv
\%03o

SubhasmitaSw avatar Jul 16 '22 17:07 SubhasmitaSw

@SubhasmitaSw That means you are still using the builtin BSD sed. Make sure to run:

export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

and put the same line to your .bashrc or .bash_profile.

tadayosi avatar Jul 17 '22 00:07 tadayosi

@SubhasmitaSw That means you are still using the builtin BSD sed. Make sure to run:

export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

and put the same line to your .bashrc or .bash_profile.

I've tried all of this, I'm not able to counter the problem.

SubhasmitaSw avatar Jul 17 '22 06:07 SubhasmitaSw

@SubhasmitaSw What's the output of the command now?

type -a sed

Also does sed --version output sed (GNU sed) x.x now?

tadayosi avatar Jul 17 '22 08:07 tadayosi

@tadayosi Output of type -a sed

sed is /usr/bin/sed

Output of sed --version

sed: illegal option -- -
usage: sed script [-Ealnru] [-i extension] [file ...]
	sed [-Ealnu] [-i extension] [-e script] ... [-f script_file] ... [file ...]

SubhasmitaSw avatar Jul 18 '22 08:07 SubhasmitaSw

@SubhasmitaSw Then you are still using BSD sed. Please use GNU sed.

tadayosi avatar Jul 18 '22 10:07 tadayosi

Assuming it's already answered, let's go ahead and close it. Please feel free to ask me if the issue is not yet resolved.

tadayosi avatar Aug 23 '22 03:08 tadayosi