![]() |
Anyone from UK, is this site trustful? I can buy [url]http://www.techee.co.uk/windows-7-professional-64-bit-oem[/url] and send across the product key.
|
[QUOTE=WraithX;460637]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 [c]echo $PATH[/c] Once compiled, you will only need your executable and (if necessary) the pthread.dll to run your code on another computer.[/QUOTE] 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. [b]Edit:[/b] OK, same version of msys as described in WraithX's [url=]gmp-ecm post[/url] 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? |
[QUOTE=pinhodecarlos;460678]Anyone from UK, is this site trustful? I can buy [URL]http://www.techee.co.uk/windows-7-professional-64-bit-oem[/URL] and send across the product key.[/QUOTE]
Don't know about that site, but you can buy a key from Amazon for less, [URL]https://www.amazon.co.uk/dp/B01FDOW0YG/ref=wl_it_dp_o_pd_nS_ttl?_encoding=UTF8&colid=1IP0K5R3HCPMJ&coliid=I3I0M0YEXQL66G[/URL] |
[QUOTE=ewmayer;460691]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?[/QUOTE] 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. |
[QUOTE=WraithX;460718]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.[/QUOTE] 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! |
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? |
It is really easy to use MSYS2: Download the msys2-x86_64 package and install: [url]http://www.msys2.org/[/url]
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. |
[QUOTE=ATH;460789]It is really easy to use MSYS2: Download the msys2-x86_64 package and install: [url]http://www.msys2.org/[/url][/QUOTE]
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. |
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" |
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. |
[QUOTE=ATH;460859]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"[/QUOTE] 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. |
| All times are UTC. The time now is 04:27. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.