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

sony-headphones-client: fix build for aarch64 #201971

Conversation

Stunkymonkey
Copy link
Contributor

@Stunkymonkey Stunkymonkey commented Nov 19, 2022

Description of changes

followup of #201231.
related to #199919

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@Stunkymonkey
Copy link
Contributor Author

maybe we should instead set it to 255? and not remove it completely?

@mweinelt
Copy link
Member

Ideally we'd report our issues upstream and have them decide the proper course of action.

@Stunkymonkey Stunkymonkey force-pushed the sony-headphones-client-fix-aarch branch from 6fcef76 to 069b70f Compare November 19, 2022 21:50
@mweinelt
Copy link
Member

Nope.

SonyHeadphonesClient-aarch64-linux> building
SonyHeadphonesClient-aarch64-linux> build flags: -j80 SHELL=/nix/store/99bgmihz5ybclg11h00nm9lgqmsfhp4p-bash-5.1-p16/bin/bash
SonyHeadphonesClient-aarch64-linux> [  5%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/BluetoothWrapper.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 11%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/ByteMagic.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 16%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/CommandSerializer.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 22%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/TimedMessageQueue.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 27%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/CrossPlatformGUI.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 33%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/Headphones.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 38%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/imgui/imgui.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 44%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/imgui/imgui_draw.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 50%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/imgui/imgui_tables.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 55%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/imgui/imgui_widgets.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 61%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/linux/DBusHelper.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 66%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/CascadiaCodeFont.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 72%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/linux/LinuxGUI.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 77%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/linux/LinuxBluetoothConnector.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 83%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/linux/main.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 88%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/imgui/backends/imgui_impl_glfw.cpp.o
SonyHeadphonesClient-aarch64-linux> [ 94%] Building CXX object CMakeFiles/SonyHeadphonesClient.dir/imgui/backends/imgui_impl_opengl3.cpp.o
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CommandSerializer.h:2,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/CommandSerializer.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CommandSerializer.h:2,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/BluetoothWrapper.h:4,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/BluetoothWrapper.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CrossPlatformGUI.h:4,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/CrossPlatformGUI.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/linux/LinuxBluetoothConnector.h:4,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/linux/LinuxBluetoothConnector.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CommandSerializer.h:2,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/BluetoothWrapper.h:4,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/linux/LinuxGUI.h:3,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/linux/main.cpp:2:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CommandSerializer.h:2,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/BluetoothWrapper.h:4,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/linux/LinuxGUI.h:3,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/linux/LinuxGUI.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CommandSerializer.h:2,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/BluetoothWrapper.h:4,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/Headphones.h:2,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/Headphones.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:244: CMakeFiles/SonyHeadphonesClient.dir/linux/LinuxBluetoothConnector.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> make[2]: *** Waiting for unfinished jobs....
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:76: CMakeFiles/SonyHeadphonesClient.dir/BluetoothWrapper.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/Headphones.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Headphones.h:43:79: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>    43 |  Property<SOUND_POSITION_PRESET> _surroundPosition = { SOUND_POSITION_PRESET::OUT_OF_RANGE, SOUND_POSITION_PRESET::OFF };
SonyHeadphonesClient-aarch64-linux>       |                                                                               ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:104: CMakeFiles/SonyHeadphonesClient.dir/CommandSerializer.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/ByteMagic.h:9,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/ByteMagic.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Constants.h:121:25: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>   121 |  SOUND_POSITION_PRESET::OUT_OF_RANGE
SonyHeadphonesClient-aarch64-linux>       |                         ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:146: CMakeFiles/SonyHeadphonesClient.dir/Headphones.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:90: CMakeFiles/SonyHeadphonesClient.dir/ByteMagic.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:272: CMakeFiles/SonyHeadphonesClient.dir/linux/main.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CrossPlatformGUI.h:12,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/CrossPlatformGUI.cpp:1:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Headphones.h:43:79: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>    43 |  Property<SOUND_POSITION_PRESET> _surroundPosition = { SOUND_POSITION_PRESET::OUT_OF_RANGE, SOUND_POSITION_PRESET::OFF };
SonyHeadphonesClient-aarch64-linux>       |                                                                               ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> In file included from /build/source/Client/CrossPlatformGUI.h:12,
SonyHeadphonesClient-aarch64-linux>                  from /build/source/Client/linux/LinuxGUI.cpp:10:
SonyHeadphonesClient-aarch64-linux> /build/source/Client/Headphones.h:43:79: error: 'OUT_OF_RANGE' is not a member of 'SOUND_POSITION_PRESET'
SonyHeadphonesClient-aarch64-linux>    43 |  Property<SOUND_POSITION_PRESET> _surroundPosition = { SOUND_POSITION_PRESET::OUT_OF_RANGE, SOUND_POSITION_PRESET::OFF };
SonyHeadphonesClient-aarch64-linux>       |                                                                               ^~~~~~~~~~~~
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:258: CMakeFiles/SonyHeadphonesClient.dir/linux/LinuxGUI.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> make[2]: *** [CMakeFiles/SonyHeadphonesClient.dir/build.make:132: CMakeFiles/SonyHeadphonesClient.dir/CrossPlatformGUI.cpp.o] Error 1
SonyHeadphonesClient-aarch64-linux> make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/SonyHeadphonesClient.dir/all] Error 2
SonyHeadphonesClient-aarch64-linux> make: *** [Makefile:91: all] Error 2

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Nov 19, 2022
@mweinelt
Copy link
Member

Builds, but please report these issues upstream.

@Stunkymonkey
Copy link
Contributor Author

is already done in Plutoberth/SonyHeadphonesClient#82

@Stunkymonkey
Copy link
Contributor Author

I expect the fix to be: Plutoberth/SonyHeadphonesClient#84
But let me test it first.

@Stunkymonkey Stunkymonkey force-pushed the sony-headphones-client-fix-aarch branch 2 times, most recently from f9a1ca4 to 7f4a3bc Compare November 23, 2022 20:41
@Stunkymonkey
Copy link
Contributor Author

@mweinelt could you please test it with aarch again?

@Stunkymonkey
Copy link
Contributor Author

ping @mweinelt

Comment on lines 10 to 13
rev = "v${version}";
hash = "sha256-0DQanrglJiGsN8qQ5KxkL8I+Fpt1abeeuKiM8v9GclM=";
#rev = "v${version}";
rev = "c8f60c030bfe1987415d05241a6839648d40b358";
hash = "sha256-xRbPFaPlO5hyDQJyM4Pf56icRcJAL9H46Ep+hcl3DUg=";
fetchSubmodules = true;
Copy link
Member

Choose a reason for hiding this comment

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

Can we fetch this as a patch instead of touching that logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel this is the least effort solution. Otherwise I will have to cleanup later...
(Additionally the original patch from github can not be reuesed due to the different sourceRoot)

Copy link
Member

Choose a reason for hiding this comment

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

Applying a patch onto a src that uses a tag is a much more semantically valuable approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems more work, but sure. For anybody else this is easier to understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mweinelt please have a look if this is the way you wanted it.

@Stunkymonkey Stunkymonkey force-pushed the sony-headphones-client-fix-aarch branch from 7f4a3bc to 424b63a Compare December 1, 2022 15:35
--replace "UNKNOWN = -1" "// UNKNOWN removed since it doesn't fit in char"
'';
patches = [
./fix-aarch64.patch
Copy link
Member

@mweinelt mweinelt Dec 1, 2022

Choose a reason for hiding this comment

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

Huh, can't we fetchpatch the patch? Is this not a patch you submitted upstream?

Copy link
Contributor Author

@Stunkymonkey Stunkymonkey Dec 1, 2022

Choose a reason for hiding this comment

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

yes it is.
The problem is, that the patch itself is referring to the file Client/Constants.h.
Due to the changed sourceRoot into the Client folder, the path does not match... Therefore I had to adjust the path manually.

Fetching the commit while pulling the source needs the least effort, the least changes, but is unusual for other contributors.

That was what i proposed before.

Copy link
Member

Choose a reason for hiding this comment

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

Can you try to change into the sourceRoot in postPatch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is easier said than done. I do not know how to easily fix this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

please consider this provided change as a fix. All other solutions will have much more changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I guess we will wait for the next release. Fixing the build seems not important...

@Stunkymonkey Stunkymonkey force-pushed the sony-headphones-client-fix-aarch branch from 424b63a to 7fa49a7 Compare December 1, 2022 16:28
@Stunkymonkey Stunkymonkey deleted the sony-headphones-client-fix-aarch branch November 22, 2023 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants