![]() |
![]() |
#34 |
Einyen
Dec 2003
Denmark
31·97 Posts |
![]()
I'm not sure about pthread, never used it. There is a "phread.h" file in C:\msys64\mingw64\x86_64-w64-mingw32\include.
If you search for pthread using pacman: "pacman -Ss pthread" you get: Code:
mingw32/mingw-w64-i686-libwinpthread-git 5.0.0.4833.f057c525-1 (mingw-w64-i686-toolchain) MinGW-w64 winpthreads library mingw32/mingw-w64-i686-winpthreads-git 5.0.0.4833.f057c525-1 (mingw-w64-i686-toolchain) MinGW-w64 winpthreads library mingw64/mingw-w64-x86_64-libwinpthread-git 5.0.0.4833.f057c525-1 (mingw-w64-x86_64-toolchain) [installed] MinGW-w64 winpthreads library mingw64/mingw-w64-x86_64-winpthreads-git 5.0.0.4833.f057c525-1 (mingw-w64-x86_64-toolchain) [installed] MinGW-w64 winpthreads library msys/mingw-w64-cross-winpthreads-git 5.0.0.4767.34ac6b9-1 (mingw-w64-cross-toolchain mingw-w64-cross) MinGW-w64 winpthreads library for cross-compiler Another good thing about MSYS2 is that when you are done upgrading packages, you can move the folder to another computer and use it as it is. Last fiddled with by ATH on 2017-06-10 at 14:46 |
![]() |
![]() |
![]() |
#35 | |
∂2ω=0
Sep 2002
República de California
2×7×827 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#36 |
∂2ω=0
Sep 2002
República de California
101101001110102 Posts |
![]()
By way of an epilog to this thread - the issue of multithreaded builds inside Linux emulation in Windows has been neatly solved: MSFT finally did something right and built such emulation into Win10, complete with many or most standard libs, including pthreads. Finally a good reason to upgrade to Win10, IMO, with the obligatory "if you must use Windows" caveat.
|
![]() |
![]() |
![]() |
#37 | |
Nov 2020
110 Posts |
![]() Quote:
Cher I would be very grateful if you can help me. Windows 10 Mingw64 gc -v gcc version 10.2.0 (Rev5, Built by MSYS2 project) gcc -c -O3 -DUSE_SSE2 -DUSE_THREADS ../src/*.c >& build.log grep error build.log gcc -o Mlucas *.o -lm -lpthread -lrt ~/mlucas_v19/src build.log ../src/platform.h:1307:12: fatal error: sys/sysctl.h: No such file or directory 1307 | #include <sys/sysctl.h> Antonio Donato Filho |
|
![]() |
![]() |
![]() |
#38 |
∂2ω=0
Sep 2002
República de California
2·7·827 Posts |
![]()
Hi, Antonio --
I no longer have access to a Windows system - can you find out the main directory where the header files are located under your Linux shell, and see if perhaps there is a sysctl.h file in a different-named subdirectory than /sys? |
![]() |
![]() |
![]() |
#39 |
"Oliver"
Sep 2017
Porta Westfalica, DE
40610 Posts |
![]()
On my ArchLinux installation, I could not find sysctl.h at all. The reason: it is discontinued.
After simply commenting out the #include, it had problems with some file pointer (called fp) which was present in more than one source file, so it could not compile. I had to remove all fprintf's by hand, since the preprocessor directives were not as consequently used as I hoped. |
![]() |
![]() |
![]() |
#40 | |
∂2ω=0
Sep 2002
República de California
1157810 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#41 |
"Oliver"
Sep 2017
Porta Westfalica, DE
1100101102 Posts |
![]()
Firstly, I'm on a Raspberry Pi 2 with "Arch Linux ARM".
I think I described my problems a bit weirdly, so let's start from scratch… The error is: Code:
../src/platform.h:1307:12: fatal error: sys/sysctl.h: No such file or directory 1307 | #include <sys/sysctl.h> Code:
$ grep -Rn sysctl.h . ./platform.h:1307: #include <sys/sysctl.h> ./platform.h:1664: #include <sys/sysctl.h> ./platform.h:1681: #include <sys/sysctl.h> Code:
/usr/bin/ld: Mlucas.o:(.bss+0xd58): multiple definition of `fp'; gcd_lehmer.o:(.bss+0x45c): first defined here Code:
gcd_lehmer.c: In function ‘test_gcd’: gcd_lehmer.c:3333:5: error: ‘gcd_debug’ undeclared (first use in this function); did you mean ‘fft_gcd_debug’? 3333 | if(gcd_debug) { | ^~~~~~~~~ | fft_gcd_debug gcd_lehmer.c:3333:5: note: each undeclared identifier is reported only once for each function it appears in Last fiddled with by kruoli on 2020-11-11 at 11:07 Reason: Multiple corrections. Some additions. |
![]() |
![]() |
![]() |
#42 |
∂2ω=0
Sep 2002
República de California
2·7·827 Posts |
![]()
Thanks, Oliver - your duplicate-symbol issue following commenting-out the sysctl.h include appears unrelated to said header, so let me take each issue in turn:
1. Digging through my PMs of the past year, I spotted this note from Kriesel, who often does builds of Mlucas or the undocumeted TF-code udner Windows using various kinds of Linux emulation: "Missing <sys/sysctl.h> is a fatal error on Windows msys2/mingw64, no such obstacle in WSL/Ubuntu." Donato, suggest you try commenting out the #include <sys/sysctl.h> in platform.h -- just the first 'live' one, not the 2 at bottom of the file in commentary -- and retry your build to see what happens. I also note that you seem to have mised this note in the Download & Build section of the Mlucas README page: Windows (pre-Win10) Users: Assuming you successfully installed MSYS2 as described above, everything below should work for you, except that the MSYS2/MINGW emulation environment does not support multithreaded builds. Thus just select the appropriate SIMD vector-mode for your x86 processor using the /proc/cpuinfo-based procedure described below (or none if non-x86), and omit -DUSE_THREADS from your compile statement. That hints strongly that multithreaded builds simply are not possibly under MSYS2, but let's see what your sysctl-commented-out attempt tells us. 2. Re. Oliver's duplicate-symbol linker error: FILE *fp is declared as an extern (global) in Mdata.h and defined in Mlucas.c It is also defined in factor.c, but that is the undocumented-TF-code stuff I mentioned above - factor.c is given a '.txt' extension in releases because it has its own main(), i.e. Mlucas.o and factor.o cannot be linked in the same build. So far, so good. BUT, I see another 'FILE *fp' definition near top - outside of any specific function, i.e. global to the entire file - of gcd_lehmer.c. This is apparently not an issue in my various platforms, because I've never hit kruoli's gcd_lehmer error. But as long as one has either compiled Mlucas.c or factor.c, the definition of that same-named file pointer in gcd_lehmer.c is redundant - comment it out if you hit the duplicate-symbol error, and I will delete it from that file in my v20 development branch. |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
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 |