New msi installer (Windows/msys2)

32 views
Skip to first unread message

Albert Graef

unread,
Feb 22, 2018, 5:42:14 PM2/22/18
to pure...@googlegroups.com
Hi everybody,

Spring cleaning comes a bit early this year. :) My old virtual winxp build system was getting a bit long in the tooth (ancient msys+mingw, 32 bit only), so I now set up a new one based on Windows 10 and msys2 (http://www.msys2.org/), and created a new one-click msi installer which now installs into an existing msys2/mingw32 environment. More information is on this new wiki page here: https://github.com/agraef/pure-lang/wiki/PureOnWindows

I know that most of you guys on Windows 10 are probably developing using the Linux subsystem now, but I think that there's still some value in a Windows-native port of Pure. In any case I also needed this for my students so that they can run pd-pure and pd-faust in Pd, so there it is now. As usual, bug reports are appreciated. :)

BTW, this is still a 32 bit build, but now that I have everything in msys2 there shouldn't be any major roadblocks preventing compilation with mingw64.

The only remaining issue with 64 bit on Windows is that pesky libglob library. I currently only have a 32 bit version of that (pilfered from my old build system). Still need to find a stand-alone version, preferably one that compiles cleanly with both mingw32 and mingw64 so that I can just add it to the Pure source. (Gnulib is not an option as it pulls in most of Gnulib if I just want to build that one little library.) If anyone more in the know on Windows has an idea on this, I'd like to hear about it!

Cheers,
Albert

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  agg...@gmail.com
WWW:    https://plus.google.com/+AlbertGraef

Kurt Pagani

unread,
Feb 22, 2018, 6:04:42 PM2/22/18
to pure...@googlegroups.com
Thanks Albert, very useful (although I'm using Pure 0.66 -x86_64-unknown-cygwin
on Win, I know many who'll be glad getting a native version).

Do you mean this one? -> https://github.com/voidlinux/libglob

Just in case, this one works (used it in Python, interfacing an old lib):

kfp@NUC MSYS ~/libglob
$ make
cc -fPIC -c glob.c -o glob.o
cc glob.o -shared -Wl,-soname,libglob.so.0 -o libglob.so.0.0.0
ar rcs libglob.a glob.o
ranlib libglob.a

kfp@NUC MSYS ~/libglob
$ uname -a
MSYS_NT-6.1 NUC 2.9.0(0.318/5/3) 2017-09-13 23:16 x86_64 Msys

CONFORMING TO POSIX.1-2001, POSIX.1-2008, POSIX.2
Greetings
Kurt
> Email:  agg...@gmail.com <mailto:agg...@gmail.com>
> WWW:    https://plus.google.com/+AlbertGraef
>
> --
> You received this message because you are subscribed to the Google Groups
> "pure-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pure-lang+...@googlegroups.com
> <mailto:pure-lang+...@googlegroups.com>.
> To post to this group, send email to pure...@googlegroups.com
> <mailto:pure...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/pure-lang.
> For more options, visit https://groups.google.com/d/optout.

Jiri Spitz

unread,
Feb 22, 2018, 6:45:21 PM2/22/18
to pure...@googlegroups.com, Albert Graef

Hi Albert,

The shell script in the attached zip file builds a working 64 bit libglob.dll under MSYS2 (just ignore the warnings).

I tried to build 64 bit Pure under MSYS2 several times. It builds successfully, but some tests are still failing. I use it, because I need 64 bit ODBC drivers, but I cannot use some features.

Jiri


Dne 22.2.2018 v 23:42 Albert Graef napsal(a):
--
You received this message because you are subscribed to the Google Groups "pure-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pure-lang+...@googlegroups.com.
To post to this group, send email to pure...@googlegroups.com.




Avast logo

Tato zpráva byla zkontrolována na viry programem Avast Antivirus.
www.avast.com


glob.zip

Albert Graef

unread,
Feb 23, 2018, 6:46:32 AM2/23/18
to pure...@googlegroups.com
On Fri, Feb 23, 2018 at 12:04 AM, Kurt Pagani <nil...@gmail.com> wrote:
> Do you mean this one? -> https://github.com/voidlinux/libglob

Thanks, but that's the BSD version which lacks fnmatch() and some of
the other extra GNU features. But thankfully Jiri has already come to
the rescue. :)

BTW, Kurt, do you have the pure-texmacs plugin running in cygwin? I
vaguely recall that there was some issue with it in the mingw32 build,
so I didn't include this in the new one-click installer. But maybe I
should try again on Win10 now.

Albert

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email: agg...@gmail.com
WWW: https://plus.google.com/+AlbertGraef

Albert Graef

unread,
Feb 23, 2018, 6:58:35 AM2/23/18
to Jiri Spitz, pure...@googlegroups.com
On Fri, Feb 23, 2018 at 12:45 AM, Jiri Spitz <jiri....@gmail.com> wrote:
The shell script in the attached zip file builds a working 64 bit libglob.dll under MSYS2 (just ignore the warnings).

Jiri, thanks a bunch! :) I added a Makefile, will throw that up later somwehere on BB or GH so that people who want to build Pure on Windows can find it.

I tried to build 64 bit Pure under MSYS2 several times. It builds successfully, but some tests are still failing. I use it, because I need 64 bit ODBC drivers, but I cannot use some features.

Yeah, I remember that now, it's this old issue here: https://bitbucket.org/purelang/pure-lang/issues/10. I've now opened a new ticket at GH over here:https://github.com/agraef/pure-lang/issues/16, so that I can have another go at it during the semester holidays. We're so close -- there just ought to be a way to make it work in mingw64.

Other than that, has anyone tried running Pure in Win10's new Linux subsystem? Does it offer the same kind of integration with native Windows as msys/mingw does? Then that might be a viable alternative.

Albert

Dne 22.2.2018 v 23:42 Albert Graef napsal(a):
Hi everybody,

Spring cleaning comes a bit early this year. :) My old virtual winxp build system was getting a bit long in the tooth (ancient msys+mingw, 32 bit only), so I now set up a new one based on Windows 10 and msys2 (http://www.msys2.org/), and created a new one-click msi installer which now installs into an existing msys2/mingw32 environment. More information is on this new wiki page here: https://github.com/agraef/pure-lang/wiki/PureOnWindows

I know that most of you guys on Windows 10 are probably developing using the Linux subsystem now, but I think that there's still some value in a Windows-native port of Pure. In any case I also needed this for my students so that they can run pd-pure and pd-faust in Pd, so there it is now. As usual, bug reports are appreciated. :)

BTW, this is still a 32 bit build, but now that I have everything in msys2 there shouldn't be any major roadblocks preventing compilation with mingw64.

The only remaining issue with 64 bit on Windows is that pesky libglob library. I currently only have a 32 bit version of that (pilfered from my old build system). Still need to find a stand-alone version, preferably one that compiles cleanly with both mingw32 and mingw64 so that I can just add it to the Pure source. (Gnulib is not an option as it pulls in most of Gnulib if I just want to build that one little library.) If anyone more in the know on Windows has an idea on this, I'd like to hear about it!

Cheers,
Albert

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  agg...@gmail.com
WWW:    https://plus.google.com/+AlbertGraef
--
You received this message because you are subscribed to the Google Groups "pure-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pure-lang+unsubscribe@googlegroups.com.

To post to this group, send email to pure...@googlegroups.com.
Visit this group at https://groups.google.com/group/pure-lang.
For more options, visit https://groups.google.com/d/optout.




Avast logo

Tato zpráva byla zkontrolována na viry programem Avast Antivirus.
www.avast.com


Jiri Spitz

unread,
Feb 23, 2018, 7:18:52 AM2/23/18
to Albert Graef, pure...@googlegroups.com
Hi everybody,

Win10's Linux subsystems supports only command line programs (no
Xserver, no daemons at all). Some programs can use Xserver installed on
Windows (e. g. Xming) - it depends on set of features supported by the
Linux subsystem. The programs are real Linux binaries. They can access
Windows filesystem, can access the network, but otherwise they cannot
share anything with Windows. Pure compiles and runs without any glitches
and can use addons, provided that they are compiled under the Linux
subsystem.

Jiri

Dne 23.2.2018 v 12:58 Albert Graef napsal(a):

Albert Graef

unread,
Feb 23, 2018, 7:46:38 AM2/23/18
to Jiri Spitz, pure...@googlegroups.com
Ok, thanks for clarifying this. So that's not a drop-in replacement
for a native x86_64 port by any stretch.

One idea would be to try clang instead, maybe it does C++ exception
handling in a way that doesn't interfere with Pure. I think that clang
is readily available in msys2/mingw64, so that's what I'm going to try
next.

Albert

John Cowan

unread,
Feb 23, 2018, 11:15:39 AM2/23/18
to pure...@googlegroups.com, Albert Graef
On Fri, Feb 23, 2018 at 7:18 AM, Jiri Spitz <jiri....@gmail.com> wrote:
Hi everybody,

Win10's Linux subsystems supports only command line programs (no Xserver, no daemons at all). Some programs can use Xserver installed on Windows (e. g. Xming) - it depends on set of features supported by the Linux subsystem. The programs are real Linux binaries. They can access Windows filesystem, can access the network, but otherwise they cannot share anything with Windows. Pure compiles and runs without any glitches and can use addons, provided that they are compiled under the Linux subsystem.

In the latest release, Windows programs can be executed by the subsystem (so you can create, for example, pipelines with mixed Cygwin or native Windows and Linux programs), but you cannot mix Windows and Linux object files or libraries in the linker.  Something else you cannot do is run 32-bit Linux programs: unlike the actual Linux kernel, the pseudo-kernel does not (and never will, Microsoft has said so) support 32-bit executables.  This is an annoyance to me because I need to run some compilers that have not been updated to generate x86_64 code.  I have to use the Windows version of the compiler and then run the compiled Windows program from Linux as explained above.

I have had no problems running arbitrary X clients against the Cygwin X server.  You just have to make sure that X configuration is set appropriately to use TCP/IP rather than the default Unix sockets, and that the permissions are set on the server side to allow connections from 127.0.0.1.  You can for example run the Cygwin and Linux versions of xclock at the same time and watch them tick in unison.  The standard Linux daemon infrastructure does not work, but you can start a daemon from .bash_login, which is run the first time you open a Linux window.  However, if you close all Linux windows, it will be killed mercilessly.

 

Kurt Pagani

unread,
Feb 23, 2018, 2:29:55 PM2/23/18
to pure...@googlegroups.com


./configure --with-llvm-version=4.0 --with-static-llvm --disable-shared
--with-texmacs
Pure 0.66 is now configured for LLVM 3.5.2 on x86_64-unknown-cygwin.
Source directory: .
Installation prefix: /usr/local
Versioned install: no
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
Linker: g++ -rdynamic -liconv -lm -lmpfr -lgmp
LLVM tool prefix:
Readline support: -lreadline
Perl regex support: no (use --with-pcre to enable)
POSIX threads: -pthread
Build libpure: no
fastcc/TCO support: yes
Now run 'make' to build everything, and 'make install' to install this
software on your system. To remove the installed software at a later
time use the 'make uninstall' command.


$ make install
for x in /usr/local/bin /usr/local/lib/pkgconfig /usr/local/include/pure
/usr/local/lib/pure /usr/local/share/man/man1; do /usr/bin/install -c -d $x; done
/usr/bin/install -c pure.exe /usr/local/bin/pure.exe
/usr/bin/install -c -m 644 pure.pc /usr/local/lib/pkgconfig/pure.pc
/usr/bin/install -c -m 644 ./runtime.h /usr/local/include/pure
/usr/bin/install -c -m 644 ./pure_main.c pure_main.o /usr/local/lib/pure
for x in ./lib/*.pure; do /usr/bin/install -c -m 644 $x /usr/local/lib/pure; done
/usr/bin/install -c -m 644 ./pure.1 /usr/local/share/man/man1/pure.1
/usr/bin/install -c -d /usr/share/emacs/site-lisp
/usr/bin/install -c -m 644 etc/pure-mode.el etc/pure-mode.elc
/usr/share/emacs/site-lisp
for x in /usr/share/TeXmacs/packages /usr/share/TeXmacs/plugins/pure/doc
/usr/share/TeXmacs/plugins/pure/progs; do /usr/bin/install -c -d $x; done
for x in packages/puredoc.ts plugins/pure/doc/pure.en.tm
plugins/pure/doc/pure-abstract.en.tm plugins/pure/doc/pure-descr.en.tm
plugins/pure/doc/pure-texmacs.en.tm plugins/pure/progs/init-pure.scm
plugins/pure/progs/pure-input.scm plugins/pure/progs/texmacs.pure; do
/usr/bin/install -c -m 644 ./texmacs/$x /usr/share/TeXmacs/$x; done

On 23.02.2018 12:46, Albert Graef wrote:
> On Fri, Feb 23, 2018 at 12:04 AM, Kurt Pagani <nil...@gmail.com> wrote:
>> Do you mean this one? -> https://github.com/voidlinux/libglob
>
> Thanks, but that's the BSD version which lacks fnmatch() and some of
> the other extra GNU features. But thankfully Jiri has already come to
> the rescue. :)

Oh, sorry, thought it were a enhanced BSD version.

>
> BTW, Kurt, do you have the pure-texmacs plugin running in cygwin? I
> vaguely recall that there was some issue with it in the mingw32 build,
> so I didn't include this in the new one-click installer. But maybe I
> should try again on Win10 now.
>
> Albert
>

Yes, works fine. I used the (trick) configure below to provoke a fallback to 3.5
/ static. BTW it works with the native Tm as well when wrapping into a CMD file.

The main reason why I'm using Pure with cygwin is the sixel graphics capability,
however, meanwhile "mintty" also works with native apps (especially useful on
Win10 with WSL: https://github.com/mintty/wsltty).

./configure --with-llvm-version=4.0 --with-static-llvm --disable-shared
--with-texmacs
Pure 0.66 is now configured for LLVM 3.5.2 on x86_64-unknown-cygwin.
Source directory: .
Installation prefix: /usr/local
Versioned install: no
C compiler: gcc -g -O2
C++ compiler: g++ -g -O2
Linker: g++ -rdynamic -liconv -lm -lmpfr -lgmp
LLVM tool prefix:
Readline support: -lreadline
Perl regex support: no (use --with-pcre to enable)
POSIX threads: -pthread
Build libpure: no
fastcc/TCO support: yes
Now run 'make' to build everything, and 'make install' to install this
software on your system. To remove the installed software at a later
time use the 'make uninstall' command.


$ make install
for x in /usr/local/bin /usr/local/lib/pkgconfig /usr/local/include/pure
/usr/local/lib/pure /usr/local/share/man/man1; do /usr/bin/install -c -d $x; done
/usr/bin/install -c pure.exe /usr/local/bin/pure.exe
/usr/bin/install -c -m 644 pure.pc /usr/local/lib/pkgconfig/pure.pc
/usr/bin/install -c -m 644 ./runtime.h /usr/local/include/pure
/usr/bin/install -c -m 644 ./pure_main.c pure_main.o /usr/local/lib/pure
for x in ./lib/*.pure; do /usr/bin/install -c -m 644 $x /usr/local/lib/pure; done
/usr/bin/install -c -m 644 ./pure.1 /usr/local/share/man/man1/pure.1
/usr/bin/install -c -d /usr/share/emacs/site-lisp
/usr/bin/install -c -m 644 etc/pure-mode.el etc/pure-mode.elc
/usr/share/emacs/site-lisp
for x in /usr/share/TeXmacs/packages /usr/share/TeXmacs/plugins/pure/doc
/usr/share/TeXmacs/plugins/pure/progs; do /usr/bin/install -c -d $x; done
for x in packages/puredoc.ts plugins/pure/doc/pure.en.tm
plugins/pure/doc/pure-abstract.en.tm plugins/pure/doc/pure-descr.en.tm
plugins/pure/doc/pure-texmacs.en.tm plugins/pure/progs/init-pure.scm
plugins/pure/progs/pure-input.scm plugins/pure/progs/texmacs.pure; do
/usr/bin/install -c -m 644 ./texmacs/$x /usr/share/TeXmacs/$x; done

Best regards
Kurt






texmacs_cyg64.png

Albert Graef

unread,
Feb 23, 2018, 4:32:41 PM2/23/18
to Jiri Spitz, pure...@googlegroups.com

On Fri, Feb 23, 2018 at 12:58 PM, Albert Graef <agg...@gmail.com> wrote:

Yeah, I remember that now, it's this old issue here: https://bitbucket.org/purelang/pure-lang/issues/10. I've now opened a new ticket at GH over here: https://github.com/agraef/pure-lang/issues/16, so that I can have another go at it during the semester holidays. We're so close -- there just ought to be a way to make it work in mingw64.

Should be fixed with rev. 088b875. Passes all tests for me now (even the notorious test020 which fails in 32 bit because of apparent msvcrt IEEE 754 incompatibilities), and the minimal test witness [1,2]!5 now properly reports an exception.

Jiri, could you please give it whirl?

Albert

Albert Graef

unread,
Feb 23, 2018, 4:40:39 PM2/23/18
to pure...@googlegroups.com
On Fri, Feb 23, 2018 at 8:30 PM, Kurt Pagani <nil...@gmail.com> wrote:
Yes, works fine. I used the (trick) configure below to provoke a fallback to 3.5
/ static. BTW it works with the native Tm as well when wrapping into a CMD file.

It doesn't work when building the libpure dll? Have you tried setting PATH or copy the dll to somewhere on PATH?

Kurt Pagani

unread,
Feb 23, 2018, 5:11:34 PM2/23/18
to pure...@googlegroups.com
On 23.02.2018 22:40, Albert Graef wrote:
> On Fri, Feb 23, 2018 at 8:30 PM, Kurt Pagani <nil...@gmail.com
> <mailto:nil...@gmail.com>> wrote:
>
> It doesn't work when building the libpure dll?

Indeed. It works with cygwin but not with cygwin64. I tried many combinations of
the 'configure' parameters (even --with-llvm-version=3.5 won't work) , it's a
mystery to me.

> Have you tried setting PATH or
> copy the dll to somewhere on PATH?
Yes, of course. There are, however, many other programs showing different
behavior on cygwin64 regarding ddl builds. But I'm pragmatic, admittedly, glad
if it goes, so I didn't dig deeper.

>
> --
> Dr. Albert Gr"af
> Computer Music Research Group, JGU Mainz, Germany

Albert Graef

unread,
Feb 23, 2018, 5:18:23 PM2/23/18
to pure...@googlegroups.com
Ok, thanks for the heads up. So it does make sense to have another
look at that some time.

BTW, kudos for running twm. I haven't seen that one in quite some
time. ;-) Actually doesn't look that much different from those flat
themes which are so popular these days, LOL.
> --
> You received this message because you are subscribed to the Google Groups "pure-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pure-lang+...@googlegroups.com.
> To post to this group, send email to pure...@googlegroups.com.
> Visit this group at https://groups.google.com/group/pure-lang.
> For more options, visit https://groups.google.com/d/optout.



--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email: agg...@gmail.com
WWW: https://plus.google.com/+AlbertGraef

Jiri Spitz

unread,
Feb 23, 2018, 7:53:33 PM2/23/18
to Albert Graef, pure...@googlegroups.com

Hi Albert,

Three test fail for me :-(. Diffs are attached. Are the log files up to date? I installed a fresh MSYS2 bundle and cloned a fresh pure-lang tree. Exceptions work well - no crashes.

Jiri


Dne 23.2.2018 v 22:32 Albert Graef napsal(a):
test.7z

Albert Graef

unread,
Feb 23, 2018, 11:19:10 PM2/23/18
to Jiri Spitz, pure...@googlegroups.com
I had intermittent failures like these as well. Try setting `export LC_ALL=C` and then `make recheck`. Does that help?

Jiri Spitz

unread,
Feb 24, 2018, 2:57:11 AM2/24/18
to Albert Graef, pure...@googlegroups.com

The failures are random with that setting. Test 042 failed for the first time , succeeded for the second. So I tried "make check" again. All tests passed in the firs run. Tests 011 and 021 failed in the repeated run.

Dne 24.2.2018 v 5:19 Albert Graef napsal(a):

Albert Graef

unread,
Feb 24, 2018, 8:36:42 AM2/24/18
to Jiri Spitz, pure...@googlegroups.com
Yeah, it's weird. Happens with mingw32, too, and even setting all the LC variables doesn't cure that. The old msys didn't have that, probably because it didn't have a locale to begin with. What I did is to completely get rid all of the locale subdirs for my language (i.e. /usr/share/locale/de and /mingw64/share/locale/de in my case), as advised here: https://stackoverflow.com/questions/9268379/non-localized-version-of-mingw. That seems to cure it. (Ran `make check` four times in a row now, all checks passed every time.)

Anyway, I've also uploaded a 64 bit version of the one-click-installer now, you can find that here: https://github.com/agraef/pure-lang/releases/download/pure-0.66/pure-mingw64.exe. Let me know how it works for you.

Albert

Albert Graef

unread,
Feb 24, 2018, 4:10:41 PM2/24/18
to Jiri Spitz, pure...@googlegroups.com
You're right, I can reproduce that, so I've reopened https://github.com/agraef/pure-lang/issues/16. Could still be that there are some Windows gremlins lurking in the abysses of the printf/scanf stuff, but as the heap is already trashed at the point it crashes, I have to concede that it looks more like an SJLG <-> C++ EH issue. And I have to say that longjmp not working is a major bummer, for *any* C/C++ compiler implementation. I consicder that a rather serious bug in the compiler.

Oh well. At least it doesn't crash all the time any more. ;-) I'm out of ideas for now, so if anyone wants to have a go at it, please report your findings at https://github.com/agraef/pure-lang/issues/16 .

I may be grasping at straws, but there's still a faint chance that gcc 8 will cure this, as I've read somewhere that it's supposed to properly support SEH. I'm not even sure what EH mechanism the mingw64 g++ 7.3.0 from msys2 uses right now. Suspiciously, there's a libgcc_s_seh-1.dll in C:\msys64\mingw64\bin which seems to indicate that SEH is in fact being used already. Maybe it's just not fully tested yet?

Albert


On Sat, Feb 24, 2018 at 3:45 PM, Jiri Spitz <jiri....@gmail.com> wrote:

No improvement :-(. I removed locales for "cs", reconfigured & recompiled and get still random fails. I even removed locales at all with almost the same result.

Repeated pure test011.pure in the "test" subdir gives randomly

either

$ pure test011.pure
test011.pure, line 2: unhandled exception 'scanf_error ()' while evaluating 'sscanf "this" "%d"'
test011.pure, line 3: unhandled exception 'scanf_error ()' while evaluating 'sscanf "this" "%g"'
test011.pure, line 5: unhandled exception 'scanf_error ()' while evaluating 'sscanf "this" "%p"'
test011.pure, line 7: unhandled exception 'scanf_error ()' while evaluating 'sscanf "this" "that"'

or

 nothing for Pure compiled with all locales and removed cs locales and Segmentation fault for Pure compiled without any locales.

It seems, it has stil something to do with exception handling.

Jiri

Dne 24.2.2018 v 14:36 Albert Graef napsal(a):

Albert Graef

unread,
Feb 26, 2018, 5:21:57 AM2/26/18
to pure...@googlegroups.com
Some more good news: pure-gtk and gnocl are working and included in the (32 bit) installer now, cf. https://github.com/agraef/pure-lang/wiki/PureOnWindows#gtk-and-gnocl.

Eddie, I remember that you had issues with getting pure-gtk to work on Windows with the old installer. (Which wasn't really a big surprise -- since there wasn't a ready-to-use package for gtk in mingw back then, the old pure-gtk was really a Frankenstein monster on Windows to begin with.) Maybe you could give the new installer a go and see whether it works for you: https://github.com/agraef/pure-lang/releases/download/pure-0.66/pure-mingw32.exe (detailed install instructions are at https://github.com/agraef/pure-lang/wiki/PureOnWindows#one-click-installer).

Next up on my list is VTK, which is the best choice for doing 3D scientific visualizations in Pure via pure-tk. Unfortunately, the current version in msys2 is 8.x, but AFAICT VTK 6.3 or earlier is required to get proper Tcl packages, so I'm currently trying to build that using an earlier revision of the corresponding MINGW PKGBUILD.

Eddie Rucker

unread,
Feb 26, 2018, 8:46:45 AM2/26/18
to pure...@googlegroups.com
Thanks Albert. I will give it a whirl at lunch.
Eddie Rucker

Director of Institutional Research
Blue Mountain College

________________________________________
From: pure...@googlegroups.com <pure...@googlegroups.com> on behalf of Albert Graef <agg...@gmail.com>
Sent: Monday, February 26, 2018 4:21:54 AM
To: pure...@googlegroups.com
Subject: [pure-lang] Re: New msi installer (Windows/msys2)
Email: agg...@gmail.com<mailto:agg...@gmail.com>
WWW: https://plus.google.com/+AlbertGraef

--
You received this message because you are subscribed to the Google Groups "pure-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pure-lang+...@googlegroups.com<mailto:pure-lang+...@googlegroups.com>.
To post to this group, send email to pure...@googlegroups.com<mailto:pure...@googlegroups.com>.

Albert Graef

unread,
Feb 27, 2018, 12:42:53 PM2/27/18
to pure...@googlegroups.com
On Mon, Feb 26, 2018 at 11:21 AM, Albert Graef <agg...@gmail.com> wrote:
Next up on my list is VTK, which is the best choice for doing 3D scientific visualizations in Pure via pure-tk. Unfortunately, the current version in msys2 is 8.x, but AFAICT VTK 6.3 or earlier is required to get proper Tcl packages, so I'm currently trying to build that using an earlier revision of the corresponding MINGW PKGBUILD.

All done: https://github.com/agraef/pure-lang/wiki/PureOnWindows#gtk-gnocl-and-vtk. I had to massage the pure-tk earth example a little, though, since the vtkTkRenderWidget object needed to embed VTK rendering widgets into a Tk toplevel just segfaults on Windows, so I had to use a run-of-the-mill vtkRenderWindowInteractor there. Not quite as pretty, but it works. ;)

As noted earlier, you'll need an older VTK version with a proper collection of Tcl modules to run this. I already provided a ready-to use VTK 6.3 package and the corresponding PKGBUILD in the wiki, under the link above.

So I'd say that the latest iteration of the 32 bit installer is now in a very good shape again. Windows Pure users rejoice (and report bugs)! :)

Albert

Albert Graef

unread,
Feb 27, 2018, 12:49:01 PM2/27/18
to pure...@googlegroups.com
On Mon, Feb 26, 2018 at 2:46 PM, Eddie Rucker <eru...@bmc.edu> wrote:
Thanks Albert. I will give it a whirl at lunch.

Did you get around to this yet? How did it go?

As you mentioned that your Windows is still 32 bit (Win XP??): If you're installing under c:/mingw32 rather than c:/mingw64, then you may have to set PURELIB in bash afterwards, so that the interpreter looks for the prelude in the right location. (For the Windows command line, the installer should take care of that automagically.)

I'm not sure, though, whether the new installer will work under anything earlier than Windows Vista. Would be nice to have some feedback on this, as my virtual WinXP install has already gone the way of the dodo.

Albert

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  agg...@gmail.com

Eddie Rucker

unread,
Feb 27, 2018, 2:11:15 PM2/27/18
to pure...@googlegroups.com
They had installed 32bit Windows 10 on my old desktop. Since wiping and installing 64bit Windows 10, Msys2 and pure installed with no hitches.

Eddie Rucker

Director of Institutional Research
Blue Mountain College

________________________________________
From: pure...@googlegroups.com <pure...@googlegroups.com> on behalf of Albert Graef <agg...@gmail.com>
Sent: Tuesday, February 27, 2018 11:48:59 AM
To: pure...@googlegroups.com
Subject: Re: [pure-lang] Re: New msi installer (Windows/msys2)

On Mon, Feb 26, 2018 at 2:46 PM, Eddie Rucker <eru...@bmc.edu<mailto:eru...@bmc.edu>> wrote:
Thanks Albert. I will give it a whirl at lunch.

Did you get around to this yet? How did it go?

As you mentioned that your Windows is still 32 bit (Win XP??): If you're installing under c:/mingw32 rather than c:/mingw64, then you may have to set PURELIB in bash afterwards, so that the interpreter looks for the prelude in the right location. (For the Windows command line, the installer should take care of that automagically.)

I'm not sure, though, whether the new installer will work under anything earlier than Windows Vista. Would be nice to have some feedback on this, as my virtual WinXP install has already gone the way of the dodo.

Albert

--
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany

Albert Graef

unread,
Feb 27, 2018, 3:35:09 PM2/27/18
to pure...@googlegroups.com

On Fri, Feb 23, 2018 at 11:18 PM, Albert Graef <agg...@gmail.com> wrote:

Ok, thanks for the heads up. So it does make sense to have another look at that some time.

FWIW, as promised I took another look at texmacs, works fine over here, see screenie below. The plugin runs without a hitch, using the Pure from the new installer and the plugin from the git source (pure/texmacs). Just two little edits in the init.pure.scm did the trick:

diff --git a/pure/texmacs/plugins/pure/progs/init-pure.scm b/pure/texmacs/plugins/pure/progs/init-pure.scm
index 6442190d..3ce8adea 100644
--- a/pure/texmacs/plugins/pure/progs/init-pure.scm
+++ b/pure/texmacs/plugins/pure/progs/init-pure.scm
@@ -67,7 +67,7 @@
 ;; if the auto-detection doesn't work for you then you'll have to set this
 ;; variable to the path where your Pure library scripts are to be found.
 (if (not (defined? 'pure-default-lib-path))
-(define pure-default-lib-path "/usr/local/lib"))
+(define pure-default-lib-path "c:/msys64/mingw32/lib"))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

@@ -94,11 +94,7 @@

 ;; Detect the Pure library path (this needs pkg-config).
 (use-modules (ice-9 popen))
-(define pure-lib-path
-  (let* ((port (open-input-pipe "pkg-config pure --variable libdir"))
-     (str (read-line port)))
-    (close-pipe port)
-    (if (string? str) str pure-default-lib-path)))
+(define pure-lib-path pure-default-lib-path)

 ;; Check if the given script exists on the library path or in one of the
 ;; texmacs-specific paths. Return the full script name if present, ""

Screenie (running Pure-Math):

Inline image 1

That doesn't really help with TeXmacs' frequent crashes (which is why, alas, I pretty much stopped using it), but there you have it. :)

Albert

Albert Graef

unread,
Feb 27, 2018, 3:41:39 PM2/27/18
to pure...@googlegroups.com
That last post again as plain text, and the diff attached.
init-pure.scm.diff

Albert Graef

unread,
Feb 28, 2018, 1:52:44 AM2/28/18
to pure...@googlegroups.com
On Tue, Feb 27, 2018 at 9:35 PM, Albert Graef <agg...@gmail.com> wrote:
FWIW, as promised I took another look at texmacs, works fine over here, see screenie below. The plugin runs without a hitch, using the Pure from the new installer and the plugin from the git source (pure/texmacs). Just two little edits in the init.pure.scm did the trick:

I've updated the plugin in git now so that it works as-is. (Also had to change the Ctrl+$ shortcut for math input mode which wasn't working on Windows for me. It's Ctrl+Shift+M now which appears to work on Linux, Mac and Windows.)

The latest upload of the one-click installer now also includes the TeXmacs-formatted documentation so that the docs are also available in TeXmacs.

That doesn't really help with TeXmacs' frequent crashes (which is why, alas, I pretty much stopped using it), but there you have it. :)

FWIW (YMMV), I found that TeXmacs 0.99.4 crashes a whole lot less on Windows than 0.99.6. (Works better for me on Mac, too.)

The only missing piece in the Scientific-Pure-on-Windows puzzle is pure-octave now. Gnuplot is readily available in msys2, but not Octave, so we'll have to rely on some ready-made Windows binaries there.

Albert Graef

unread,
Feb 28, 2018, 3:32:23 AM2/28/18
to pure...@googlegroups.com
On Wed, Feb 28, 2018 at 7:52 AM, Albert Graef <agg...@gmail.com> wrote:
FWIW (YMMV), I found that TeXmacs 0.99.4 crashes a whole lot less on Windows than 0.99.6. (Works better for me on Mac, too.)

I meant 1.99.4, of course. I just updated the wiki page, Windows-specific info now at https://github.com/agraef/pure-lang/wiki/PureOnWindows#pure-and-texmacs.

John Cowan

unread,
Feb 28, 2018, 1:39:48 PM2/28/18
to pure...@googlegroups.com

On Wed, Feb 28, 2018 at 1:52 AM, Albert Graef <agg...@gmail.com> wrote:

The only missing piece in the Scientific-Pure-on-Windows puzzle is pure-octave now. Gnuplot is readily available in msys2, but not Octave, so we'll have to rely on some ready-made Windows binaries there.

<https://lists.gnu.org/archive/html/octave-maintainers/2016-05/msg00007.html> is about building Octave on Windows from source using msys2.

-- 
John Cowan          http://vrici.lojban.org/~cowan        co...@ccil.org
The peculiar excellence of comedy is its excellent fooling, and Aristophanes's
claim to immortality is based upon one title only: he was a master maker
of comedy, he could fool excellently.  Here Gilbert stands side by side
with him.  He, too, could write the most admirable nonsense.  There has
never been better fooling than his, and a comparison with him carries
nothing derogatory to the great Athenian. --Edith Hamilton, The Greek Way

Albert Graef

unread,
Feb 28, 2018, 5:17:32 PM2/28/18
to pure...@googlegroups.com
Hi John,


On Wed, Feb 28, 2018 at 7:39 PM, John Cowan <co...@ccil.org> wrote:
<https://lists.gnu.org/archive/html/octave-maintainers/2016-05/msg00007.html> is about building Octave on Windows from source using msys2.

Thanks for digging out that link! Alas, it suggests building using the mingw toolchain included in the binary Octave package which conflicts with the msys2 one (apparently C++ ABI incompatibilities). In fact, I already tried compiling and linking pure-octave against that toolchain, but it produces an octave_embed.dll which is unusable in Pure. :(

What I'm doing right now is to build octave 4.0.3 from scratch using msys2/mingw32 instead. That's a bit harder, as I need to correct a bunch of compile errors along the way, but it should hopefully give me an Octave build that's usable in that environment.

Still compiling, keep fingers crossed. ;-)

Albert

Albert Graef

unread,
Mar 3, 2018, 12:11:47 AM3/3/18
to pure...@googlegroups.com
On Wed, Feb 28, 2018 at 11:17 PM, Albert Graef <agg...@gmail.com> wrote:
What I'm doing right now is to build octave 4.0.3 from scratch using msys2/mingw32 instead. That's a bit harder, as I need to correct a bunch of compile errors along the way, but it should hopefully give me an Octave build that's usable in that environment.

Well, that was quite a bit of work (building Octave takes a *long* time, especially in Windows running in a VM), but I finally got it working. I made an MSI package for it, which links against Octave statically and contains all the runtime stuff, so that it's self-contained (apart from some mingw32 libraries which are easily installed through pacman). Instructions are in the wiki: https://github.com/agraef/pure-lang/wiki/PureOnWindows#pure-and-octave

Albert Graef

unread,
Mar 3, 2018, 12:24:23 AM3/3/18
to pure...@googlegroups.com
Just for the record, the changes I needed for getting Octave 4.0.3 compiled in msys2 (fixing mostly gnulib compile probs) are attached. Also, I configured Octave like this: ./configure --enable-static --disable-shared --disable-docs --disable-openmp.

(Had to do a static-only build since the libtool in the package failed on me when shared libraries were enabled. If anyone gets that to work, please toss me your patches so that I can give that a whirl as well.)

The version of pure-octave which builds and runs on Windows sits in this branch here: https://github.com/agraef/pure-lang/tree/pure-octave-mingw32. I'll merge those changes into master once this has had some testing, so please have a go and try to break it.

Ok, so we have all the scientific computing stuff working on Windows now, nice! And I'm off to greener (Linux) pastures again. :)

Albert
octave-gnulib-fixes.diff
Reply all
Reply to author
Forward
0 new messages