Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[netcdf-c] Build error on x64-linux #42782

Open
brucemdietrich opened this issue Dec 19, 2024 · 2 comments
Open

[netcdf-c] Build error on x64-linux #42782

brucemdietrich opened this issue Dec 19, 2024 · 2 comments
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@brucemdietrich
Copy link

On an Alpine Linux image I am trying to install netcdf-c with vcpkg and am getting an error. The OS is description:

[ 5/17] RUN cat /etc/os-release
0.423 NAME="Alpine Linux"
0.423 ID=alpine
0.423 VERSION_ID=3.20.1
0.423 PRETTY_NAME="Alpine Linux v3.20"
0.423 HOME_URL="https://alpinelinux.org/"
0.423 BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"

Some of the installs before running:
RUN apk add build-base cmake zip unzip curl git libtool libzip zlib perl clang ninja-is-really-ninja linux-headers pkgconfig bash autoconf tzdata automake python3

RUN /tmp/vcpkg/vcpkg update
RUN /tmp/vcpkg/vcpkg upgrade

RUN /tmp/vcpkg/vcpkg install vcpkg-cmake
RUN /tmp/vcpkg/vcpkg install vcpkg-cmake-config
RUN /tmp/vcpkg/vcpkg install vcpkg-pkgconfig-get-modules

RUN /tmp/vcpkg/vcpkg install netcdf-c

Error report below:

Package: netcdf-c[core,dap,hdf5,nczarr,netcdf-4]:x86-linux@4.8.1#5

Host Environment

  • Host: x86-linux
  • Compiler: GNU 14.2.0
  • vcpkg-tool version: 2999-12-31-unknownhash
    vcpkg-scripts version: 2dc91c6 2024-12-17 (28 hours ago)

To Reproduce

vcpkg install netcdf-c

...
Installing 7/7 netcdf-c[core,dap,hdf5,nczarr,netcdf-4]:x64-linux@4.8.1#4...
Building netcdf-c[core,dap,hdf5,nczarr,netcdf-4]:x64-linux@4.8.1#4...
...
Failure logs

-- Using cached Unidata-netcdf-c-cd6173f472b778fa0e558982c59f7183aa5b8e47.tar.gz.
-- Cleaning sources at /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /tmp/vcpkg/downloads/Unidata-netcdf-c-cd6173f472b778fa0e558982c59f7183aa5b8e47.tar.gz
-- Applying patch no-install-deps.patch
-- Applying patch fix-dependency-zlib.patch
-- Applying patch use_targets.patch
-- Applying patch fix-dependency-libmath.patch
-- Applying patch fix-linkage-error.patch
-- Applying patch fix-manpage-msys.patch
-- Applying patch fix-dependency-libzip.patch
-- Applying patch fix-dependency-mpi.patch
-- Applying patch fix-pkgconfig.patch
-- Using source at /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean
-- Configuring x86-linux-dbg
-- Configuring x86-linux-rel
-- Building x86-linux-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /usr/bin/cmake --build . --config Debug --target install -- -v -j2
    Working Directory: /tmp/vcpkg/buildtrees/netcdf-c/x86-linux-dbg
    See logs for more information:
      /tmp/vcpkg/buildtrees/netcdf-c/install-x86-linux-dbg-out.log

Call Stack (most recent call first):
  installed/x86-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x86-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/netcdf-c/portfile.cmake:79 (vcpkg_cmake_install)
  scripts/ports.cmake:196 (include)


I have a copy of the above log file:  /tmp/vcpkg/buildtrees/netcdf-c/install-x86-linux-dbg-out.log  but it is long and not very informative.  The tail end of the file is here:

/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5filter.c:569:56: warning: conversion to 'int' from 'unsigned int' may change the sign of the result [-Wsign-conversion]
  569 |         if(spec->flags & NC_HDF5_FILTER_MISSING) {id = spec->filterid; break;}
      |                                                        ^~~~
/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5filter.c:571:20: warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]
  571 |     if(idp) *idp = id;
      |                    ^~
ninja: build stopped: subcommand failed.
@jimwang118 jimwang118 added the category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. label Dec 19, 2024
@jimwang118 jimwang118 removed their assignment Dec 19, 2024
@brucemdietrich
Copy link
Author

earlier in the log file I see this error:

[91/171] /usr/bin/cc -DENABLE_SET_LOG_LEVEL -DH5_BUILT_AS_STATIC_LIB -DHAVE_CONFIG_H -DRELAX_COORD_BOUND -I/tmp/vcpkg/buildtrees/netcdf-c/x86-linux-dbg/include -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/include -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/oc2 -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libsrc -I/tmp/vcpkg/installed/x86-linux/include -I/tmp/vcpkg/buildtrees/netcdf-c/x86-linux-dbg -fPIC -m32 -fno-strict-aliasing -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -Wall -Wconversion -MD -MT libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5debug.c.o -MF libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5debug.c.o.d -o libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5debug.c.o -c /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5debug.c
FAILED: libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5debug.c.o
/usr/bin/cc -DENABLE_SET_LOG_LEVEL -DH5_BUILT_AS_STATIC_LIB -DHAVE_CONFIG_H -DRELAX_COORD_BOUND -I/tmp/vcpkg/buildtrees/netcdf-c/x86-linux-dbg/include -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/include -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/oc2 -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libsrc -I/tmp/vcpkg/installed/x86-linux/include -I/tmp/vcpkg/buildtrees/netcdf-c/x86-linux-dbg -fPIC -m32 -fno-strict-aliasing -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -Wall -Wconversion -MD -MT libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5debug.c.o -MF libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5debug.c.o.d -o libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5debug.c.o -c /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5debug.c
/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5debug.c:9:10: fatal error: execinfo.h: No such file or directory
9 | #include <execinfo.h>
| ^~~~~~~~~~~~
compilation terminated.
[92/171] /usr/bin/cc -DENABLE_SET_LOG_LEVEL -DH5_BUILT_AS_STATIC_LIB -DHAVE_CONFIG_H -DRELAX_COORD_BOUND -I/tmp/vcpkg/buildtrees/netcdf-c/x86-linux-dbg/include -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/include -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/oc2 -I/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libsrc -I/tmp/vcpkg/installed/x86-linux/include -I/tmp/vcpkg/buildtrees/netcdf-c/x86-linux-dbg -fPIC -m32 -fno-strict-aliasing -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -g -Wall -Wconversion -MD -MT libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5filter.c.o -MF libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5filter.c.o.d -o libhdf5/CMakeFiles/netcdfhdf5.dir/hdf5filter.c.o -c /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5filter.c
In file included from /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/include/ncindex.h:16,
from /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/include/nc4internal.h:22,
from /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/include/hdf5internal.h:17,
from /tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5filter.c:17:
/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/libhdf5/hdf5filter.c: In function 'NC4_hdf5_filter_freelist':
/tmp/vcpkg/buildtrees/netcdf-c/src/83aa5b8e47-10b35fdabd.clean/include/nclist.h:63:26: warning: conversion to 'int' from 'size_t' {aka 'unsigned int'} may change the sign of the result [-Wsign-conversion]

@brucemdietrich
Copy link
Author

I found something that works at this location:
aws/aws-lambda-nodejs-runtime-interface-client#68 (comment)

If I add the following, then it builds:
apk add --no-cache --update --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ libexecinfo-dev

It doesn't sound like an optimal solution. If there is a better way to get this to build, I would like to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.
Projects
None yet
Development

No branches or pull requests

2 participants