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

OpenSC build for macOS M1 Pro #3162

Open
ndshah88 opened this issue May 29, 2024 · 10 comments
Open

OpenSC build for macOS M1 Pro #3162

ndshah88 opened this issue May 29, 2024 · 10 comments

Comments

@ndshah88
Copy link

Hello,

I am trying to build OpenSC on macOS M1 Pro.

When I follow the steps mentioned on this link: https://github.com/OpenSC/OpenSC/wiki/Compiling-and-Installing-on-Unix-flavors
the build is successful but when I try to run the build script within the MacOSx folder: sudo ./MacOSX/build I get the error

https://gist.github.com/ndshah88/cc9d2a98f68470b57ce87a56dc41b763

Here is a log of the same.

Can someone please advise what am I missing?

Also, is the build for M1 pro and Intel based macs different (since the same thing is working perfectly fine on an intel based macOS)

@metsma
Copy link
Contributor

metsma commented May 29, 2024

Can you set Xcode as default compiler
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

To OpenSC members: Maybe is time to remove the xcode 12.2 and legacy tokend codepath?

@ndshah88
Copy link
Author

How would you go about doing that?

"Can you set Xcode as default compiler"

@metsma
Copy link
Contributor

metsma commented May 29, 2024

sudo xcode-select -s /Applications/Xcode.app

@ndshah88
Copy link
Author

So I should run this command:

sudo xcode-select -s /Applications/Xcode.app

followed by the sudo ./MacOSX/build?

@metsma
Copy link
Contributor

metsma commented May 29, 2024

Select the Xcode then run build script

@ndshah88
Copy link
Author

Also, any idea if the build for M1 pro and Intel based macs different?

The opensc latest dmg doesn't seem to differentiate between whether the .dmg file is applicable to intel processors or M series processors

@metsma
Copy link
Contributor

metsma commented May 29, 2024

It should be universal for both CPU types

@ndshah88
Copy link
Author

No change even after selecting Xcode as the build

Here is the gist

https://gist.github.com/ndshah88/3daa771ed3547701dc8c7366c0ac6e65

@metsma
Copy link
Contributor

metsma commented May 29, 2024

There has been change

checking whether OPENSSL_zalloc is declared... yes
checking for OPENSSL_cleanse... configure: error: Cannot link against libcrypto

probably in your previous build openssl was only built x86_64.
Try to remove openssl_bin folder and rebuild

@frankmorgner
Copy link
Member

When I follow the steps mentioned on this link: https://github.com/OpenSC/OpenSC/wiki/Compiling-and-Installing-on-Unix-flavors the build is successful but when I try to run the build script within the MacOSx folder: sudo ./MacOSX/build I get the error

https://gist.github.com/ndshah88/cc9d2a98f68470b57ce87a56dc41b763

Here is a log of the same.

This log seems to be incomplete. It stops while building OpenSSL without showing an error. You do not require sudo to build OpenSC.

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

3 participants