-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building on MacOS for x86_64 architecture #77
Comments
After some research I realized that errors like:
happens during compilation of files containing things related to templates, like {-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
module MyUtilities.Lens where
import Control.Lens ( makePrisms, makeFieldsNoPrefix )
import MyUtilities.Network ( Error, NetData )
makePrisms ''Error
makeFieldsNoPrefix ''NetData It looks like a template Haskell tries to link HsOpenSSL but it does not know folders where are openssl's .dylib files. package.yaml:
but it does not help. PS. openssl libs are in /usr/local/opt/openssl/lib also (as the HsOpenSSL cabal's expects) - I have them in libs/ssl and in /usr/local/opt/openssl/lib - the same libs for x86_64. Any suggestions? |
The problem file
The similar file but in the snapshot for ARM64 platform:
imports explicitly libssl and libcrypto and no And the same files examined with for ARM64:
ie, it tries to load ssl, crypto lib, but for x86_64 nothing related to these libraries. |
I am trying to use the library on arm-based MacOS which support both architectures (arm64, x86_64), it's so called "M1":
and when I compile my application using the library for arm64 architecture - no problem (but it requires
sudo ln -sf /opt/homebrew/Cellar/openssl@3/3.0.7 /usr/local/opt/openssl
).But when I try to switch to x86_64, I get an error like:
I do it by:
and installed openssl with brew
arch -x86_64 ./brew install openssl@3
from the folder (/usr/local/homebrew
) where I installed Homebrew for x86_64.I tried
flags
as well, but it does not help.Not sure, why it happens, maybe it tries to use arm64 library. Any help is appreciated.
The text was updated successfully, but these errors were encountered: