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] Rebuild v4.7.4, to include aarch64-apple-darwin #4481

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion N/NetCDF/[email protected]/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ include("../common.jl")

# Offset to add to the version number
version_offset = v"0.1.0"

# Minimum Julia version supported: this is important to decide which versions of
# the dependencies to use, in particular the JLL stdlibs.
min_julia_version = v"1.3"
Expand Down
13 changes: 3 additions & 10 deletions N/NetCDF/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ function configure(version_offset, min_julia_version)
# So for example version 2.6.3 would become 200.600.300.

name = "NetCDF"
upstream_version = v"4.8.1"
upstream_version = v"4.7.4"
version = VersionNumber(upstream_version.major * 100 + version_offset.major,
upstream_version.minor * 100 + version_offset.minor,
upstream_version.patch * 100 + version_offset.patch)

# Collection of sources required to build NetCDF
sources = [
ArchiveSource("https://github.com/Unidata/netcdf-c/archive/v$(upstream_version).zip",
"e4e75523466de4187cff29784ff12755925f17e753bff0c9c46cd670ca63c6b2")
"170c9c9020f8909811b06e1034d5ea9288b3d5bd90793e3dd27490191faa7566")
]

# HDF5.h in /workspace/artifacts/805ccba77cd286c1afc127d1e45aae324b507973/include
Expand All @@ -28,19 +28,13 @@ cd $WORKSPACE/srcdir/netcdf-c-*
export CPPFLAGS="-I${includedir}"
export LDFLAGS="-L${libdir}"
export LDFLAGS_MAKE="${LDFLAGS}"
CONFIGURE_OPTIONS=""

if [[ ${target} == *-mingw* ]]; then
export LIBS="-lhdf5-0 -lhdf5_hl-0 -lcurl-4 -lz"
# linking fails with: "libtool: error: can't build x86_64-w64-mingw32 shared library unless -no-undefined is specified"
# unless -no-undefined is added to LDFLAGS
LDFLAGS_MAKE="${LDFLAGS} ${LIBS} -no-undefined"

# testset fails on mingw (NetCDF 4.8.1)
# libtool: link: cc -fno-strict-aliasing -o .libs/pathcvt.exe pathcvt.o -L/workspace/destdir/bin ../liblib/.libs/libnetcdf.dll.a -lhdf5-0 -lhdf5_hl-0 -lcurl-4 -lz -L/workspace/destdir/lib
# pathcvt.o:pathcvt.c:(.text+0x15c): undefined reference to `NCpathcvt'
CONFIGURE_OPTIONS="--disable-testsets"

elif [[ "${target}" == *-apple-* ]]; then
# this file is referenced by hdf.h by not installed
touch ${includedir}/features.h
Expand All @@ -51,8 +45,7 @@ fi
--host=${target} \
--disable-utilities \
--enable-shared \
--disable-static \
$CONFIGURE_OPTIONS
--disable-static
make LDFLAGS="${LDFLAGS_MAKE}" -j${nproc}
make install
nc-config --all
Expand Down