Skip to content

Commit

Permalink
wabt: revision bump for linux bottle
Browse files Browse the repository at this point in the history
Fix relocation error when linking shared libraries on Linux

```
  /home/linuxbrew/.linuxbrew/opt/binutils/bin/ld: /home/linuxbrew/.linuxbrew/lib/libwabt.a(binary-reader.cc.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
  /home/linuxbrew/.linuxbrew/opt/binutils/bin/ld: final link failed: bad value
  collect2: error: ld returned 1 exit status
```

build log re, https://github.com/Homebrew/homebrew-core/actions/runs/12369250671/job/34520913923#step:4:4511

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 authored and daeho-ro committed Dec 18, 2024
1 parent 02dae2c commit 161092c
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Formula/w/wabt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class Wabt < Formula
tag: "1.0.36",
revision: "3e826ecde1adfba5f88d10d361131405637e65a3"
license "Apache-2.0"
revision 1

livecheck do
url :stable
Expand All @@ -28,11 +29,17 @@ class Wabt < Formula
uses_from_macos "python" => :build

def install
system "cmake", "-S", ".", "-B", "build",
"-DBUILD_TESTS=OFF",
"-WITH_WASI=ON",
*std_cmake_args,
"-DFETCHCONTENT_FULLY_DISCONNECTED=OFF" # FIXME: Find a way to build without this.
ENV.append_to_cflags "-fPIC" if OS.linux?

args = %w[
-DBUILD_TESTS=OFF
-DWITH_WASI=ON
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF
]

system "cmake", *args, *std_cmake_args

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end
Expand Down

0 comments on commit 161092c

Please sign in to comment.