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

Linux build fixes #112

Closed
wants to merge 21 commits into from
Closed

Conversation

bobsayshilol
Copy link

@bobsayshilol bobsayshilol commented Aug 16, 2022

This doesn't get us all the way there, but the remaining parts are either hacks or require additional functionality from delta-studio.

Note that 908103b4a10c7a874d21418ecf5aa0844602a876 depends on a similar change in https://github.com/ange-yaghi/delta-studio so merging this would fail as-is unless that's been merged.

This hasn't been tested on Windows but it should Just Work.

This addresses #2.

Blocked on ange-yaghi/delta-studio#34.

@alexmyczko
Copy link

Thank you for working on this! I've given it a try with:

git clone --recursive https://github.com/bobsayshilol/engine-sim.git

but I get something like:

/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_math.h:266:5: error:‘__forceinline’ does not name a type
  266 |     __forceinline ysVector Magnitude(const ysVector &v) {
      |     ^~~~~~~~~~~~~
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_math.h:272:5: error:‘__forceinline’ does not name a type
  272 |     __forceinline ysVector Normalize(const ysVector &v) {
      |     ^~~~~~~~~~~~~
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_math.h:276:5: error:‘__forceinline’ does not name a type
  276 |     __forceinline ysVector Negate(const ysVector &v) {
      |     ^~~~~~~~~~~~~
In file included from /var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/yds_animation_action.cpp:3:
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h: In member function ‘void TransformTarget::ClearLocation(const ysVector&)’:
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h:33:27: error: ‘GetX’ is not a member of ‘ysMath’
   33 |         Data[0] = ysMath::GetX(t);
      |                           ^~~~
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h:34:27: error: ‘GetY’ is not a member of ‘ysMath’
   34 |         Data[1] = ysMath::GetY(t);
      |                           ^~~~
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h:35:27: error: ‘GetZ’ is not a member of ‘ysMath’
   35 |         Data[2] = ysMath::GetZ(t);
      |                           ^~~~
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h: In member function ‘void TransformTarget::AccumulateQuaternion(ysQuaternion&, float)’:
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h:64:38: error: ‘GetScalar’ is not a member of ‘ysMath’
   64 |             float cosTheta = ysMath::GetScalar(ysMath::Dot(current, q));
      |                                      ^~~~~~~~~
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h:64:56: error: ‘Dot’ is not a member of ‘ysMath’; did you mean ‘Dot3’?
   64 |             float cosTheta = ysMath::GetScalar(ysMath::Dot(current, q));
      |                                                        ^~~
      |                                                        Dot3
/var/www/debian/engine-sim/git2/engine-sim/dependencies/submodules/delta-studio/src/../include/yds_animation_target.h:68:39: error: ‘Negate’ is not a member of ‘ysMath’; did you mean ‘Negate3’?
   68 |                 transformed = ysMath::Negate(q);
      |                                       ^~~~~~
      |                                       Negate3
gmake[2]: *** [dependencies/submodules/delta-studio/CMakeFiles/delta-core.dir/build.make:76: dependencies/submodules/delta-studio/CMakeFiles/delta-core.dir/src/yds_animation_action.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:581: dependencies/submodules/delta-studio/CMakeFiles/delta-core.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

@bobsayshilol
Copy link
Author

Yeah, that's why it's still in draft. It requires changes to https://github.com/ange-yaghi/delta-studio too which is where you're seeing all of the errors. Check the discord for the current progress.

@alexmyczko
Copy link

alexmyczko commented Aug 20, 2022

I read about that "discord", but no clue what it is? URL? ah https://discord.gg/chKreEmXw6 thanks for the explanation

discord has never worked for me, can't join, invalid invite code, my account is not working, whatever. is there a matrix room, or irc channel for this?

@bobsayshilol
Copy link
Author

discord has never worked for me, can't join, invalid invite code, my account is not working, whatever. is there a matrix room, or irc channel for this?

I don't believe so. If it's not mentioned in the repo README or the youtube video then it's probably not a thing.

@MacSlash
Copy link

MacSlash commented Sep 5, 2022

I'm trying to ask about adding an IRC / Matrix channel rn, I'll link the Matrix if it gets added

@MacSlash
Copy link

MacSlash commented Sep 6, 2022

Okay well I was given permission to create my own Matrix channel to discuss it, at address #unofficial-engine-sim:matrix.org

@TheFGFSEagle
Copy link

TheFGFSEagle commented Sep 6, 2022

So does this compile on Linux in way yet ? Seen your demo video on YouTube … you made an incredible program, really. Great work, and don't ever let yourself discourage by some "would-like-to-be"-expert-reddit users ! ;)

@bobsayshilol bobsayshilol force-pushed the gcc-fixes branch 3 times, most recently from e3073af to 36f4e97 Compare September 11, 2022 16:47
ange-yaghi and others added 15 commits September 30, 2022 07:56
constexpr is for values known at compile time so there's no reason for
these to be extern since they can't be defined externally.
These work on all platforms rather than \ which only works on Windows.
I'm not 100% sure why GCC wants this but it has something to do with
aggregate initialisation (= {}) and default values for members.
This is never called and GCC warns that the Type template on the method
conflicts with the Type template on the class.
GCC picks up the static_assert(false) even if the template isn't
instantiated, and =delete-ing the method has the same effect of
notifying the caller if it's not specialised later in this header.

Also remove extraneous extern that GCC doesn't like.
These are presumably pulled in by other stdlib headers on Windows.
start() is a function so this check was wrong, however it looks like
this method is never called so it's probably not been an issue.
powf() is a C function but std::pow() is the thin C++ wrapper that
delegates to pow(), powf(), or powl() dependent on argument type.
Most of these are already acting on floats, and those that aren't have
been fixed up to do so.
This currently links to a prebuilt Windows library which we can't use
on Linux.
This allows the code to build since it brings in fixes that those
submodules need merging.
@bobsayshilol
Copy link
Author

Replaced by #346 which is more feature complete.

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.

5 participants