Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fgrep includes color codes in SDL test files #20

Open
ron-wolf opened this issue Aug 28, 2021 · 2 comments
Open

fgrep includes color codes in SDL test files #20

ron-wolf opened this issue Aug 28, 2021 · 2 comments

Comments

@ron-wolf
Copy link

While building Revery on macOS 10.14.6 (Mojave), esy install worked just fine, but I encountered this error (text file) while running esy build. Here is how the end of console output appeared on my screen in Terminal.app:

Click to reveal tall image

Revery Esy SDL2 build error

I tracked the issue down to the following line introduced to the Makefile in 5e162af, where fgrep is run but for some reason emits color codes on my machine:

SDLTEST_HDRS = $(shell ls $(srcdir)/include | fgrep SDL_test)

Here is my default env before any configuration files are loaded:

PWD=/Users/Ron
USER=Ron
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin
XPC_SERVICE_NAME=0
SHLVL=1
SHELL=/usr/local/bin/fish
LOGNAME=Ron
LANG=en_US.UTF-8
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.jFpzme7FdN/Render
TERM_PROGRAM_VERSION=421.2
XPC_FLAGS=0x0
TMPDIR=/var/folders/0v/2rwjmph559v3fv40z4hqt8t40000gn/T/
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.83t7OYqZP9/Listeners
TERM=xterm-256color
TERM_SESSION_ID=4360C789-F456-4851-BE92-38E90324E377
HOME=/Users/Ron
TERM_PROGRAM=Apple_Terminal

And here are the contents of my direnv envrc:

#!/bin/sh

# C environ
export EDITOR=micro

# essential command-line utilities
export SSH_ASKPASS=/usr/local/bin/ssh-askpass
export SUDO_ASKPASS="$SSH_ASKPASS"
# export LESS=-r

# local binary executable files
PATH_add ~/.local/bin

# X Developer Group directory specification
export XDG_DATA_HOME=~/.local/etc # ~/Library/'Application Support'/XDG
export XDG_DATA_DIRS=~/.local/share:/usr/local/share:/usr/share
export XDG_CONFIG_HOME=~/.config
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_CACHE_HOME=~/.cache # ~/Library/Caches/XDG
export XDG_RUNTIME_DIR="$TMPDIR"

# enable coloring in ls
# export CLICOLOR=

# toolchain-specific software
export GEM_PATH=~/.local/etc/gem
export STACK_ROOT=~/.local/stack
export JULIA_DEPOT_PATH=~/.local/etc/julia
export GNUPGHOME=~/.local/etc/gpg
export PYENV_ROOT=~/.local/opt/pyenv
export PYENV_SHELL="$SHELL"
export DEVELOPER_DIR=/Library/Developer/CommandLineTools
export WINEPREFIX=~/.local/etc/wine
# export LUA_PATH='/usr/local/Cellar/luarocks/3.7.0/share/lua/5.4/?.lua'
# export LUA_CPATH='/usr/local/lib/lua/5.4/?.so'
export GOPATH=~/.local/etc/go
export GOTOOLDIR=~/.local/go/pkg/tool/darwin_amd64 # is this necessary?
export ESY__PREFIX=~/.local/esy

# add toolchain paths to PATH
PATH_add "$PYENV_ROOT"/{bin,shims}
PATH_add "$GOPATH"/bin

# instruct Homebrew to install apps as user-local
export HOMEBREW_CASK_OPTS="--appdir=$HOME/Applications"

export DYLD_FALLBACK_LIBRARY_PATH=~/.local/lib:/usr/local/lib:/usr/lib

That should account for pretty much everything that would affect the behavior of fgrep within a subprocess or subshell.

@ron-wolf
Copy link
Author

Any guidance on how to test this would also be helpful. I tried the obvious solution of changing the Makefile in-place, but the Esy build system (which I’m unfamiliar with) keeps overwriting it. Would I have to create a fork/branch and use that as a temporary replacement dependency? @bryphe

@ron-wolf
Copy link
Author

ron-wolf commented Nov 5, 2021

If anyone else comes upon this issue, the status is best explained here: onivim/oni2#3811 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant