Skip to content

Fix multiple configuration errors#1781

Merged
JulianGro merged 2 commits intooverte-org:masterfrom
RTUnreal:fix_var_compilations
Sep 3, 2025
Merged

Fix multiple configuration errors#1781
JulianGro merged 2 commits intooverte-org:masterfrom
RTUnreal:fix_var_compilations

Conversation

@RTUnreal
Copy link
Collaborator

While working on getting overte to compile with system libs, I noticed errors while getting compilation to work.
This is only to fix those issues

@RTUnreal RTUnreal force-pushed the fix_var_compilations branch from 3e6999a to f88e439 Compare August 29, 2025 18:47
@RTUnreal RTUnreal mentioned this pull request Aug 29, 2025
5 tasks
@RTUnreal RTUnreal force-pushed the fix_var_compilations branch from f88e439 to 5bcdf79 Compare August 29, 2025 18:58
@ksuprynowicz ksuprynowicz added needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested labels Aug 29, 2025
Copy link
Member

@JulianGro JulianGro left a comment

Choose a reason for hiding this comment

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

WebRTC is only called in the following places:

assignment-client/src/AssignmentClient.h:20:#include <shared/WebRTC.h>
domain-server/src/DomainServer.h:30:#include <shared/WebRTC.h>
libraries/audio-client/src/AudioClient.h:36:#include <shared/WebRTC.h>
libraries/networking/src/udt/NetworkSocket.h:15:#include <shared/WebRTC.h>
libraries/networking/src/webrtc/WebRTCDataChannels.h:12:#include <shared/WebRTC.h>
libraries/networking/src/webrtc/WebRTCSignalingServer.h:12:#include <shared/WebRTC.h>
libraries/networking/src/webrtc/WebRTCSocket.h:12:#include <shared/WebRTC.h>

However, the Data Channel stuff is currently not actually in use, so the audio-client library should be the only place that needs to target WebRTC right now.

If you really need to target WebRTC in places that don't use it or should inherit the target, I wonder if we are doing something wrong in cmake/macros/TargetWebRTC.cmake. CMake has multiple options for defining targets, such as PRIVATE, PUBLIC, and INTERFACE. I never really properly understood those (and it always just works over here), so maybe we are missing something there.

}
};

#if defined(NVTT_API)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you can remove that if-statement there, since you changed it so if NVTT_API is not defined, nvtt.h won't be included. Meaning nvtt::TaskDispatcher won't be available if NVTT_API is not defined and the build will fail.

Copy link
Collaborator Author

@RTUnreal RTUnreal Aug 30, 2025

Choose a reason for hiding this comment

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

this is-statement is encased in another NVTT_API check, which I think might be an error, because convertImageToLDRTexture and convertImageToHDRTexture are referenced in non-NVTT_API-checked code, meaning we have a hard dependency to nvtt.

Copy link
Member

Choose a reason for hiding this comment

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

I see.
Yeah, I wouldn't be surprised if we depend on NVTT. We never tried without it, and it is actually a huge library with a LOT of functionality. We do depend on GLM though, so maybe that can take over? I don't know too much about those things.

@JulianGro JulianGro added the build system Issues affecting the build process. label Aug 30, 2025
}
assert(numMips > 0);
Etc::RawImage *mipMaps = new Etc::RawImage[numMips];
Etc::RawImage* mipMaps = new Etc::RawImage[numMips];
Copy link
Member

Choose a reason for hiding this comment

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

Someone more knowledgable in C++ than I should review this single line.
I believe we only use ETC on Android, so I am unsure if GCC would complain about this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry that was something I missed. My auto-formatter changed it and I forgot to revert it

@RTUnreal RTUnreal force-pushed the fix_var_compilations branch from 5bcdf79 to a259847 Compare August 30, 2025 10:11
@RTUnreal RTUnreal requested a review from JulianGro August 30, 2025 10:26
@RTUnreal
Copy link
Collaborator Author

RTUnreal commented Aug 30, 2025

WebRTC is only called in the following places:

assignment-client/src/AssignmentClient.h:20:#include <shared/WebRTC.h>
domain-server/src/DomainServer.h:30:#include <shared/WebRTC.h>
libraries/audio-client/src/AudioClient.h:36:#include <shared/WebRTC.h>
libraries/networking/src/udt/NetworkSocket.h:15:#include <shared/WebRTC.h>
libraries/networking/src/webrtc/WebRTCDataChannels.h:12:#include <shared/WebRTC.h>
libraries/networking/src/webrtc/WebRTCSignalingServer.h:12:#include <shared/WebRTC.h>
libraries/networking/src/webrtc/WebRTCSocket.h:12:#include <shared/WebRTC.h>

However, the Data Channel stuff is currently not actually in use, so the audio-client library should be the only place that needs to target WebRTC right now.

If you really need to target WebRTC in places that don't use it or should inherit the target, I wonder if we are doing something wrong in cmake/macros/TargetWebRTC.cmake. CMake has multiple options for defining targets, such as PRIVATE, PUBLIC, and INTERFACE. I never really properly understood those (and it always just works over here), so maybe we are missing something there.

Yes, I also didn't understand the differences between them all but I found this, which gets used in #1782, and got it now right

@RTUnreal
Copy link
Collaborator Author

RTUnreal commented Sep 2, 2025

Is there still smth, that needs to be changed here?

@JulianGro JulianGro merged commit b34de71 into overte-org:master Sep 3, 2025
3 checks passed
@JulianGro JulianGro added CR approved This pull request has been successfully code reviewed QA approved This pull request has been successfully tested and removed needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested labels Sep 3, 2025
@RTUnreal RTUnreal deleted the fix_var_compilations branch October 23, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build system Issues affecting the build process. CR approved This pull request has been successfully code reviewed QA approved This pull request has been successfully tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants