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

MSVC support #3999

Open
13 of 15 tasks
lukas-w opened this issue Nov 22, 2017 · 9 comments · May be fixed by #7162
Open
13 of 15 tasks

MSVC support #3999

lukas-w opened this issue Nov 22, 2017 · 9 comments · May be fixed by #7162

Comments

@lukas-w
Copy link
Member

lukas-w commented Nov 22, 2017

Creating this issue to keep track of tasks required to make LMMS build compatible with MSVC (related to #3492). I'll try to keep this list up to date:

Because Windows provides no package management that we can use for grabbing dependencies, we'll need to find another way of making the overall build process easier.
VCPKG is gaining popularity quickly and already includes almost all of the dependencies we need. The only issue with it is that it always compiles from source, so it's not a good candidate for huge dependencies like Qt. It can be used together with the official Qt binaries though.

Edit: Maybe GitHub's "Project" feature is better for this?

@tresf
Copy link
Member

tresf commented Dec 19, 2017

I've been putting some time into investigating scoop.sh for dependencies. So far we have a working example of libsndfile, fftw and I'm working with upstream on libsamplerate.

Scoop's strategy is to use working-binaries of projects and just fetch them from whichever HTTP or FTP mirror they already offer, but place them in the user's home directory (e.g. ~/scoop/apps/libsndfile/current/).

We've successfully made cmake and pkg-config locate these libraries:

  • cmake: We're adding the relevant library folder to environmental variable CMAKE_PREFIX_PATH
  • pkgconfig: We're adding the relevant library folder to environmental variable PKG_CONFIG_PATH

I propose scoop.sh as an alternative to Hunter, as the syntax is similar to apt-get or homebrew.

# mockup
scoop install libsndfile fftw libsamplerate

The disadvantage of this approach over Hunter is the majority of the dependency mirrors need to be created and maintained whereas Hunter has the ability to build directly from source.

@lukas-w
Copy link
Member Author

lukas-w commented Jun 11, 2018

I think Vcpkg is the best candidate at the moment. I updated the issue accordingly. I'll change the wiki instructions to vcpkg as well if you don't mind, @tresf.

@tresf
Copy link
Member

tresf commented Jun 11, 2018

I'll change the wiki instructions to vcpkg as well if you don't mind, @tresf.

If it works, 👍. Does vcpkg have any pre-built binaries, or is it all downloaded and compiled? vcpkg is going to be less reliant on us maintaining packages all the time, but will likely add much more time to the compilation process.

@lukas-w
Copy link
Member Author

lukas-w commented Jul 6, 2018

Does vcpkg have any pre-built binaries, or is it all downloaded and compiled?

Unfortunately, no. Mixing official Qt binaries together with libraries provided by vcpkg appears to work fine though.

@Cangle50
Copy link

Cangle50 commented Jan 7, 2019

To make it easer to follow is it possible to update LMMS compiling instructions for Windows MSVC to better show how we should do it by today’s standards.

My concern is that my Security Suite when navigating to the msys2 download site to install the Mingw-w64 compiler (that the QT5 Qt Creator IDE doesn’t appear to provide) is blocking me.

msys2blocked

Some questions I have are.

Is msys2 still safe to use?

Is Qt 5.12.0 the best version to use right now, there appears to be a Drag and Drop issue with QT5?

Is it possible that the compatibility for Windows MSVC has gotten better, so that statements like "Warning, MSVC building is still experimental? Use with caution. Most plugins aren't available when compiling with MSVC" are no longer necessary? It feels as if we are encouraged not to use Windows MSVC for whatever reasons imho.

I am trying to teach myself how to write code and would like to use LMMS to study and learn from I realize that I have a long way to go.

Things I have done.

  1. Installed Visual Studio 2017 Community.

  2. Installed Qt Open Source version 5.12.0 64/32bit with Qt Creator.

  3. Installed CMake.

  4. Installed Git.

  5. Installed Vcpkg. I am in the process of installing fftw3
    libsamplerate libsndfile sdl2

I am working on a windows 10 64bit pc.

Sorry to ramble on I am writing this for myself and anyone else who maybe having problems following along.

@tresf
Copy link
Member

tresf commented Jan 7, 2019

My concern is that my Security Suite when navigating to the msys2 download site to install the Mingw-w64 compiler (that the QT5 Qt Creator IDE doesn’t appear to provide) is blocking me.

I strongly recommend that you contact Spectrum and challenge this claim. Msys2 is a great product.

Is msys2 still safe to use?

Unless proven otherwise, yes. Is it useful for compiling LMMS? Mostly. The build toolchain is very volatile so it's not recommended. MSVC would be a much "pure" build system at this point. Our msys2 toolchain has tools that are cloned from the Linux cross-compiler, but it's what we've been using historically. If you have success using MSVC, please use that instead and help us improve our documentation.

Is it possible that the compatibility for Windows MSVC has gotten better, so that statements like "Warning, MSVC building is still experimental? Use with caution. Most plugins aren't available when compiling with MSVC" are no longer necessary?

It's still experimental, that part is true but the warning doesn't need to be as harsh. The plugin support is getting better, so I've clarified that only some plugins aren't available with MSVC.

I am trying to teach myself how to write code and would like to use LMMS to study and learn from I realize that I have a long way to go.

Please continue to provide your feedback with the build process. For assistance, please use #techtalk channel on discord and we'll be happy to offer any help we can offer. You're welcome to chime in on this channel with wiki inaccuracies and/or fixes.

https://discordapp.com/invite/PruNxpG

@PhysSong
Copy link
Member

I just noticed SF2 player and GIG player are still MSVC incompatible due to VLAs.

fluid_voice_t * voices[poly];
unsigned int id[poly];

sampleFrame sampleData[samples];

sampleFrame convertBuf[frames];

int8_t buffer[allocationsize];

@Rossmaxx
Copy link
Contributor

Here to tell you about #6758

@Rossmaxx
Copy link
Contributor

Bump the checklist pls, and also the gig pr has changed to #7162

@Rossmaxx Rossmaxx linked a pull request May 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants