Repository navigation
Upgrade nettle from 3 to 4. - #83
Open
Wesley-Chan wants to merge 1 commit into
Open
Wesley-Chan wants to merge 1 commit into
Wesley-Chan wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As brew pulls nettle@4 by default on Mac OS, the previous
includestopped working because it expects a now deprecated<nettle/sha.h>. This fix includessha1.handsha2.hinstead and removes the second parameter, length, to adopt the function definitions.Tested on Tahoe 26.6.2.
Build log
%./autogen.sh + autoreconf --force --install --verbose autoreconf: export WARNINGS= autoreconf: Entering directory '.' autoreconf: configure.ac: no obvious need to run autopoint autoreconf: running: aclocal --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: glibtoolize --copy --force glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. glibtoolize: copying file 'build-aux/ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. glibtoolize: copying file 'm4/libtool.m4' glibtoolize: copying file 'm4/ltoptions.m4' glibtoolize: copying file 'm4/ltsugar.m4' glibtoolize: copying file 'm4/ltversion.m4' glibtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: configure.ac: not using Intltool autoreconf: configure.ac: not using Gtkdoc autoreconf: configure.ac: no need to run autopoint (confirmed) autoreconf: running: aclocal --force -I m4 autoreconf: running: /opt/homebrew/Cellar/autoconf/2.73/bin/autoconf --force configure.ac:8: warning: The macro 'AC_PROG_LIBTOOL' is obsolete. configure.ac:8: You should run autoupdate. m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from... configure.ac:8: the top level configure.ac:9: warning: The macro 'AC_GNU_SOURCE' is obsolete. configure.ac:9: You should run autoupdate. ./lib/autoconf/specific.m4:486: AC_GNU_SOURCE is expanded from... configure.ac:9: the top level configure.ac:54: warning: The macro 'AC_TRY_COMPILE' is obsolete. configure.ac:54: You should run autoupdate. ./lib/autoconf/general.m4:2903: AC_TRY_COMPILE is expanded from... m4/as-compiler-flag.m4:39: AS_COMPILER_FLAGS is expanded from... configure.ac:54: the top level configure.ac:121: warning: The macro 'AC_TRY_LINK' is obsolete. configure.ac:121: You should run autoupdate. ./lib/autoconf/general.m4:2976: AC_TRY_LINK is expanded from... configure.ac:121: the top level configure.ac:178: warning: The macro 'AC_TRY_LINK' is obsolete. configure.ac:178: You should run autoupdate. ./lib/autoconf/general.m4:2976: AC_TRY_LINK is expanded from... configure.ac:178: the top level autoreconf: running: /opt/homebrew/Cellar/autoconf/2.73/bin/autoheader --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:7: installing 'build-aux/compile' configure.ac:4: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' autoreconf: 'build-aux/config.sub' is updated autoreconf: 'build-aux/config.guess' is updated autoreconf: configure.ac: not running make: --make not given autoreconf: Leaving directory '.' + rm -rf autom4te.cache%./configure
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether sleep supports fractional seconds... yes
checking filesystem timestamp resolution... 2
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /opt/homebrew/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking xargs -n works... yes
checking whether UID '501' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C23 features... -std=gnu23
checking whether gcc -std=gnu23 understands -c and -o together... yes
checking dependency style of gcc -std=gnu23... gcc3
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define EXTENSIONS... yes
checking whether _XOPEN_SOURCE should be defined... no
checking build system type... aarch64-apple-darwin25.6.0
checking host system type... aarch64-apple-darwin25.6.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu23... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking how to convert aarch64-apple-darwin25.6.0 file names to aarch64-apple-darwin25.6.0 format... func_convert_file_noop
checking how to convert aarch64-apple-darwin25.6.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ranlib... ranlib
checking for ar... ar
checking for archiver @file support... no
checking for strip... strip
checking command to parse /usr/bin/nm -B output from gcc -std=gnu23 object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... ld: warning: -single_module is obsolete
no
checking for -no_fixup_chains linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking which variant of shared library versioning to provide... (default) aix
checking for objdir... .libs
checking if gcc -std=gnu23 supports -fno-rtti -fno-exceptions... yes
checking for gcc -std=gnu23 option to produce PIC... -fno-common -DPIC
checking if gcc -std=gnu23 PIC flag -fno-common -DPIC works... yes
checking if gcc -std=gnu23 static flag -static works... no
checking if gcc -std=gnu23 supports -c -o file.o... yes
checking if gcc -std=gnu23 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu23 linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin25.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C23 features... (cached) -std=gnu23
checking whether gcc -std=gnu23 understands -c and -o together... (cached) yes
checking dependency style of gcc -std=gnu23... (cached) gcc3
checking for supported compiler flags... -Wall -Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wno-pointer-sign -Wno-unused-parameter -Wno-unused-const-variable -Werror=pointer-to-int-cast -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wformat-security -Winit-self -Wno-missing-declarations -Wmissing-include-dirs -Wnested-externs -Wpointer-arith -Wwrite-strings
checking for mlockall... yes
checking for mkstemps... yes
checking for strcasestr... yes
checking for asprintf... yes
checking for gmtime_r... yes
checking for timegm... yes
checking for pkg-config... /opt/homebrew/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for gtk+-3.0... no
checking for libxml-2.0... yes
checking if libtomcrypt is usable... no
checking whether libtomcrypt uses newer LTC_PKCS_1_V1_5 naming convention... no
checking for nettle >= 2.4... yes
checking for hogweed >= 2.4... yes
checking for gmp >= 6.0... yes
checking linker version script flag... unsupported
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating stoken.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
%make clean && make
rm -f stoken
test -z "" || rm -f stoken
rm -f libstoken.la
rm -f ./so_locations
rm -rf .libs _libs
rm -rf src/.libs src/_libs
rm -f .o
rm -f src/.o
rm -f src/*.lo
rm -f tests/export-android-v2.log tests/export-iphone-password.log tests/export-read-v3.log tests/export-sdtid-devid-password.log tests/export-v3-sdtid.log tests/tokencode-v2.log tests/tokencode-v3.log tests/tokencode-v4.log tests/tokencode-sdtid.log tests/mac-align.log
rm -f tests/export-android-v2.trs tests/export-iphone-password.trs tests/export-read-v3.trs tests/export-sdtid-devid-password.trs tests/export-v3-sdtid.trs tests/tokencode-v2.trs tests/tokencode-v3.trs tests/tokencode-v4.trs tests/tokencode-sdtid.trs tests/mac-align.trs
rm -f test-suite.log
rm -f *.lo
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CC src/cli.o
CC src/common.o
CC src/libstoken_la-library.lo
CC src/libstoken_la-securid.lo
src/securid.c:123:15: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
123 | uint8_t work[incr], enc[incr], pad[incr], zero[incr], lastblk[incr], *p;
| ^~~~
src/securid.c:123:26: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
123 | uint8_t work[incr], enc[incr], pad[incr], zero[incr], lastblk[incr], *p;
| ^~~~
src/securid.c:123:37: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
123 | uint8_t work[incr], enc[incr], pad[incr], zero[incr], lastblk[incr], *p;
| ^~~~
src/securid.c:123:49: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
123 | uint8_t work[incr], enc[incr], pad[incr], zero[incr], lastblk[incr], *p;
| ^~~~
src/securid.c:123:64: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant]
123 | uint8_t work[incr], enc[incr], pad[incr], zero[incr], lastblk[incr], *p;
| ^~~~
5 warnings generated.
CC src/libstoken_la-sdtid.lo
CC src/libstoken_la-compat.lo
CC src/libstoken_la-stc-nettle.lo
CCLD libstoken.la
CCLD stoken