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

Build failed on x64 #23

Open
caxapexac opened this issue Sep 11, 2022 · 7 comments
Open

Build failed on x64 #23

caxapexac opened this issue Sep 11, 2022 · 7 comments

Comments

@caxapexac
Copy link

caxapexac commented Sep 11, 2022

Library is making an assumtions that sizeof(size_t) == sizeof(unsigned int) (i.e. SPK_Group::373) which isn't true on x64 (sizeof(size_t) == 8)

Fixed by adding
TYPE_SIZE_T,
into SPK_Types::61
and
spk_basetype( size_t, TYPE_SIZE_T, meta::PassByValue );
into SPK_Types::308

But its still won't build because of some kind of error in SPK::meta::Counter (its using sizeof inside contrution of type system so Im almost sure this is the root of the problem). Anybody came with the soultion?

Error sample:
spk_attribute(bool, loop, enableLooping, isLoopingEnabled); (SPK_GraphInterpolator::244)

error: redefinition of 'spkAttr<((sizeof (_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>'
            struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SPK_GraphInterpolator.h:422:20: note: previous definition is here
            struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
                   ^
SPK_GraphInterpolator.h:464:119: error: class member cannot be redeclared
            static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((
                                                                                                                      ^
SPK_GraphInterpolator.h:427:119: note: previous declaration is here
            static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((
@caxapexac
Copy link
Author

caxapexac commented Sep 11, 2022

Btw #18
with a bit different solution of size_t

@caxapexac
Copy link
Author

@kingscallop do you have an working x64 branch?

@caxapexac
Copy link
Author

caxapexac commented Sep 11, 2022

Found promising forks:
https://github.com/gitLongjie/SPARK - changed size_t to unsigned int
https://github.com/fredakilla/SPARK - seems like huge changes

@kingscallop
Copy link
Contributor

kingscallop commented Sep 11, 2022

Hi @caxapexac,
This branch should work: https://github.com/kingscallop/SPARK/tree/spark2-ks-all-patches
It has all the patches I submitted upstream. The readme has instructions on how to build.

@caxapexac
Copy link
Author

caxapexac commented Sep 11, 2022

@kingscallop yeah thanks, applying almost all of your PRs (with additional changing all size_t to unsigned int) fixed the build issues
What about https://github.com/fredakilla/spkgen? Have you tried it out? Is it the decent one?

@kingscallop
Copy link
Contributor

@caxapexac Hi, that fork is based on an old version, before some rather big changes to the codebase made by Synxis. So I don't really know what features it lacks, or what bugs that fork might have. From what I can remember when last I tried it, it doesn't work on all platforms. I think Linux works at least. More than that I really don't know, sorry. By the way, the branch 'spark2-ks-all-patches' should work out of the box without any extra patches.

@caxapexac
Copy link
Author

@kingscallop I mean visual node editor for this library, which is the most actual (if something except spkgen exists)?

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

No branches or pull requests

2 participants