> ==> failures/sysutils/xxhash.log <==
> Hunk #1 succeeded at 447.
> done
> ===> Compiler link: clang -> /usr/bin/clang
> ===> Compiler link: clang++ -> /usr/bin/clang++
> ===> Compiler link: cc -> /usr/bin/cc
> ===> Compiler link: c++ -> /usr/bin/c++
> ===> Generating configure for xxhash-0.8.0
> ===> Configuring for xxhash-0.8.0
> ===> Building for xxhash-0.8.0
> cc -O2 -pipe -c -o xxhash.o xxhash.c
> ar rcs libxxhash.a xxhash.o
> cc -O2 -pipe xxhash.c -shared -o libxxhash.so.0.2
> ld: error: relocation R_386_PC32 cannot be used against symbol
> XXH3_64bits_withSeed; recompile with -fPIC
>>>> defined in /tmp/xxhash-53bf5d.o
>>>> referenced by xxhash.c
>>>> /tmp/xxhash-53bf5d.o:(XXH3_64bits_digest)
>
> ld: error: relocation R_386_PC32 cannot be used against symbol
> XXH3_64bits_withSecret; recompile with -fPIC
>>>> defined in /tmp/xxhash-53bf5d.o
>>>> referenced by xxhash.c
>>>> /tmp/xxhash-53bf5d.o:(XXH3_64bits_digest)
>
> ld: error: relocation R_386_PC32 cannot be used against symbol
> XXH3_128bits_withSeed; recompile with -fPIC
>>>> defined in /tmp/xxhash-53bf5d.o
>>>> referenced by xxhash.c
>>>> /tmp/xxhash-53bf5d.o:(XXH3_generateSecret)
>
> ld: error: relocation R_386_PC32 cannot be used against symbol
> XXH3_128bits_withSeed; recompile with -fPIC
>>>> defined in /tmp/xxhash-53bf5d.o
>>>> referenced by xxhash.c
>>>> /tmp/xxhash-53bf5d.o:(XXH128)
>
> ld: error: relocation R_386_PC32 cannot be used against symbol
> XXH3_128bits_withSeed; recompile with -fPIC
>>>> defined in /tmp/xxhash-53bf5d.o
>>>> referenced by xxhash.c
>>>> /tmp/xxhash-53bf5d.o:(XXH3_128bits_digest)
>
> ld: error: relocation R_386_PC32 cannot be used against symbol
> XXH3_128bits_withSecret; recompile with -fPIC
>>>> defined in /tmp/xxhash-53bf5d.o
>>>> referenced by xxhash.c
>>>> /tmp/xxhash-53bf5d.o:(XXH3_128bits_digest)
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> gmake: *** [Makefile:129: libxxhash.so.0.2] Error 1
> *** Error 2 in sysutils/xxhash (/usr/ports/infrastructure/mk/bsd.port.mk:2925
> '/pobj/xxhash-0.8.0/.build_done': @cd /pobj/xxhash-0.8.0/xxHas...)
> *** Error 2 in sysutils/xxhash (/usr/ports/infrastructure/mk/bsd.port.mk:2584
> 'build': @lock=xxhash-0.8.0; export _LOCKS_HELD=" xxhash-0.8....)
> ===> Exiting sysutils/xxhash with an error
> *** Error 1 in /usr/ports (infrastructure/mk/bsd.port.subdir.mk:137 'build':
> @: ${echo_msg:=echo}; : ${target:=build}; for i in ; do eval...)
>>>> Ended at 1596797814.95
> max_stuck=0.00/depends=1.29/show-prepare-results=0.32/build=4.64
> Error: job failed with 512 on i386-1 at 1596797814
Shared libraries should be built with -fpic/-fPIC, i386 is more
sensitive than amd64 in this regard.
In the diff below I strip the CXX bits since this is a C-only port.
I can leave them alone if you prefer, though.
ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/xxhash/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile 28 Jul 2020 04:41:18 -0000 1.7
+++ Makefile 8 Aug 2020 22:04:55 -0000
@@ -5,6 +5,7 @@ COMMENT = extremely fast non-cryptograph
GH_ACCOUNT = Cyan4973
GH_PROJECT = xxHash
GH_TAGNAME = v0.8.0
+REVISION = 0
PKGNAME = ${DISTNAME:L}
SHARED_LIBS = xxhash 0.2 # 0.7.4
@@ -21,9 +22,7 @@ PERMIT_PACKAGE = Yes
WANTLIB = c
MAKE_FLAGS = CC="${CC}" \
- CXX="${CXX}" \
- CFLAGS="${CFLAGS}" \
- CXXFLAGS="${CXXFLAGS}" \
+ CFLAGS="-fPIC ${CFLAGS}" \
SONAME_FLAGS= \
SHARED_EXT_VER="so.${LIBxxhash_VERSION}" \
V=1
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE