-
-
Notifications
You must be signed in to change notification settings - Fork 72
Trying to get gcc 4.9 to compile #111
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
Conversation
| class AudioBuffer { | ||
| public: | ||
| using value_type = std::remove_cv_t<Type>; | ||
| using value_type = typename std::remove_cv<Type>::type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These _t type traits are in abseil.
src/sfizz/SIMDHelpers.h
Outdated
|
|
||
| for (; i < panSize; ++i) | ||
| pan[i] = std::cos(i * (piTwo<double> / (panSize - 1))); | ||
| pan[i] = std::cos(i * (twoPi<double>() / (panSize - 1))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You introduce an error here.
src/sfizz/SfzHelpers.h
Outdated
| * @param modifier | ||
| */ | ||
| constexpr void multiplyByCents(float& base, int modifier) | ||
| void multiplyByCents(float& base, int modifier) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be inline, otherwise this function will be defined&used more than once
|
very nice! almost there. I am fixing a few things. |
|
Fixing those now, will post a patch here soon |
|
awww I fixed them too xD there were autos in lambdas too, and since I'm only setting CXX STANDARD to eleven I don't have the possible errors with |
|
I'll wait for your patch and see if it matches 🙂 |
|
some of the stuff I dont know how to handle. still working on it, but this is what I have right now: |
|
What's the issues with the |
|
Here's the patches I made if you need inspiration. If you're on it it's better that you do it since you'll have the gcc-4.9 specific errors on top of what I have. |
|
In the meanwhile I will try to propose the |
GCC thinks you want a initializer-list as the auto, which leads to errors. Thanks for the patch. I got libsfizz.so built, though with random stuff commented out that I did not know how to fix yet. |
|
this one I dont know how to fix, we need to force C99 mode for the C code. |
|
Well since the error is in the LV2 headers, you should have them somewhere. @redtide do you remember why we have the lv2 headers in-tree? Did we use something specific in a latest release? |
|
Some older LV2 distributions don't provide lv2_util. |
|
We just need a way to specify the language spec. |
|
Ok, here follows a patch, let me know if I should upload it somewhere else. |
|
In d13f10d but is it not OK? |
|
No, the following code fails: with: This is the last piece! |
|
This works, but I am not sure if it is right. |
|
Hm can you try diff --git a/src/sfizz/Logger.h b/src/sfizz/Logger.h
index d23cb61..35a851e 100644
--- a/src/sfizz/Logger.h
+++ b/src/sfizz/Logger.h
@@ -55,13 +55,13 @@ struct FileTime
struct CallbackBreakdown
{
- Duration dispatch { 0 };
- Duration renderMethod { 0 };
- Duration data { 0 };
- Duration amplitude { 0 };
- Duration filters { 0 };
- Duration panning { 0 };
- Duration effects { 0 };
+ Duration dispatch;
+ Duration renderMethod;
+ Duration data;
+ Duration amplitude;
+ Duration filters;
+ Duration panning;
+ Duration effects;
};
struct CallbackTime |
|
Your patch applies on top of ed8ba2f ? |
|
Yes. If not, I can do a PR next if we merge this one |
|
FYI the changes made to CallbackBreakdown do not work |
|
Woohoo, it is working :D 🚀 I recorded a video as demo https://nextcloud.falktx.com/s/5qcjXNKBCC8tCCg/download There is a very nasty memory leak though. in around a minute all RAM is used, and then OOM kills the webserver if I keep playing |
|
Wah, nice! Well, not the leak though... |
cmake/SfizzConfig.cmake
Outdated
| if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND (CMAKE_CXX_STANDARD LESS 14 OR NOT CMAKE_CXX_STANDARD)) | ||
| # There is a strange segfault in clang in c++11 when instantiating the | ||
| # envelopes in FloatEnvelopes.cpp. | ||
| message("Forcing C++14 to bypass a clang segfault") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upgrade the xcode version instead?
(and keep back the deployment target version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can try but I'm not sure. It also crashes the default clang on my machine (ubuntu 19.10). It's a really weird bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And with LTO disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fails at compile time so I guess LTO is not the issue here. I will start by trying to actually downgrade XCode to use the default Travis one and we'll see what happens :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, either downgrading or upgrading... I guess I should file a compiler bug report :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you should, but also, try replacing.
std::function<Type(Type)> function { [](Type input) { return input; } };
with
std::function<Type(Type)> function { [](Type input) -> Type { return input; } };
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holy shit, nice catch lol
|
This is very cool, the plugin builds without any issues now! |
|
Some unused args are actually WIP for unrelated things so I did not spend too much effort on these, I have to admit 🙂 |
You can remove the default move/copy guys but I suspect that in this case the objects will never be moved in the queue but copied.
use the default XCode
For now it's more C++11 compatibility. For reference from #110 here is @falkTX patch with some of the
[[fallthrough]]and[[maybe_unused]]things to remove too!