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

vcpkg for macOs #18

Merged
merged 25 commits into from
Aug 15, 2021
Merged

vcpkg for macOs #18

merged 25 commits into from
Aug 15, 2021

Conversation

daschuer
Copy link
Member

This builds an environment for MacOS
Traget specific overlays have been moved to overlays/x64-osc and overlays/x64-win

The qt version of MacOs is 5.12.4, Windows is on 5.15.2

.github/workflows/build.yml Outdated Show resolved Hide resolved
if(${VCPKG_OSX_DEPLOYMENT_TARGET} GREATER "10.14") # Max Version supported by QT
message(STATUS "Qt 5.12.4 only support OSX_DEPLOYMENT_TARGET up to 10.14")
set(VCPKG_OSX_DEPLOYMENT_TARGET "10.14")
if(${VCPKG_OSX_DEPLOYMENT_TARGET} GREATER "10.15") # Max Version supported by QT. This version is defined in mkspecs/common/macx.conf as QT_MAC_SDK_VERSION_MAX
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change needed if we use 10.12 as the deployment target?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bugfix from upstream.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unclear where it comes from. Is it backported from a later Qt version upstream?

triplets/x64-osx.cmake Outdated Show resolved Hide resolved
@Be-ing
Copy link

Be-ing commented Jun 30, 2021

Somehow uploading the logs of the Windows build broke:

No files were found with the provided path: C:\mixxx-vcpkg/buildtrees/**/*.log. No artifacts will be uploaded.

.github/workflows/build.yml Outdated Show resolved Hide resolved
@Be-ing
Copy link

Be-ing commented Jun 30, 2021

$ cmake -DCMAKE_TOOLCHAIN_FILE=buildenv/mixxx-deps-2.4-x64-osx-96ac0de/scripts/buildsystems/vcpkg.cmake -S . -B build
-- Setting CMAKE_BUILD_TYPE to 'Debug' as none was specified.
-- The C compiler identification is AppleClang 9.0.0.9000039
-- The CXX compiler identification is AppleClang 9.0.0.9000039
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - broken
CMake Error at buildenv/2.3-j00026-0b1209e3-osx10.12-x86_64-release/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler

    "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/bwilson/mixxx/build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/make cmTC_6907b/fast && make: error: unable to find utility "make", not a developer tool or in PATH
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:61 (project)


-- Configuring incomplete, errors occurred!

@daschuer
Copy link
Member Author

daschuer commented Jul 1, 2021

CMake Error at buildenv/2.3-j00026-0b1209e3-osx10.12-x86_64-release/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):

why is this is still 2.3 ?

@daschuer
Copy link
Member Author

daschuer commented Jul 1, 2021

Somehow uploading the logs of the Windows build broke

I guess there are non, because building is skipped due to caching.

@Be-ing
Copy link

Be-ing commented Jul 1, 2021

why is this is still 2.3 ?

The vcpkg archive does not include cmake nor ccache, so I am still using those binaries from the old build environment.

@Be-ing
Copy link

Be-ing commented Jul 1, 2021

Thank you for rebasing and cleaning up the commit messages. It looks like the new custom triplet is not working unfortunately.

@Be-ing
Copy link

Be-ing commented Jul 1, 2021

There is no need to take care of these in this PR, but I would like to ship ccache and cmake with our macOS dependencies so macOS developers only need to download one archive besides the Mixxx source code. I do not know if upstream would accept packages for those because vcpkg is focused on libraries, but it is worth asking.

@@ -62,7 +62,7 @@ jobs:
wavpack
${{ matrix.vcpkg_packages_extras }}
VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }}
VCPKG_OVERLAY_TRIPLETS: overlay/triplets
#VCPKG_OVERLAY_TRIPLETS: overlay/triplets does not work
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could open an issue upstream to request this feature.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daschuer
Copy link
Member Author

daschuer commented Jul 1, 2021

Run Build Command(s):/usr/bin/make cmTC_6907b/fast && make: error: unable to find utility "make", not a developer tool or in PATH

Is make in your path?

@daschuer
Copy link
Member Author

daschuer commented Jul 5, 2021

OK, It is building again. Merge?
This puts us in the situation that we can use the new environment in a PR and sort out remaining issues.

@Be-ing
Copy link

Be-ing commented Jul 5, 2021

I would like to get this working locally or in a PR before merging. There may be changes needed in this branch to make it work still.

@daschuer
Copy link
Member Author

daschuer commented Jul 5, 2021

Yes of cause there are probably remaining issues.
But without merging this current state no one else can help.

Wen we have the environment produced here on our download server, I can also continue to work on it fixing the mixxx repro or this one.

I think this was the way we have developed the Windows version as well.

@Be-ing
Copy link

Be-ing commented Jul 5, 2021

If you make a branch on the mixxxdj/vcpkg repo, GitHub Actions will upload the build to downloads.mixxx.org which can be used for testing a PR in the mixxxdj/mixxx repo.

@daschuer
Copy link
Member Author

daschuer commented Jul 5, 2021

Why do you think we need a branch? We have the same with less hassle when we just merge.

@Be-ing
Copy link

Be-ing commented Jul 5, 2021

We can rebase a branch as needed until we merge it.

@daschuer
Copy link
Member Author

daschuer commented Jul 5, 2021

Please explain the benefit?

@Be-ing
Copy link

Be-ing commented Jul 5, 2021

a cleaner git history

There is no rush to merge until we know it works IMO. Do you have permission to push a new branch to this repo?

@daschuer
Copy link
Member Author

daschuer commented Jul 5, 2021

I don't have interest to do more work for a clean history. This has gone already through a clean up which took me some
hours.

What is your current build output? Does installing make fix the issue?

@daschuer
Copy link
Member Author

daschuer commented Jul 5, 2021

Using an relative path allows to use the original overlays/triplets folder.

@Holzhaus
Copy link
Member

Holzhaus commented Jul 6, 2021

a cleaner git history

I think it's okay to merge as-is. This PR builds fine and there is no regression risk because we didn't use vcpkg for macOS until now. If further changes are necessary to make macOS build with vcpkg, the git history may as well reflect that.

@daschuer daschuer force-pushed the 2.3.macos branch 2 times, most recently from 4be5121 to 8eb5abb Compare August 12, 2021 19:46
@daschuer
Copy link
Member Author

OK, I consider this as ready to merge now. It was tested together with Mixxx here:
https://github.com/daschuer/mixxx/runs/3315586893
I will issue a PR once this one is up at our download server.

@Be-ing
Copy link

Be-ing commented Aug 12, 2021

Has it been tested by a macOS user?

@Be-ing
Copy link

Be-ing commented Aug 13, 2021

My PR to upstream the fdk-aac fork without HE-AAC was merged. I will take care of removing it from our overlay after merging this.

@Be-ing
Copy link

Be-ing commented Aug 14, 2021

Looks good to me as soon as we get confirmation from a macOS user that it is working.

@daschuer
Copy link
Member Author

daschuer commented Aug 15, 2021

We have the confirmation that it works in terms of using the new libraries. I think we can merge and fix the found issues in the mixxx repro, linking to this new environment.
https://mixxx.zulipchat.com/#narrow/stream/267968-testing/topic/macOS.20build.20with.20vcpkg

@Holzhaus
Copy link
Member

Alright, then I'll merge this now so that multiple people can contribute fixes if necessary instead of putting all the weight on @daschuer's shoulders. It won't make a difference for users/developers until we change the buildenv in the mixxx repo anyway.

@Holzhaus Holzhaus merged commit 0f25dfd into mixxxdj:2.4 Aug 15, 2021
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.

3 participants