Skip to content

Build under Linux fails with "cannot bind non-const lvalue reference of type <x> to an rvalue of type <y>" #2262

@v-fox

Description

@v-fox

Validation

Describe what's going wrong

So, I've tried to see if xenia became operable under Linux and updated from 20230914T123251. f6b5424 (where it tries to launch something but gets stuck) to 20240516T230549. 8e7301f but it failed to build altogether.

Describe what should happen

Build successfully and possibly launch something.

If applicable, provide a callstack here, especially for crashes

Seems like 376bad5 have caused it. Reverting it made the build pass.

If applicable, upload a logfile and link it here

It failed with:

[  137s] /home/abuild/rpmbuild/BUILD/xenia-20240516T230549.8e7301f/src/xenia/gpu/command_processor.cc: In member function ‘virtual void xe::gpu::CommandProcessor::WriteRegister(uint32_t, uint32_t)’:
[  137s] /home/abuild/rpmbuild/BUILD/xenia-20240516T230549.8e7301f/src/xenia/gpu/command_processor.cc:372:67: error: cannot bind non-const lvalue reference of type ‘xe::gpu::reg::DC_LUT_RW_INDEX&’ to an rvalue of type ‘xe::gpu::reg::DC_LUT_RW_INDEX’
[  137s]   372 |         auto& gamma_ramp_rw_index = regs.Get<reg::DC_LUT_RW_INDEX>();
[  137s]       |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
[  137s] /home/abuild/rpmbuild/BUILD/xenia-20240516T230549.8e7301f/src/xenia/gpu/command_processor.cc:408:67: error: cannot bind non-const lvalue reference of type ‘xe::gpu::reg::DC_LUT_RW_INDEX&’ to an rvalue of type ‘xe::gpu::reg::DC_LUT_RW_INDEX’
[  137s]   408 |         auto& gamma_ramp_rw_index = regs.Get<reg::DC_LUT_RW_INDEX>();
[  137s]       |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
[  137s] /home/abuild/rpmbuild/BUILD/xenia-20240516T230549.8e7301f/src/xenia/gpu/command_processor.cc:443:67: error: cannot bind non-const lvalue reference of type ‘xe::gpu::reg::DC_LUT_RW_INDEX&’ to an rvalue of type ‘xe::gpu::reg::DC_LUT_RW_INDEX’
[  137s]   443 |         auto& gamma_ramp_rw_index = regs.Get<reg::DC_LUT_RW_INDEX>();
[  137s]       |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions