Skip to content

attempt fixing static build on osx #33

attempt fixing static build on osx

attempt fixing static build on osx #33

Workflow file for this run

name: mh CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install deps
run: sudo make deb-install-deps
- name: make mh
run: make mh
- name: build static binary
run: make mh-static OPTS=-lpthread
- name: test
run: make test
- name: build deb package
run: |
make deb-export-archive
make deb-build
build-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Check for Homebrew
run: |
if test ! $(which brew); then
echo "Homebrew not found"
exit 1
fi
- name: update brew
run: brew update
- name: install libs
run: brew install pcre2 cmocka
- name: Install dependencies
run: |
brew install llvm
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> $GITHUB_ENV
echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> $GITHUB_ENV
echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> $GITHUB_ENV
- name: build
run: |
#clang -o mh -D VERSION=\"aa30377\" queue.c mh.c main.c -Wall $(pkg-config --cflags --libs libpcre2-8)
#make mh CC=clang LIBS="$(pkg-config --cflags --libs libpcre2-8) -lpthread"
#make mh-static CC=clang LIBS="$(pkg-config --cflags --libs libpcre2-8) -lpthread"
clang -o mh-darwin-arm64 -D VERSION=\"f0eb363\" queue.c mh.c main.c -Wall -I/opt/homebrew/Cellar/pcre2/10.44/include -L/opt/homebrew/Cellar/pcre2/10.44/lib -Wl,-Bstatic -lpcre2-8 -Wl,-Bdynamic -lpthread -D COLOROUTPUT