I'm trying to compile TensorFlow library and during build it produces helper executables that generate some app-specific code. Some of these helper executables get broken: when running them they yield something like bin/tensorflow/cc/ops/candidate_sampling_ops_gen_cc: Unsupported relocation type 11 in non-PLT relocations To make it easier to reproduce the bug, I've created a preliminary port, see https://reviews.freebsd.org/D15902 Steps to reproduce: 1. cd into your ports dir 2. arc patch D15902 to pull the patch in, or do it manually 3. make build BAZEL_EXTRA_ARGS="-s" BAZEL_TARGET=//tensorflow/cc:ops1/candidate_sampling_ops_gen_cc This will produce "work/tensorflow-1.8.0/bazel-bin/tensorflow/cc/ops/candidate_sampling_ops_gen_cc" binary. 4. Either try running it manually or try building another target that uses this executable: rm work/.build_done.tensorflow._usr_local make build BAZEL_EXTRA_ARGS="-s" BAZEL_TARGET=//tensorflow/cc:candidate_sampling_ops_genrule
I presume this is amd64? #define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */ /* * missing: * R_X86_64_GOTPCREL, R_X86_64_32, R_X86_64_32S, R_X86_64_16, * R_X86_64_PC16, R_X86_64_8, R_X86_64_PC8 */ default: _rtld_error("%s: Unsupported relocation type %u" " in non-PLT relocations\n", obj->path, (unsigned int)ELF_R_TYPE(rela->r_info)); goto done; The missing R_X86_64_32S comment comes from r115280: Initial pass at supporting shared libraries on amd64. There are still a few missing relocation types in amd64/reloc.c, but I have not found any of them in use yet. :-)
(In reply to Ed Maste from comment #1) Yep, amd64. This comment looks like a cause.
Can anything be done with this? I'd like to continue TensorFlow porting effort.
Although not related to TensorFlow, I have the same problem when I try to compile an old Ruby interpreter (1.9.3): this is the command I used: CC=clang CXX=clang++ CPP=clang-cpp RUBY_CONFIGURE_OPTS="--enable-shared" MAKE="make" MAKE_OPTS="-j1" LDFLAGS="-Wl,-z,notext" RBENV_ROOT=/home/jcigar/rbenv rbenv install 1.9.3-p551 which fails as configure with the same "Unsupported relocation type 11 in non-PLT relocations" I've copy/pasted the config.log at https://gist.github.com/silenius/52c0febc48e46d95435eafec9ff15054 this is on: FreeBSD sandbox 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64 with: LLD 6.0.1 (FreeBSD 335540-1200005) (compatible with GNU linkers)
I don't get this problem anymore whem compiling TensorFlow. Not sure if it is fixed, or just some change on TensorFlow side, though. Should we close this?
@Gleb Sure, please re-open if the issue becomes reproducible again