Comments (4)
I have managed to build the code! As you said I had to download the x86_64 version of libpcre.
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
arch -x86_64 /usr/local/bin/brew install pcre
stack build
Thanks!
from duckling.
It's a bit unfortunate that stack
can't repeat the failed section at the bottom, it's hard to find.
The relevant lines are right near the top:
regex-pcre > Cabal-simple_SvXsv1f__3.0.1.0_ghc-8.8.4: The program 'pkg-config' version
regex-pcre > >=0.9.0 is required but it could not be found.
The regex-pcre library needs you to have a system dependency (i.e. a C library not managed by stack).
You could get it from whatever package manager you use on your macos system, e.g. homebrew:
https://formulae.brew.sh/formula/pkg-config
from duckling.
thanks, it worked but now I get a different error:
Building all executables for `duckling' once. After a successful build of all of them, only specified executables will be rebuilt.
duckling> build (lib + exe)
Preprocessing library for duckling-0.2.0.0..
Building library for duckling-0.2.0.0..
ld: warning: -undefined dynamic_lookup may not work with chained fixups
ld: warning: ignoring file /opt/homebrew/Cellar/pcre/8.45/lib/libpcre.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Preprocessing executable 'duckling-expensive' for duckling-0.2.0.0..
Building executable 'duckling-expensive' for duckling-0.2.0.0..
Linking .stack-work/dist/x86_64-osx/Cabal-3.0.1.0/build/duckling-expensive/duckling-expensive ...
ld: warning: ignoring file /opt/homebrew/Cellar/pcre/8.45/lib/libpcre.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
"_pcre_compile", referenced from:
_LcclY_info in libHSregex-pcre-0.95.0.0-2ET47luPseYCyxUKIqxikm.a(Wrap.o)
"_pcre_exec", referenced from:
_LccBZ_info in libHSregex-pcre-0.95.0.0-2ET47luPseYCyxUKIqxikm.a(Wrap.o)
_LccO3_info in libHSregex-pcre-0.95.0.0-2ET47luPseYCyxUKIqxikm.a(Wrap.o)
_LccQr_info in libHSregex-pcre-0.95.0.0-2ET47luPseYCyxUKIqxikm.a(Wrap.o)
_LccRN_info in libHSregex-pcre-0.95.0.0-2ET47luPseYCyxUKIqxikm.a(Wrap.o)
"_pcre_fullinfo", referenced from:
_LccA5_info in libHSregex-pcre-0.95.0.0-2ET47luPseYCyxUKIqxikm.a(Wrap.o)
_LccLg_info in libHSregex-pcre-0.95.0.0-2ET47luPseYCyxUKIqxikm.a(Wrap.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
Error: [S-7282]
Stack failed to execute the build plan.
While executing the build plan, Stack encountered the following errors:
[S-7011]
While building package duckling-0.2.0.0 (scroll up to its section to see the error) using:
/Users/user/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_SvXsv1f__3.0.1.0_ghc-8.8.4 --verbose=1 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.0.1.0 build lib:duckling exe:custom-dimension-example exe:duckling-example-exe exe:duckling-expensive exe:duckling-regen-exe exe:duckling-request-sample --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
from duckling.
Hmm. I know what's happening here, but I'm unsure how to fix it:
- It looks like brew installed an arm64 binary for
libpcre
, which makes sense on an M1 - But stack is trying to build Haskell as x86_64. That also sort of makes sense, because an M1 can run intel binaries through an emulation layer. But we can't mix-and-match - the linker is unable to
The solutions are to either:
- Get stack to build arm64. I'm unsure how to do that
- Or, download an x86_64 libpcre and put it on the linker path
I might be able to work this out, but I'm not much of an expert on this layer of the stack so cc @chessai who might know the solution straightaway
from duckling.
Related Issues (20)
- smallest possible range/body
- stack not found when running on M1 HOT 6
- Empty reply from server
- Empty reply from server
- [german][time] dayofMonth monthAsNumber at timeOfDay not detecting
- Alpine image is not working
- [CS] Czech language support HOT 1
- [HU] Hungary language Support
- Does duckling has support for sentence containing entities with negation
- Have plan to support Cantonese? HOT 1
- Support Persian(fa) Languages HOT 4
- [Persian][Numeral] Extract incorrect number from text
- ghc: panic! when stack build.
- Can't build Docker image HOT 2
- [it_IT] add time corpus/rules
- Default log files are created even if different paths are provided via options
- [ERROR] Network.Socket.sendBuf: resource vanished HOT 1
- Time intervals are too large by one grain HOT 1
- [Question] Which elements are relevant for Test-Failures? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckling.