mersenneforum.org Need Win7 install CD
 Register FAQ Search Today's Posts Mark Forums Read

 2017-06-06, 20:22 #23 pinhodecarlos     "Carlos Pinho" Oct 2011 Milton Keynes, UK 514110 Posts Anyone from UK, is this site trustful? I can buy http://www.techee.co.uk/windows-7-pr...nal-64-bit-oem and send across the product key.
2017-06-06, 22:49   #24
ewmayer
2ω=0

Sep 2002
República de California

5×2,351 Posts

Quote:
 Originally Posted by WraithX Hmmm, does your mingw64 download have the following file: c:/path/to/mingw64/bin/libwinpthread-1.dll That should be included with your mingw64 download. Also, when you edit the profile file for msys, you are including the mingw64/bin folder as part of the path. Then, once you've saved your changes to the profile file, you can open an msys shell and do all of your compiling inside of the msys shell. What does your path inside msys look like? You can check with echo $PATH Once compiled, you will only need your executable and (if necessary) the pthread.dll to run your code on another computer. I see what is probably the issue - I incorrectly assumed that msys was something needed specifically for the gmp-ecm build under Win - my RTFM bad. Will install that, double-check the rest of the guidelines, and update this post with the results. Edit: OK, same version of msys as described in WraithX's gmp-ecm post installed in my C: drive. Only difference is that since I just have a single version of each of mingw64 and msys installed, I used the simpler path here: export PATH=".:/c/mingw64/bin:/usr/local/bin:/bin:$PATH"

Now, is there something besides attempting to compile a .c source file I should do to make sure both msys and mingw64 installs are copacetic and playing nice with each other? And should I be doing my gcc compilation from within an msys or a mingw64 shell?

Last fiddled with by ewmayer on 2017-06-07 at 00:03

2017-06-07, 04:42   #25
Antonio

"Antonio Key"
Sep 2011
UK

21316 Posts

Quote:
 Originally Posted by pinhodecarlos Anyone from UK, is this site trustful? I can buy http://www.techee.co.uk/windows-7-pr...nal-64-bit-oem and send across the product key.
Don't know about that site, but you can buy a key from Amazon for less, https://www.amazon.co.uk/dp/B01FDOW0...I3I0M0YEXQL66G

2017-06-07, 12:35   #26
WraithX

Mar 2006

21D16 Posts

Quote:
 Originally Posted by ewmayer export PATH=".:/c/mingw64/bin:/usr/local/bin:/bin:\$PATH" Now, is there something besides attempting to compile a .c source file I should do to make sure both msys and mingw64 installs are copacetic and playing nice with each other? And should I be doing my gcc compilation from within an msys or a mingw64 shell?
Once the msys profile file is setup correctly, then you should be good to go.

One note about the difference between the two packages. Mingw64 is just the compiler toolchain, it provides things like gcc, g++, ar, as, ld, etc. Msys is the linux like environment, it provides things like grep, gunzip, make, autoconf, sed, awk, cat, head, tail, etc. So, to answer your last question, you'll compile everything inside an msys shell, as there is no mingw64 shell.

2017-06-07, 21:11   #27
ewmayer
2ω=0

Sep 2002
República de California

1175510 Posts

Quote:
 Originally Posted by WraithX Once the msys profile file is setup correctly, then you should be good to go. One note about the difference between the two packages. Mingw64 is just the compiler toolchain, it provides things like gcc, g++, ar, as, ld, etc. Msys is the linux like environment, it provides things like grep, gunzip, make, autoconf, sed, awk, cat, head, tail, etc. So, to answer your last question, you'll compile everything inside an msys shell, as there is no mingw64 shell.
Yep - before checking into the m-forum for first time today just now, I composed this offline:

In answer to own question, opened an MSYS terminal last night ... ah, Linux, I'd hardly left you and still I missed you so. Then did 'which gcc', that correctly pointed to c:\mingw\bin\gcc.exe (may have the slashes wrong-way, I'm typing this from memory on my macbook), and trial-compilation of a small file worked, in the sense that I need to modify my platform-related preprocessing code to allow Win builds and make gcc-or-compatible-compiler (e.g. clang) the only gating requirement.

Will be especially interested to see if all the multithreading and core-affinity stuff works in this emulation environment.

Thanks for the tips, WraithX et al!

 2017-06-08, 01:21 #28 ewmayer ∂2ω=0     Sep 2002 República de California 5·2,351 Posts Unthreaded 64-bit SSE2 build looks good - I just had a gander at the mingw32 predefine list and then used defined(__MINGW32__) to override the 'is windows?' preprocessing section in favor of yes-it's-linux, but it appears that pthreaded build is gonna be more of a challenge - get multiple missing-include-file errors during preprocessing, e.g. files like these are not in the various mingw32 include-dirs: #include #include #include #include Has any of the readership done pthreaded code building under msys/mingw32?
 2017-06-08, 10:25 #29 ATH Einyen     Dec 2003 Denmark 32·383 Posts It is really easy to use MSYS2: Download the msys2-x86_64 package and install: http://www.msys2.org/ Run these commands in MSYS2: pacman -Syu (restart MSYS2) pacman -Su (restart MSYS2) To install the packages needed to compile GMPECM i usually download these packages: pacman -S mingw-w64-x86_64-gcc pacman -S mingw-w64-x86_64-make pacman -S mingw-w64-x86_64-libtool pacman -S autoconf pacman -S automake pacman -S mingw-w64-x86_64-python3 and then you are ready to go and everything is located inside the C:\msys64 folder, there is no additional c:\mingw64 folder installation needed like in MSYS. Last fiddled with by ATH on 2017-06-08 at 10:28
2017-06-09, 01:31   #30
ewmayer
2ω=0

Sep 2002
República de California

101101111010112 Posts

Quote:
 Originally Posted by ATH It is really easy to use MSYS2: Download the msys2-x86_64 package and install: http://www.msys2.org/
Thanks! All is installed - for now I just grabbed gcc and python3, since I don't use config/make for my Mlucas builds - maintenance effort not worth it, as I set things up so 1-line-to-compile, 1-line-to-link is all one needs [check-build-log-for-errors is intervening step].

But even after restarting msys2 after those installs, 'which gcc' comes up empty - but I do see gcc inside the /c/msys64/mingw64/bin folder, and [path to that] -v shows it's version 6.3.0. Is there a path file somewhere which I need to edit?

Also, doing [path-to-gcc] -c of a small sample C file returns (sans errors) almost immediately, but I see no resulting object file.

Last fiddled with by ewmayer on 2017-06-09 at 01:32

 2017-06-09, 11:43 #31 ATH Einyen     Dec 2003 Denmark 32×383 Posts Yes, sorry. It is a while since I installed it from scratch, so I forgot I edited the path line: c:\msys64\etc\profile Changed the line: MSYS2_PATH="/usr/local/bin:/usr/bin:/bin" to MSYS2_PATH="/usr/local/bin:/usr/bin:/bin:/mingw64/bin"
 2017-06-09, 12:54 #32 ATH Einyen     Dec 2003 Denmark 32·383 Posts I did a reinstall now of my MSYS2 just to make sure there was nothing else I forgot. There was one more thing: If you install "make" at a later stage, the file is called "mingw32-make.exe" for some reason in the folder "C:\msys64\mingw64\bin". So you just need to make a copy of the file and call it "make.exe" otherwise it does not work for GMPECM at least.
2017-06-10, 02:32   #33
ewmayer
2ω=0

Sep 2002
República de California

2DEB16 Posts

Quote:
 Originally Posted by ATH Yes, sorry. It is a while since I installed it from scratch, so I forgot I edited the path line: c:\msys64\etc\profile Changed the line: MSYS2_PATH="/usr/local/bin:/usr/bin:/bin" to MSYS2_PATH="/usr/local/bin:/usr/bin:/bin:/mingw64/bin"
Looks good - I just needed to close and restart msys2 for the change to take effect. I suppose one could save one of the multiple close/reopen steps by combining one of the install-packages steps with the above manual path-edit one.

As with the separate msys+mingw method, though, no pthread support - looks like users will be limited to unthreaded mode.

 Similar Threads Thread Thread Starter Forum Replies Last Post swl551 Software 23 2014-10-17 16:25 wildrabbitt Information & Answers 16 2014-07-16 06:01 benDan Software 4 2012-12-17 05:59 willmore Software 6 2009-11-07 05:33 jasong Linux 2 2006-12-07 00:38

All times are UTC. The time now is 21:11.

Tue Mar 28 21:11:01 UTC 2023 up 222 days, 18:39, 0 users, load averages: 0.94, 0.99, 1.03