the-synister / the-source

It has the source code of the synister!
https://the-synister.github.io
GNU General Public License v3.0
280 stars 33 forks source link

Linux support #5

Open davephillips opened 8 years ago

davephillips commented 8 years ago

Greetings,

Just a note to say thanks for Synister, and that I've successfully compiled the plugin for Linux. I used the included plugin jucer file to create the Linux makefile, set the header paths, and update the Juce modules. The build will fail with errors regarding a missing Synthparams.h. UNIX/Linux is picky about capitalization, changing the name to SynthParams.h solved that problem. Also had to change the capitalization for modSourceBox.h in ModSourceBox.cpp.

I had to change this stuff too:

Compiling EnvelopeCurve.cpp ../../../gui/EnvelopeCurve.cpp: In member function ‘virtual void EnvelopeCurve::paint(juce::Graphics&)’: ../../../gui/EnvelopeCurve.cpp:156:126: error: cannot call constructor ‘juce::Line::Line’ directly [-fpermissive] grid.addLineSegment(Line< float >::Line(0.f, static_cast(getHeight() / 2), width, static_cast(getHeight() / 2)), 1.f); ^ ../../../gui/EnvelopeCurve.cpp:156:126: note: for a function-style cast, remove the redundant ‘::Line’

I followed the compiler's advice, removed the redundant ::Line, and that solved the problem. The same error occurs in a few other files, the same change fixed the problem.

I used the VST 2.4 SDK.

I tested the plugin in Bitwig 1.3.6 for Linux. Instantiation was trouble-free, as was the plugin's exit status. I loaded and played briefly with some patches from the source code. I hope you'll be happy to learn that everything worked as expected. I'll continue my tests today and will report any problems.

Please let me know if you want/need a more detailed report.

Nice synth, thank you for making it an open-source project.

Best regards,

Dave Phillips

juanecabellob commented 8 years ago

Hey Dave,

we are glad that you liked it! We are definitely interested on expanding the support to Linux! Are you willing to create a pull request? Please stick to our given folder hierarchy (put everything of Linux into plugin/Builds/Linux and standalone/Builds/Linux).

Best regards

rghvdberg commented 8 years ago

This is awesome +1

davephillips commented 8 years ago

Greetings,

My apologies for the late reply, I'm rather swamped with work these days. I'm interested in helping out, will look into how to make the pull request.

Best,

dp

On 03/20/2016 05:55 PM, juanecabellob wrote:

Hey Dave,

we are glad that you liked it! We are definitely interested on expanding the support to Linux! Are you willing to create a pull request? Please stick to our given folder hierarchy (put everything of Linux into plugin/Builds/Linux and standalone/Builds/Linux).

Best regards

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/the-synister/the-source/issues/5#issuecomment-199039477

knobster commented 8 years ago

thats great. looking forward to test it

rghvdberg commented 7 years ago

build it myself had to edit almost every file cause it couldn't find the header files in audio/inc and some other places don't know if I should've edited some file so that each of these would've been found automatically.

rghvdberg commented 7 years ago

Never mind. Didn't set the header search paths.

juanecabellob commented 7 years ago

How is this going? Have you been able to create the Linux binaries?

rghvdberg commented 7 years ago

Yup, all working well. Not thoroughly tested yet but it works.

juanecabellob commented 7 years ago

How did you do it? Could you make a pull request with the Linux binaries?

rghvdberg commented 7 years ago

Cloned the repo Configure Juce Build Done.

No need to edit any source files.

Op 2 aug. 2016 12:46 schreef "juanecabellob" notifications@github.com:

How did you do it? Could you make a pull request with the Linux binaries?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/the-synister/the-source/issues/5#issuecomment-236869558, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNuhzpXZO8yiPHJHeriEFwUm2SScaHLks5qbyAggaJpZM4H0pHt .

rghvdberg commented 7 years ago

Oh wait pull request... I'm very new to git so I don't really know how that works.

Op 2 aug. 2016 12:46 schreef "juanecabellob" notifications@github.com:

How did you do it? Could you make a pull request with the Linux binaries?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/the-synister/the-source/issues/5#issuecomment-236869558, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNuhzpXZO8yiPHJHeriEFwUm2SScaHLks5qbyAggaJpZM4H0pHt .

juanecabellob commented 7 years ago
  1. Fork the repository synister (not this one)
  2. Clone the forked repository
  3. Under the folder 1.0.2, mkdir linux
  4. Copy the binaries there.
  5. cd into linux folder and git add .
  6. commit that, push it and there should be a Pull request offer from Github

Tell me if that worked for you

rghvdberg commented 7 years ago

Will do

Op 2 aug. 2016 14:11 schreef "juanecabellob" notifications@github.com:

  1. Fork the repository synister (not this one)
  2. Clone the forked repository
  3. Under the folder 1.0.2, mkdir linux
  4. Copy the binaries there.
  5. cd into linux folder and git add .
  6. commit that, push it and there should be a Pull request offer from Github

Tell me if that worked for you

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/the-synister/the-source/issues/5#issuecomment-236885465, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNuh2RoTThlQEalnW9GcZBlCYAauzwdks5qbzP0gaJpZM4H0pHt .

suhr commented 7 years ago

Any update?

juanecabellob commented 7 years ago

@rghvdberg did you make it work out? If not I will have a look to create the binaries for linux

mahal-tu commented 7 years ago

@juanecabellob that would be great! I think the main issues are mixed up casing in some of the #include directives. Win and Mac are more forgiving than Linux in that domain ;-)

rghvdberg commented 7 years ago

Sorry man, still need to do this. I'm no developer but I assure you I had it compiled and works perfect on Linux. I'll try soon the fork thing mentioned above. Nice learning experience. Also ask some buddies to test it because this would be a cool synth for a One Synth Challenge. If that happens be ready for a lot of bug reports because these projects stress plugins to the max!

rghvdberg commented 7 years ago

ok, let's see if I did it right

suhr commented 7 years ago

Both synister32.so and synister64.so are invisible for Carla, but synister32.so works in Bitwig.

rghvdberg commented 7 years ago

I've set up a virtual ubuntu 16.04 machine to compile the binaries also forked the-source because I needed to edit some stuff (see first post) made a linux branch :-)

suhr commented 7 years ago

Neither Carla nor Bitwig can see it now. Btw, it's the second VST I know Carla can't see.

cast @falkTX

rghvdberg commented 7 years ago

new compile on the x32

carla-single linux64 vst2 /path/to/synister_x64.so

carla-single linux32 vst2 /path/to/synister_x32.so

suhr commented 7 years ago

Carla plugin bridge for the requested arch (posix64) does not exist

There's absolutely no documentation about how to compile Carla with posix64.

falkTX commented 7 years ago

just remove the 'linux64' option if that's your native architecture.

rghvdberg commented 7 years ago

Oops, my bad. Just use "native" instead of "linux64".

Op 3 mrt. 2017 16:43 schreef "Сухарик" notifications@github.com:

Carla plugin bridge for the requested arch (posix64) does not exist

There's absolutely no documentation about how to compile Carla with posix64.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/the-synister/the-source/issues/5#issuecomment-283987748, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNuh4UYQIGYUlOMfbdorYZrI6ClySasks5riDUIgaJpZM4H0pHt .

suhr commented 7 years ago

Then it just doesn't work.

Plugin failed to load, error was:
Invalid internal plugin
falkTX commented 7 years ago

using discovery will tell you the reason, like this: /usr/lib/carla/carla-discovery-native vst /path/to/synister_x64.so

suhr commented 7 years ago

~carla-discovery::error::.vst/synister_x64.so: invalid ELF header~

Sorry, my wrong. It's actually

carla-discovery::error::/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by .vst/synister_x64.so)
rghvdberg commented 7 years ago

Gonna try building lv2 soon.

Op 3 mrt. 2017 16:50 schreef "Filipe Coelho" notifications@github.com:

using discovery will tell you the reason, like this: /usr/lib/carla/carla-discovery-native vst /path/to/synister_x64.so

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/the-synister/the-source/issues/5#issuecomment-283989793, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNuh0F1K5D1BL3Nuze_2cD4AcnbsPEsks5riDa1gaJpZM4H0pHt .

davephillips commented 7 years ago

Apologies for not joining in sooner. I can't add much in the way of git-oriented work, but I wanted to let you know that I'm using it Bitwig 2.0. I edited the Makefile to get a Release build, that killed the xruns I was getting from the Debug build. I've run a couple of instances at once, but I'll give it more of a stress test later. Btw, that Sequence Generator is pretty cool. :)

rghvdberg commented 7 years ago

@suhr : what distro are you on ? Googled a bit and I think you have a different (older) libstc++

@davephillips could you test my binaries ? (still Debug versions) https://github.com/rghvdberg/synister/tree/master/1.0.2/linux and thanks for pointing be to that CONFIG=Debug will make new binaries soon

suhr commented 7 years ago

@rghvdberg Gentoo.

I think you have a different (older) libstc++ could you test my binaries ? (still Debug versions)

I switched to a newer GCC, and now this happens:

% /usr/lib/carla/carla-discovery-native vst .vst/synister_x64.so
JUCE v4.3.1
zsh: illegal hardware instruction  /usr/lib/carla/carla-discovery-native vst .vst/synister_x64.so

Some gdb output:

Program received signal SIGILL, Illegal instruction.
0x00007ffff360add2 in juce::AffineTransform::AffineTransform (this=0x7ffff3f2f6f0 <juce::AffineTransform::identity>) at ../../../../../JUCE/modules/juce_graphics/geometry/juce_AffineTransform.cpp:27
27  ../../../../../JUCE/modules/juce_graphics/geometry/juce_AffineTransform.cpp: Нет такого файла или каталога.
(gdb) bt
#0  0x00007ffff360add2 in juce::AffineTransform::AffineTransform (this=0x7ffff3f2f6f0 <juce::AffineTransform::identity>) at ../../../../../JUCE/modules/juce_graphics/geometry/juce_AffineTransform.cpp:27
#1  0x00007ffff368702c in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at ../../../../../JUCE/modules/juce_graphics/geometry/juce_AffineTransform.cpp:83
#2  0x00007ffff36870fe in _GLOBAL__sub_I_juce_graphics.cpp(void) () at ../../../../../JUCE/modules/juce_graphics/juce_graphics.cpp:164
#3  0x00007ffff7de94ca in call_init (l=<optimized out>, argc=argc@entry=3, argv=argv@entry=0x7fffffffdf78, env=env@entry=0x7fffffffdf98) at dl-init.c:72
#4  0x00007ffff7de9625 in call_init (env=0x7fffffffdf98, argv=0x7fffffffdf78, argc=3, l=<optimized out>) at dl-init.c:126
#5  _dl_init (main_map=main_map@entry=0x661830, argc=3, argv=0x7fffffffdf78, env=0x7fffffffdf98) at dl-init.c:120
#6  0x00007ffff7dedc38 in dl_open_worker (a=a@entry=0x7fffffffdb40) at dl-open.c:564
#7  0x00007ffff7de9353 in _dl_catch_error (objname=objname@entry=0x7fffffffdb30, errstring=errstring@entry=0x7fffffffdb38, mallocedp=mallocedp@entry=0x7fffffffdb2f, operate=operate@entry=0x7ffff7ded850 <dl_open_worker>, 
    args=args@entry=0x7fffffffdb40) at dl-error.c:187
#8  0x00007ffff7ded2c4 in _dl_open (file=0x7fffffffe391 ".vst/synister_x64.so", mode=-2147483646, caller_dlopen=0x403d0b, nsid=-2, argc=<optimized out>, argv=<optimized out>, env=0x7fffffffdf98) at dl-open.c:649
#9  0x00007ffff7bd7086 in dlopen_doit (a=a@entry=0x7fffffffdd70) at dlopen.c:66
#10 0x00007ffff7de9353 in _dl_catch_error (objname=0x65cae0, errstring=0x65cae8, mallocedp=0x65cad8, operate=0x7ffff7bd7020 <dlopen_doit>, args=0x7fffffffdd70) at dl-error.c:187
#11 0x00007ffff7bd7650 in _dlerror_run (operate=operate@entry=0x7ffff7bd7020 <dlopen_doit>, args=args@entry=0x7fffffffdd70) at dlerror.c:163
#12 0x00007ffff7bd7121 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
#13 0x0000000000403d0b in ?? ()
#14 0x00007ffff6baafb0 in __libc_start_main (main=0x403c00, argc=3, argv=0x7fffffffdf78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf68) at ../csu/libc-start.c:289
#15 0x00000000004053e9 in ?? ()

PS: “Нет такого файла или каталога” = “No such file or directory”

suhr commented 7 years ago

How do I compile it myself?

rghvdberg commented 7 years ago

Basically download juce from juce.com

Git clone my fork of the-source

Donwload the vst sdk from Steinberg.

Configue Projucer so that it knows where to find the SDK

Go to the Linux makefile and run make.

I can make a detailed how-to on my GitHub if you like.

Op 5 mrt. 2017 06:14 schreef "Сухарик" notifications@github.com:

How do I compile it myself?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/the-synister/the-source/issues/5#issuecomment-284197492, or mute the thread https://github.com/notifications/unsubscribe-auth/AKNuhxj9OV02UgH3Q4-XpkWRrw9FPBA9ks5rig2HgaJpZM4H0pHt .

suhr commented 7 years ago

Ok, it compiles just fine. Though there should be a way to make it compile with just one command, without external JUCE and Projucer.

davephillips commented 7 years ago

@rghvdberg Your binaries don't work here: $ ldd synister_x64.so ./synister_x64.so: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./synister_x64.so)

Ditto for the 32-bit version. Sorry, my system is too old - Fedora 21 - and I've been lazy about upgrading.

juanecabellob commented 7 years ago

I haven't had the time yet to take a closer look into this matter. As soon as I get some time I will test the linux binaries myself as well, but in the next coming days doesn't seem realistic to say I would get it done. Anyways, thanks for the binaries @rghvdberg!

@suhr JUCE is a core dependency of synister and compilation without it is not possible nor considered to take it out. It is possible to make a build script though that fetches the dependencies if not found to remove the "extra" work. I'll open an issue for this matter.

suhr commented 7 years ago

JUCE is a core dependency of synister and compilation without it is not possible nor considered to take it out.

Look at Helm and Dexed, they use JUCE but compile just fine without external JUCE.

juanecabellob commented 7 years ago

My bad, overlooked the word external. As I haven't tried it myself to compile it under linux cannot certainly say what is going on. For OSX and Windows it works without external JUCE, so yes, it should work without any external JUCE.