Skip to content

Commit

Permalink
libs: fix use of (auto)conf with different sysroots
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Feb 19, 2024
1 parent 022ab93 commit eaaf4d5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:
- name: "Prune docker"
run: docker system prune -f --all
- name: "Get the code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Get tag version"
run: echo "TAG_VERSION=${GITHUB_REF#refs/tags/v*}" >> $GITHUB_ENV
- name: "Print tag version"
run: echo ${{ env.TAG_VERSION }}
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: "Log in to DockerHub"
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: faasm.azurecr.io
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
- name: "Build and push cpp-sysroot container"
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
file: docker/cpp-sysroot.dockerfile
Expand Down
2 changes: 1 addition & 1 deletion docker/cpp-sysroot.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN cd /code/cpp \
libfaasm \
libfaasm --threads \
libfaasmp \
libfaasmpi
libfaasmpi \
# Lastly, build the libraries that populate the sysroot
&& inv \
libffi \
Expand Down
4 changes: 2 additions & 2 deletions faasmtools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,14 @@ def build_config_cmd(env_vars, cmd, shared=False, cxx=False, conf_args=True):
return base_config_cmd


def run_autotools(proj_dir):
def run_autotools(env_vars, proj_dir):
"""
Runs through autotools set-up on the given directory
"""

def _run_auto_cmd(cmd):
print("Running {}".format(cmd))
auto_cmd = build_config_cmd([cmd], conf_args=False)
auto_cmd = build_config_cmd(env_vars, [cmd], conf_args=False)
auto_cmd = " ".join(auto_cmd)
run(auto_cmd, shell=True, check=True, cwd=proj_dir)

Expand Down
6 changes: 4 additions & 2 deletions tasks/libffi.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ def build(ctx, clean=False, threads=False):
if exists(join(LIBFFI_DIR, "Makefile")) and clean:
run("make clean", cwd=LIBFFI_DIR, shell=True, check=True)

build_env = get_faasm_build_env_dict(threads)

# Autotools
run_autotools(LIBFFI_DIR)
run_autotools(build_env, LIBFFI_DIR)

# Configure
build_env = get_faasm_build_env_dict(threads)
configure_cmd = build_config_cmd(
build_env,
[
"./configure",
"--includedir={}".format(
Expand Down
2 changes: 1 addition & 1 deletion tasks/zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def zlib(ctx, clean=False, threads=False):
"CXX={}".format(build_env["FAASM_WASM_CXX"]),
"CFLAGS='{}'".format(build_env["FAASM_WASM_CFLAGS"]),
"CXXFLAGS='{}'".format(build_env["FAASM_WASM_CXXFLAGS"]),
"LD={}".format(build_env["FAASM_WASM_LD"]),
"LD={}".format(build_env["FAASM_WASM_CC"]),
"LDFLAGS='{}'".format(build_env["FAASM_WASM_STATIC_LINKER_FLAGS"]),
"AR={}".format(build_env["FAASM_WASM_AR"]),
"RANLIB={}".format(build_env["FAASM_WASM_RANLIB"]),
Expand Down

0 comments on commit eaaf4d5

Please sign in to comment.