sigviewer icon indicating copy to clipboard operation
sigviewer copied to clipboard

64bit build for Windows

Open cbrnr opened this issue 7 years ago • 24 comments

We have 64bit builds for Linux and macOS, but currently we only have 32bit Windows binaries. We should really try to build a 64bit binary also on Windows, because right now this severely limits the capability of opening large files (and this problem seems to occur already with files around 1GB, which are common file sizes for XDF files).

cbrnr avatar Mar 20 '17 08:03 cbrnr

@cbrnr I looked into the Qt source, however in the README it suggests mingw32-make?

2017-03-20 16 _li

Yida-Lin avatar Mar 21 '17 01:03 Yida-Lin

Ideally, we should use the Visual C version, because this is available in 64bit. Have you tried if this works? I know that if you disable the external dependencies (i.e. comment out everything that uses them), SigViewer compiles with VC. We can build libxdf with VC (this should work, right?), but we cannot do this for libbiosig, but maybe the binary built with mingw works with VC as well?

cbrnr avatar Mar 21 '17 08:03 cbrnr

@cbrnr I agree that a 64 bit build for Windows is a must. Since MinGW is not available for 64 bit I agree we should try VC. But the result will hence not support any format other than XDF. How do we wanna handle this? Do we say this is a Windows 64bit Special Deluxe Edition? :)

Update: I think last year I tried using the binaries directly in VC SigViewer project but it didn't work at all. There are some duplicate definitions in biosig.h, colliding with something defined by microsoft. I can later try again though when I get time.

Yida-Lin avatar Mar 30 '17 04:03 Yida-Lin

Having a special Windows 64-bit XDF-only edition is the worst option, but definitely better than no 64-bit at all. After all, XDF files tend to be larger than other file types, so at least this would make some sense.

The second best option is to use MinGW-w64 to create a 64-bit Windows app. This is also the most feasible and realistic option IMO. This site has a lot of general information, and I take it that this binary installer could be used. The next step is to build Qt from scratch, this might cause some headaches, but I'm sure others have done it before and documented it.

The third option is to cross-compile a 64-bit Windows binary on a Linux system. I have never done that before, so some reading up is required, but this should be no problem. Although this produces the desired binary, it is difficult for other people to replicate (because Windows people will want to build SigViewer on Windows).

The fourth, least realistic but best option is to try to build libbiosig with VC. This would enable us to build SigViewer with VC, which is the default toolchain on Windows and most people will be familiar with it. However, I'm afraid that libbiosig uses lots of GCC-specific stuff - but who knows, if you have time it would be nice to get an idea how much work this really is.

In summary, I'd go with option 2 or 3. My gut feeling tells me that option 3 is the least effort, but without exploring a bit it is hard to say.

cbrnr avatar Mar 30 '17 06:03 cbrnr

@cbrnr Thanks Clemens. By the way, here is a project providing pre-built Qt MingW 64 bit. Unfortunately it's a bit outdated and the newest Qt Version it provides is 5.5, which is actually not too bad. At least it is something out of box, and I think the user wouldn't feel any difference between 5.5 and 5.8. This is a short term solution.

In long term when we get time, maybe we can then look into how to build Qt 64 bit from source so that we can align SigViewer with the newest Qt Version.

Yida-Lin avatar Mar 31 '17 04:03 Yida-Lin

@cbrnr Hi Clemens,

I am trying to compile a 64bit SigViewer but apparently seems I need a 64 bit libbiosig for windows first: not sure how I can do that.

image

Using the binary downloaded from BioSig website doesn't work:

image

Yida-Lin avatar Apr 10 '17 06:04 Yida-Lin

Yes, the precompiled binary from the website depends on zlib and cholmod (from suitesparse). That's why I wanted to build libbiosig myself, because you can comment out these dependencies in the Makefile.

Can you try building libbiosig (comment lines 199 and 207 in Makefile) and see which error you get?

The second option is to install these dependencies and use the pre-built binary (not ideal because we'd need to distribute these deps with SigViewer then).

cbrnr avatar Apr 10 '17 07:04 cbrnr

@cbrnr Unfortunately still the same as last year.

I might try the second option later. We could also consider cross compile from Linux...

2017-04-10 2

Yida-Lin avatar Apr 10 '17 18:04 Yida-Lin

cf #47

cbrnr avatar Apr 25 '17 07:04 cbrnr

I managed to build a 64bit Windows executable via MXE cross-compilation. We need to test it, but we might use this method as a temporary workaround to create 64bit Windows builds. However, I don't want to be able to build a Windows app only on non-Windows platforms, so our goal should still be to build everything on Windows (preferably with VC). Again, SigViewer does compile with VC, the only problem is libbiosig.

cbrnr avatar Jul 20 '17 14:07 cbrnr

@cbrnr Hi Clemens,

I just noticed that the 64-bit build was never uploaded to the release page :)

Yida-Lin avatar Aug 16 '17 16:08 Yida-Lin

Yes, I know. It will be available from 0.6.2. I think we're ready, right?

cbrnr avatar Aug 16 '17 17:08 cbrnr

@cbrnr Except I really wanted to include the auto-updater! I think somebody posted a very good idea, that you can use Qt Installer Framework internally without launching its GUI, which I thought is a fantastic idea. Haven't got a chance to try that yet though.

Yida-Lin avatar Aug 16 '17 17:08 Yida-Lin

Do you know when you will release the 0.6.2 win10 64bit binary? I am eager to use it as we are soon piloting a new eeg study in order to check our LSL setup.

LenaHdk avatar Jan 03 '18 08:01 LenaHdk

@LenaHdk I will send you a pre-release 64bit binary when I'm back in my office next Monday.

cbrnr avatar Jan 03 '18 15:01 cbrnr

Wonderful! Thank you very much!

Den 3. jan. 2018 kl. 16.21 skrev Clemens Brunner [email protected]:

@LenaHdk I will send you a pre-release 64bit binary when I'm back in my office next Monday.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

LenaHdk avatar Jan 03 '18 17:01 LenaHdk

@LenaHdk unfortunately I just trapped myself into dependency hell. It seems like some update (presumably the update of libbiosig) broke the MXE build process since I get an error now. It is also not that easy to go back to an older version (or at least I couldn't figure out how). I'm sorry about this, it is currently still really difficult to build libbiosig on Windows, and I can't promise when I manage to provide a 64bit build.

In the meantime, could you maybe try to use SigViewer on Linux or macOS? 64bit versions for these platforms have been available for quite a while.

cbrnr avatar Jan 08 '18 13:01 cbrnr

@LenaHdk Hi I have the Windows 64bit SigViewer which Clemens sent me earlier

Yida-Lin avatar Jan 08 '18 17:01 Yida-Lin

Thanks @Yida-Lin, I forgot about this file because it uses some older code base. Anyway, as expected building SigViewer on Windows turned out to be a nightmare because of libbiosig. I don't have the time to work on this in the near future.

cbrnr avatar Jan 09 '18 08:01 cbrnr

@cbrnr Yes Clemens, maybe put the 64bit in the 0.6.1 release so that people can download it as needed? I think the code is exactly inline with 0.6.1.

Yida-Lin avatar Jan 09 '18 16:01 Yida-Lin

Here is the link to SigViewer 0.6.1 Windows 64bit (the link you provided above required authentication): https://drive.google.com/file/d/0Bzq48JpOZMxLM0VvTXVKbDNvbTg/view?usp=sharing Before putting it on the release page, I have to create an installer first. This might be difficult without actually having built it now, but when I have time I'll try to work on this some more.

For now, @LenaHdk you have the official 0.6.1 64bit version without an installer. I'm not sure if it works out of the box, because you might have to install Qt first. Let me know if it worked.

cbrnr avatar Jan 10 '18 08:01 cbrnr

I finally managed to build SigViewer 0.6.1 as a 64bit Windows binary again - you can find a link to the official installer on the homepage. :tada: :balloon: :birthday:

cbrnr avatar Jan 10 '18 13:01 cbrnr

Thank you !!!!!! I just installed it and so far its running. I can see our EEG data and all the events that should be marked are listed. I really can not thank you enough! =)

LenaHdk avatar Jan 10 '18 17:01 LenaHdk

FWIW, the latest Qt release for Windows now officially supports MinGW64.

cbrnr avatar Jun 06 '19 08:06 cbrnr