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

2024 October Chromium Update [skip ci] #302

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

pi-314159
Copy link
Member

No description provided.

@pi-314159
Copy link
Member Author

Also, are there any plans to create a new OQS-Demos snapshot so I can upload prebuilt binaries?

@SWilson4
Copy link
Member

Also, are there any plans to create a new OQS-Demos snapshot so I can upload prebuilt binaries?

Providing binaries for Chromium would be nice, given the computational resources required to build it from source. I think this would make sense as long as we clearly document in the snapshot notes which demos are expected to work. What do you think @baentsch @praveksharma?

@pi-314159
Copy link
Member Author

@SWilson4 Thank you! Could you merge this? Seems I lost write access to this repo...?

@SWilson4
Copy link
Member

@SWilson4 Thank you! Could you merge this? Seems I lost write access to this repo...?

Will do. Your perms change is probably a side effect of open-quantum-safe/tsc#77. I think it certainly makes sense to have you as a CODEOWNER or committer here given that you actively maintain one of the demos as well as another subproject.

@SWilson4 SWilson4 merged commit 663cab8 into open-quantum-safe:main Oct 10, 2024
3 of 5 checks passed
@ivcantero
Copy link
Contributor

ivcantero commented Oct 25, 2024

Hi
I'm trying this on Mac, and almost get it done with some steps changed a bit, but the build is failing. If you could help me to solve the issue, I could let you know the differences in the process so that we can create another guide for Mac users.
autoninja -C out/Default chrome
image

Could this be related to the latest changes you applied? Maybe building now does not work because of the new versions that you @pi-314159 included

@ivcantero
Copy link
Contributor

ivcantero commented Oct 25, 2024

Basically the steps that have to be changed are:
1 - the link at the beginning pointing to Google's instructions has to be replaced by Mac instructions "https://chromium.googlesource.com/chromium/src/+/HEAD/docs/mac_build_instructions.md"
2 - cd liboqs has to be executed before git checkout 9aa2e1481cd0c242658ec8e92776741feabec163. If not, git checkout does not work. I think this applies to linux instructions also.
3 - Remove a whitespace in oqs-Linux.patch file from the end of row "+bool ArrayContains(C && c, T t) {" , so that next command git apply works
4- Make sure to have xcode running and Terms&Conditions accepted, and run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer before gn args out/Default to avoid errors.

@pi-314159
Copy link
Member Author

@ivcantero I assume the issue has been resolved?

cd liboqs has to be executed before git checkout 9aa2e1481cd0c242658ec8e92776741feabec163. If not, git checkout does not work. I think this applies to linux instructions also.

Thanks! I forget to change it. Could you create a new PR and fix this (in both Linux and Windows instructions)?

Not sure about the Mac guide. Specifically, we don't have access to a powerful Mac virtual machine for testing the build. The Windows and Linux builds are tested on a virtual machine with 40 cores (80 threads), 256GB of memory, and 10Gbps connectivity.

@ivcantero
Copy link
Contributor

@pi-314159 It wasn’t resolved, I hoped you could help to identify the issue. I could help building it, but it is failing in the last step as mentioned.

@pi-314159
Copy link
Member Author

@ivcantero Seems it's related to the macOS version

Could you check this https://gist.github.com/pudquick/89c90421a9582f88741b21d10c6a155e ?

@pi-314159
Copy link
Member Author

pi-314159 commented Oct 29, 2024

@ivcantero I don't have experience building Chromium on a Mac, but I see two potential solutions:

  1. Avoid treating warnings as errors by removing -Werror and -Wl,--fatal-warnings flags. OR
  2. The Mac SDK version is set to 11.0, as indicated here. You have two options: you can either change it to 14.6 (the version installed on your Mac, though this is not recommended) or define MACOSX_DEPLOYMENT_TARGET=11.0 and then rebuild liboqs. This will set the default for CMAKE_OSX_DEPLOYMENT_TARGET, but you might also need to specify CMAKE_OSX_SYSROOT when building liboqs.

@ivcantero
Copy link
Contributor

@pi-314159 building with -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 worked. Thanks

@SWilson4
Copy link
Member

@ivcantero Would you consider contributing build documentation for macOS based on your experience?

@ivcantero
Copy link
Contributor

@SWilson4 yes, I would, but I still have to solve an issue because I got chromium for intel architectures, but nowadays Apple devices mostly run Arm64 architectures and for those I couldn't build it. Maybe you or @pi-314159 could help to solve it.
I read liboqs is supported on Apple M1 (arm64) architectures, I'm following the steps to build liboqs for this processor type cmake .. -G"Ninja" -DCMAKE_INSTALL_PREFIX=$CHROMIUM_ROOT/third_party/boringssl/src/oqs -DOQS_USE_OPENSSL=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 **-DCMAKE_OSX_ARCHITECTURES=arm64**
but when I run ninja I'm having errors as if the code wasn't supported for this architectures.
Honestly I don't know how to fix it.
image

image

@baentsch
Copy link
Member

baentsch commented Nov 2, 2024

@SWilson4 @ivcantero would it make sense to open a new issue (Bug report?) in liboqs pertaining to properly building the library for MacOS? It feels wrong to keep discussing this in a merged PR...

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

Successfully merging this pull request may close these issues.

4 participants