Build failed because include directory of libarchive not set correctly on apple m1 for ipad pro m2
- Dominant language
- C
- Stars
- 20.5k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
To whom it may concern, I make a patch as following:
```diff
diff --git a/tools/meson.build b/tools/meson.build
index fd2e30ac..1a889efc 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -25,11 +25,13 @@ libarchive = dependency('libarchive', required: false)
if not libarchive.found()
# homebrew
libarchive_lib = cc.find_library('libarchive', dirs: ['/usr/local/opt/libarchive/lib'], required: false)
+ libarchive_include = '/usr/local/opt/libarchive/include'
if not libarchive_lib.found()
libarchive_lib = cc.find_library('libarchive', dirs: ['/opt/homebrew/opt/libarchive/lib'], required: false)
+ libarchive_include = '/opt/homebrew/opt/libarchive/include'
endif
if libarchive_lib.found()
- libarchive = declare_dependency(dependencies: [libarchive_lib], include_directories: include_directories(['/usr/local/opt/libarchive/include']))
+ libarchive = declare_dependency(dependencies: [libarchive_lib], include_directories: include_directories([libarchive_include]))
endif
endif
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in tools/meson.build and review how the libarchive dependency is located for the two Homebrew prefixes shown in the issue. Verify the Meson configuration and build on Apple Silicon with each applicable include path; done means libarchive headers are found and the build completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100