From goxjanskloon at outlook.com Wed Jan 15 16:41:23 2025 From: goxjanskloon at outlook.com (_ goxjanskloon) Date: Wed, 15 Jan 2025 15:41:23 +0000 Subject: Failed to pass test "convert" on cross-compiled and shared libraries Message-ID: Basic information: * GMPGMP version: 6.3.0 * configure options: --build=x86_64-pc-linux-gnu --host=x86_64-w64-mingw32 --prefix=/home/gxj/bin --enable-shared --disable-static * configure output: See attachment configure.output * Compilers: See attachments *gcc.version * Output from uname -a: Linux DESKTOP-####### 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux * Output from config.guess: zen2-pc-linux-gnu * Output from configfsf.guess: x86_64-pc-linux-gnu * config.log: See attachment config.log Bug Detail: I cross-compiled GMP on Ubuntu WSL2 (from Windows 10), targeting Windows. I have package mingw-w64 installed from apt, to get a MinGW-w64 toolchain. I configured and built GMP successfully, without any errors but a warning during configuring: ??????configure: WARNING: cannot check for properly working vsnprintf when cross compiling, will assume it's ok. After looking up this warning, I thought it couldn't be an error, and ignored it, then ran make install. The output from installing reminded me to test, so I ran make check -j12(for output and log, see attachment tests-mpz-test-suite.log). I saw plenty warnings and errors from libtool (see attachment). I couldn't get anything helpful about it on the Internet. All tests passed, except convert. Sorry for my laziness, I couldn't understand the source code of this test. Only I know is that this test stopped exceptionally with exiting code 127. As far as I know, 127 means a command can't be found. But I couldn't see any system calls in convert.c. Recalling the warning I got during configuring, I guess it is related to function vsnprintf . (I saw a character serial in the source code, according to it and the name "convert", I guess it is about strings. But this is a multiprecision project! My idea may be foolish...) I tried to debug it. I cleaned my building directory and reconfigured by: ??????CFLAGS='-O0 -g -DDEBUG' CC_FOR_BUILD=gcc /path/to/configure --build=x86_64-pc-linux-gnu --host=x86_64-w64-mingw32 --prefix=/home/gxj/bin --enable-static --disable-shared --enable-alloca=debug --disable-assembly Everything went well, and every test passed (There was't any error or warning that is significant, so I don't attach the outputs and logs from it). The error I got previously didn't appear this time. I thought it might be related to the type of libraries. Because in the first build, I built shared libraries, and in the debugging build, I built static libraries, in order to get debugging symbols for GDB. I have experienced many problems about library types when I cross-compile from Linux to Windows. But this time I want to build an exactly as dynamic as possible toolchain, which includes GMP. So I need to know a workaround or a solution that isn't switching to static libraries. -------------- next part -------------- A non-text attachment was scrubbed... Name: attachments.7z Type: application/octet-stream Size: 6041 bytes Desc: attachments.7z URL: From albin.ahlback at gmail.com Fri Jan 17 16:42:43 2025 From: albin.ahlback at gmail.com (=?UTF-8?Q?Albin_Ahlb=C3=A4ck?=) Date: Fri, 17 Jan 2025 16:42:43 +0100 Subject: Apple M4 Pro is not recognized in config.guess Message-ID: <58d37d6b-49d4-4ec8-9868-e8d42edd03c7@gmail.com> Hi, I just tried to compile GMP on my Apple M4 Macbook Pro, and `config.guess' did not recognize my CPU as `applem4', but simply `aarch64'. I have the following: $ system_profiler SPHardwareDataType | grep Chip Chip: Apple M4 Pro Don't know if the pro models of previous generations are affected. I have patched this on my system, but it would be nice if it was patched on upstream as well. Best, Albin