sed: invalid option -- 'E'
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 258
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
On Sailfish SDK, I get an invalid usage error for sed (GNU sed version 4.1.5) when trying to build mapbox-gl-native.
Based on http://blog.dmitryleskov.com/small-hacks/mysterious-gnu-sed-option-e/ it looks like -r is equivalent to -E
Possible fix for /mapbox/mason/mason.sh:
if test | sed -E 's///g' 2>/dev/null; then
SED_REGEX_ARG="E"
else
SED_REGEX_ARG="r"
fi
...
MASON_CONFIG_INCLUDE_DIRS=$(echo -n "${MASON_CONFIG_CFLAGS}" | sed -$SED_REGEX_ARG -n 's/^-(I|isystem) *([^ ]+)/\2/p' | uniq)
MASON_CONFIG_DEFINITIONS=$(echo -n "${MASON_CONFIG_CFLAGS}" | sed -$SED_REGEX_ARG -n 's/^-(D) *([^ ]+)/\2/p')
MASON_CONFIG_OPTIONS=$(echo -n "${MASON_CONFIG_CFLAGS}" | sed -$SED_REGEX_ARG -n '/^-(D|I|isystem) *([^ ]+)/!p')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in /mapbox/mason/mason.sh and reproduce the sed -E check on the Sailfish SDK, comparing it with sed -r. Trace the three MASON_CONFIG parsing commands, then verify that the build succeeds and the include directories, definitions, and options are still extracted correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100