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

optipng won't compile on mac silicon #5581

Merged
merged 1 commit into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
optipng won't compile on mac silicon
- create a Make option 'init-mac' to account for it
- allow run-boostrap.sh to process the new --optipng-fix flag

Open to better ideas (yes, move to linux is valid)
- Determining if you are on Apple silicon from
  run-bootstrap directly appeared to be problematic
  since it is running in a container
- Doing it prior in the make call seemed to make sense
  - change nothing for exisitng processes but add a
    simpler way forward for Mac folk
  • Loading branch information
smithellis committed Jul 16, 2023
commit 0e563da37a239fd1372b2ec4f91624527e5e83e8
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ run: .docker-build
init: .docker-build
${DC} run web bin/run-bootstrap.sh

init-mac: .docker-build
${DC} run web bin/run-bootstrap.sh --optipng-fix

shell: .docker-build
${DC} run web bash

Expand Down
6 changes: 6 additions & 0 deletions bin/run-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ set -ex
# Install and setup localization
./scripts/l10n-fetch-lint-compile.sh

# If flag --optipng-fix is passed
if [[ $* == *--optipng-fix* ]]; then
# Install fix for optipng on mac silicon
export CPPFLAGS=-DPNG_ARM_NEON_OPT=0
fi

# Collect the JavaScript catalog files.
python manage.py compilejsi18n

Expand Down
12 changes: 12 additions & 0 deletions docs/hacking_howto.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ and follow the following steps.
make .env
```
3. Pull base Kitsune Docker images, install node packages and build the Webpack bundle, and create your database.
On non-Apple silicon:

```
make init
```

On Apple silicon (M1, M2):

```
make init-mac
```

Then:

```
make build
```

Expand Down