Solved Update for pkg-1.8.7_1 failed

Hi,

i upgradeed a jail to 11.0-RC3 and run into a problem compiling /usr/ports/ports-mgmt/pkg.
While compiling pkg i receive following error.

Though this must be a problem with openssl and reinstalled it. But this didn't fixed my problem.
Any idea?

Thanks
Mark

Code:
libtool: link: cc -shared  -fPIC -DPIC  .libs/libpkg_la-pkg.o .libs/libpkg_la-backup.o .libs/libpkg_la-clean_cache.o .libs/libpkg_la-dns_utils.o .libs/libpkg_la-fetch.o .libs/libpkg_la-packing.o .libs/libpkg_la-pkg_add.o .libs/libpkg_la-pkg_arch.o .libs/libpkg_la-pkg_attributes.o .libs/libpkg_la-pkg_audit.o .libs/libpkg_la-pkg_checksum.o .libs/libpkg_la-pkg_config.o .libs/libpkg_la-pkg_cudf.o .libs/libpkg_la-pkg_create.o .libs/libpkg_la-pkg_delete.o .libs/libpkg_la-pkg_deps.o .libs/libpkg_la-pkg_event.o .libs/libpkg_la-pkg_jobs.o .libs/libpkg_la-pkg_jobs_conflicts.o .libs/libpkg_la-pkg_jobs_universe.o .libs/libpkg_la-pkg_manifest.o .libs/libpkg_la-pkg_object.o .libs/libpkg_la-pkg_ports.o .libs/libpkg_la-pkg_printf.o .libs/libpkg_la-pkg_repo.o .libs/libpkg_la-pkg_repo_create.o .libs/libpkg_la-pkg_repo_update.o .libs/libpkg_la-pkg_repo_meta.o .libs/libpkg_la-pkg_solve.o .libs/libpkg_la-pkg_status.o .libs/libpkg_la-pkg_version.o .libs/libpkg_la-pkgdb.o .libs/libpkg_la-pkgdb_iterator.o .libs/libpkg_la-pkgdb_query.o .libs/libpkg_la-rcscripts.o .libs/libpkg_la-rsa.o .libs/libpkg_la-ssh.o .libs/libpkg_la-scripts.o .libs/libpkg_la-utils.o .libs/libpkg_la-plugins.o .libs/libpkg_la-pkg_old.o .libs/libpkg_la-merge3.o .libs/libpkg_la-diff.o .libs/libpkg_la-elfhints.o .libs/libpkg_la-pkg_elf.o  -Wl,--whole-archive ../compat/.libs/libbsd_compat.a ../external/.libs/libucl.a ../external/.libs/libsqlite.a ../external/.libs/libexpat.a ../external/.libs/libsbuf.a ../external/.libs/libpicosat.a ../external/.libs/libfetch.a ../external/.libs/liblinenoise.a ../external/blake2/.libs/libblake2.a ../libpkg/repo/binary/.libs/librepo_binary.a -Wl,--no-whole-archive  -lutil -lssl -lcrypto -lm -lelf -ljail -larchive -lz -lbz2 -llzma  -O2 -fstack-protector -Wl,--version-script=./libpkg.ver -fstack-protector   -Wl,-soname -Wl,libpkg.so.3 -o .libs/libpkg.so.3.0.0

/usr/bin/ld: /usr/lib/libcrypto.a(by_dir.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

/usr/lib/libcrypto.a: could not read symbols: Bad value

cc: error: linker command failed with exit code 1 (use -v to see invocation)

*** [libpkg.la] Error code 1
 
I had the same problem. I have upgraded from FreeBSD 9.3 to 11.0 using freebsd-update. After comparing filesystem to a clean FreeBSD 11.0 install I have found out that some symbolic links have not been updated properly. I had to fix the following symbolic links:

rm /usr/lib/libcrypto.so
rm /usr/lib/libcam.so
rm /usr/lib/libkvm.so
rm /usr/lib/libmd.so

ln -s ../../lib/libcrypto.so.8 /usr/lib/libcrypto.so
ln -s ../../lib/libcam.so.7 /usr/lib/libcam.so
ln -s ../../lib/libkvm.so.7 /usr/lib/libkvm.so
ln -s ../../lib/libmd.so.6 /usr/lib/libmd.so
 
Back
Top