Skip to content
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

LibreSSL on macOS cannot be compiled for different architecture #905

Open
davidbitterlich opened this issue Aug 30, 2023 · 1 comment
Open

Comments

@davidbitterlich
Copy link

Hello,

currently I have tried to compile LibreSSL 3.7.3 release from source on macOS Ventura aarch64 with target architecture x86_64. I wanted to get LibreSSL built for both architectures separately.

For building I've used the following commands:

./configure --prefix=mycustomfolder.amd64 --build=x86_64-darwin --enable-asm --disable-shared --with-pic
make clean all install_sw

The compilation finishes without any error. However when I take a look at the libraries, it compiled.
Using lipo, the files are for arm64 only instead of x86_64.

Actually I am not sure if I configured it wrong or if there is an issue in the build chain. I don't use CMake for compilation, just configure and make.

I also found a workaround: after configure, I do get correct x86_64 binaries when I run make in x86_64 mode:

arch -x86_64 make clean all install_sw

Then it compiles true x86_64 binaries.

Additionally I saw this pull request: #877

And this issue #876 which is very similar to my situation but it's actually not the same situation because I don't use CMake at all, only make and configure.

@vszakats
Copy link
Contributor

vszakats commented Sep 5, 2023

The reverse (cross-building aarch64 on intel) is working as expected, though in that case there is no asm involved:

export 'CC=clang -arch arm64e'
./configure --build=x86_64-apple-darwin --host=aarch64-apple-darwin --target=aarch64-apple-darwin [...]

Ref: https://github.com/vszakats/curl-for-win/actions/runs/6089877894/job/16523583215#step:3:2095

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants