mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software > Mlucas

Reply
 
Thread Tools
Old 2017-06-06, 20:22   #23
pinhodecarlos
 
pinhodecarlos's Avatar
 
"Carlos Pinho"
Oct 2011
Milton Keynes, UK

514110 Posts
Default

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.
pinhodecarlos is offline   Reply With Quote
Old 2017-06-06, 22:49   #24
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

5×2,351 Posts
Default

Quote:
Originally Posted by WraithX View Post
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
ewmayer is offline   Reply With Quote
Old 2017-06-07, 04:42   #25
Antonio
 
Antonio's Avatar
 
"Antonio Key"
Sep 2011
UK

21316 Posts
Default

Quote:
Originally Posted by pinhodecarlos View Post
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
Antonio is offline   Reply With Quote
Old 2017-06-07, 12:35   #26
WraithX
 
WraithX's Avatar
 
Mar 2006

21D16 Posts
Default

Quote:
Originally Posted by ewmayer View Post
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.
WraithX is offline   Reply With Quote
Old 2017-06-07, 21:11   #27
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

1175510 Posts
Default

Quote:
Originally Posted by WraithX View Post
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!
ewmayer is offline   Reply With Quote
Old 2017-06-08, 01:21   #28
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

5·2,351 Posts
Default

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 <sys/resource.h>
#include <sys/sysctl.h>
#include <linux/unistd.h>
#include <asm/unistd.h>

Has any of the readership done pthreaded code building under msys/mingw32?
ewmayer is offline   Reply With Quote
Old 2017-06-08, 10:25   #29
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

32·383 Posts
Default

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
ATH is offline   Reply With Quote
Old 2017-06-09, 01:31   #30
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

101101111010112 Posts
Default

Quote:
Originally Posted by ATH View Post
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
ewmayer is offline   Reply With Quote
Old 2017-06-09, 11:43   #31
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

32×383 Posts
Default

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"
ATH is offline   Reply With Quote
Old 2017-06-09, 12:54   #32
ATH
Einyen
 
ATH's Avatar
 
Dec 2003
Denmark

32·383 Posts
Default

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.
ATH is offline   Reply With Quote
Old 2017-06-10, 02:32   #33
ewmayer
2ω=0
 
ewmayer's Avatar
 
Sep 2002
República de California

2DEB16 Posts
Default

Quote:
Originally Posted by ATH View Post
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.
ewmayer is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
MFAKTC won't start under RDP (win7) swl551 Software 23 2014-10-17 16:25
getting all cores to work on Win7 wildrabbitt Information & Answers 16 2014-07-16 06:01
The webpage cannot be found for win7 64 benDan Software 4 2012-12-17 05:59
XP 32-bit to Win7 64-bit slowdown willmore Software 6 2009-11-07 05:33
How do I get my ubuntu install past minimal install? 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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔