/usr/lib64/libaesgm.so.0.0.0 in libaesgm-20090429-17.fc28.x86_64 is not linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config. I tried to fix that by patching the RPM spec file, but somehow, LDFLAGS gets lost before reaching the linker invocation: cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -fPIC -DUSE_SHA1 -shared -Wl,-soname,libaesgm.so.0 -o libaesgm.so.0.0.0 aescrypt.o aeskey.o aes_modes.o aestab.o fileenc.o hmac.o pwd2key.o sha1.o sha2.o Apparently, only CFLAGS is used there. See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.
Your efforts were thwarted by the most dangerous of beasts, the typo. :) --- a/libaesgm.spec +++ b/libaesgm.spec @@ -30,7 +30,7 @@ cp %{SOURCE1} Makefile sed -i 's/\r//' *.txt %build -make CFLAGS="%{optflags} -fPIC -DUSE_SHA1" LDFLAGS="${build_ldflags}" +make CFLAGS="%{optflags} -fPIC -DUSE_SHA1" LDFLAGS="%{build_ldflags}"
Fixed in rawhide (libaesgm-20090429-18.fc29) and F28 (libaesgm-20090429-18.fc28).