[netcdfgroup] Difficulty configuring NETCDF on Linux QEMU

  • To: "netcdfgroup@xxxxxxxxxxxxxxxx" <netcdfgroup@xxxxxxxxxxxxxxxx>
  • Subject: [netcdfgroup] Difficulty configuring NETCDF on Linux QEMU
  • From: Alvaro Fernandez <afernandez@xxxxxxxxxxxxxxx>
  • Date: Mon, 26 May 2025 17:24:21 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=inspiresemi.com; dmarc=pass action=none header.from=inspiresemi.com; dkim=pass header.d=inspiresemi.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=47fXialgCNTwNj0VUEPmueY1R8fKu3c3suRNFvQSC2Y=; b=Edxw+QsfymPMuDf4J3Sry+aWDj/kmlP0HkXCPp1IpDW/RriicwWGm+HgtxddoM1xuUwYwC4hTahNGF0uOSENTiaoXuNqredNYFiQffQcKv1pgyLq46gxafqf2nJ2WoONM7jMQB/u0q0snWY1RkUuN1s6rp54j91LGhe9TXEtn/UJYkVKueznDV7110kOcaENcAbpEHKrivQj8fc0vgeare+AGd7XCyVQuoS/IFq58MEAkmQwOvjC8KM0m+QSoK2iF8tXsHKxlQ+q6vfHD/19M78PSXBWgabdsXE9EMvQgFnKXzl7qZgH39Pg6ONPlE0kDMWuNN3n0ASlmkG//ekoZA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kTVVcarCMVEuvySpSxRpUVnXyb7NzlBcxMRC3OvtLLku0XhrPuDp7Eci/2IKOKzFbACc/WMG3yfudaayxC0aJ/vZjJXuCtGs4WtpTULUbLJdw1W6zkXKb9OZvhTGJCQRKgzcYJRd3szI4+eqFYv1MLSNKFVYjcZFc7hZ4g7g/edyvM+TGbJv+KxUWunO33W2IJ+uShRk/4gmC9YhAFR5SDV3t0CVPBhzKgv9l+cgRYRKSwXgut6SSP1bop+sDRbZtVnF6VZu6R7Yb0Dg+u8GVAZRHznmNDbJfiSMd7rFARmXvNva2ZS7iEx7ABeUO2vZISnwjQ4KlR+LvoVluCUmEw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=inspiresemi.com;
Hi,

I'm trying to build NETCDF on (a QEMU emulation of) a RISC-V platform we're 
developing.

I've successfully built other libraries (like HDF5, zlib, etc.) on this QEMU 
with gcc 14.2.0.

However, I am having difficulty completing the configuration phase of the 
NETCDF build process.

This machine will not be accessing the web or pulling down anything, so I 
disabled DAP and XML, and am not giving it curl.

I started with this configure command:

./configure --disable-dap --disable-libxml2 CPPFLAGS="-I/home/root/WRF/include" 
LDFLAGS="-L/home/root/WRF/lib" 2>&1  | tee configure-net.out

But I get errors like:

checking size of size_t... configure: error: in 
'/home/root/repos/netcdf-c-4.9.3':
configure: error: cannot compute sizeof (size_t)
See 'config.log' for more details

I reasoned that the configure script  might be confused about the host or built 
targets, so I decided to be explicit.

Below is the latest attempt. I added the cache file:

root@qemuriscv64:~/repos/netcdf-c-4.9.3# cat config.cache
ac_cv_sizeof_off_t=8

And then I ran:

./configure --disable-dap --disable-libxml2 CPPFLAGS="-I/home/root/WRF/include" 
LDFLAGS="-L/home/root/WRF/lib" --host=riscv64-linux-gnu 
--build=riscv64-linux-gnu  --cache-file=config.cache  2>&1  | tee 
configure-net.out

It fails with the same error.

This error is detected in line 26715 of the configure script.

I see from the comments that this test serves to guard against an error in the 
HP compiler. Is this still a useful test?

I would suspect our toolchain usually, but it's built hdf5 and multiple other 
applications.

Thanks in advance,

Alvaro Fernandez, PhD
Inspire Semi


  • 2025 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: