Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Apr 2016 08:24:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 208692] devel/llvm37 : llvm37-3.7.1_1 build fails for . . ./DynamicFile.cpp.o: relocation R_X86_64_PC32 . . . can not be used when making a shared object; recompile with -fPIC; more
Message-ID:  <bug-208692-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208692

            Bug ID: 208692
           Summary: devel/llvm37 : llvm37-3.7.1_1 build fails for . .
                    ./DynamicFile.cpp.o: relocation R_X86_64_PC32 . . .
                    can not be used when making a shared object; recompile
                    with -fPIC; more
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: brooks@FreeBSD.org
          Reporter: markmi@dsl-only.net
             Flags: maintainer-feedback?(brooks@FreeBSD.org)
          Assignee: brooks@FreeBSD.org

# freebsd-version -ku; uname -aKU
11.0-CURRENT
11.0-CURRENT
FreeBSD FreeBSDx64 11.0-CURRENT FreeBSD 11.0-CURRENT #24 r297769M: Sat Apr =
 9
20:42:30 PDT 2016=20=20=20=20
markmi@FreeBSDx64:/usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG  a=
md64
1100105 1100105

The R_X86_64_PC32 invalid use shows in =E2=80=9CLinking CXX shared library
lib/liblldELF.so.3.7.1=E2=80=9D activity, for example:

Script started on Sun Apr 10 21:29:48 2016
Command: portupgrade -wWa
[Reading data from pkg(8) ... - 547 packages found - done]
--->  Upgrading 'dri-11.0.8,2' to 'dri-11.1.2,2' (graphics/dri)
--->  Building '/usr/ports/graphics/dri'
=3D=3D=3D>   dri-11.1.2,2 depends on executable: makedepend - found
=3D=3D=3D>   dri-11.1.2,2 depends on package: libclc>=3D0.0.r222830 - not f=
ound
=3D=3D=3D>   libclc-0.2.0.20151006 depends on file: /usr/local/sbin/pkg - f=
ound
=3D=3D=3D> Fetching all distfiles required by libclc-0.2.0.20151006 for bui=
lding
=3D=3D=3D>  Extracting for libclc-0.2.0.20151006
=3D> SHA256 Checksum OK for llvm-mirror-libclc-0.2.0.20151006-6d78407_GH0.t=
ar.gz.
=3D=3D=3D>  Patching for libclc-0.2.0.20151006
=3D=3D=3D>  Applying FreeBSD patches for libclc-0.2.0.20151006
=3D=3D=3D>   libclc-0.2.0.20151006 depends on executable: clang37 - not fou=
nd
=3D=3D=3D>  Building for llvm37-3.7.1_1
. . .
[2441/3643] Linking CXX shared library lib/liblldELF.so.3.7.1
FAILED: : && /usr/bin/c++  -fPIC -pipe -isystem /usr/local/include -g
-fstack-protector -fno-strict-aliasing  -isystem /usr/local/include -fPIC
-fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long
-Wcovered-switch-default -Wnon-virtual-dtor -std=3Dc++11 -fcolor-diagnostics
-pipe -isystem /usr/local/include -g -fstack-protector -fno-strict-aliasing=
=20
-isystem /usr/local/include  -L/usr/local/lib -fstack-protector -Wl,-z,orig=
in
-shared -Wl,-soname,liblldELF.so.3.7 -o lib/liblldELF.so.3.7.1
tools/lld/lib/ReaderWriter/ELF/CMakeFiles/lldELF.dir/Atoms.cpp.o
. . .
tools/lld/lib/ReaderWriter/ELF/CMakeFiles/lldELF.dir/Writer.cpp.o
-L/usr/local/lib lib/liblldReaderWriter.so.3.7.1 lib/liblldCore.so.3.7.1
lib/liblldYAML.so.3.7.1 lib/libLLVMObject.so.3.7.1 lib/libLLVMSupport.so.3.=
7.1
-Wl,-rpath,"\$ORIGIN/../lib:/usr/local/lib" && :
/usr/bin/ld:
tools/lld/lib/ReaderWriter/ELF/CMakeFiles/lldELF.dir/DynamicFile.cpp.o:
relocation R_X86_64_PC32 against
`_ZN3lld3elf14ELFDynamicAtomIN4llvm6object7ELFTypeILNS2_7support10endiannes=
sE1ELb0EEEEC2ERKNS0_11DynamicFileIS
7_EENS2_9StringRefESD_PKNS3_12Elf_Sym_ImplIS7_EE' can not be used when maki=
ng a
shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocatio=
n)
[2441/3643] Building CXX object
tools/lld/lib/ReaderWriter/MachO/CMakeFiles/lldMachO.dir/ArchHandler_x86_64=
.cpp.o
[2441/3643] Building CXX object
tools/lld/lib/ReaderWriter/MachO/CMakeFiles/lldMachO.dir/LayoutPass.cpp.o

As it reports: some code needs to be compiled with -fPIC sorts of options.

There are also numerous blocks of reports of not-found libraries, for examp=
le:

[1418/3643] Linking CXX executable bin/llvm-mc
/usr/bin/ld: warning: libLLVMAArch64Utils.so.3.7, needed by
lib/libLLVMAArch64AsmPrinter.so.3.7.1, not found (try using -rpath or
-rpath-link)
/usr/bin/ld: warning: libLLVMX86Utils.so.3.7, needed by
lib/libLLVMX86AsmPrinter.so.3.7.1, not found (try using -rpath or -rpath-li=
nk)
/usr/bin/ld: warning: libLLVMAMDGPUUtils.so.3.7, needed by
lib/libLLVMAMDGPUAsmParser.so.3.7.1, not found (try using -rpath or
-rpath-link)
/usr/bin/ld: warning: libLLVMX86CodeGen.so.3.7, needed by
lib/libLLVMX86AsmParser.so.3.7.1, not found (try using -rpath or -rpath-lin=
k)
/usr/bin/ld: warning: libLLVMMCDisassembler.so.3.7, needed by
lib/libLLVMARMDesc.so.3.7.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libLLVMObject.so.3.7, needed by
lib/libLLVMX86Desc.so.3.7.1, not found (try using -rpath or -rpath-link)
[1419/3643] Linking CXX executable bin/llvm-ar
/usr/bin/ld: warning: libLLVMAArch64Utils.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMAnalysis.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMAsmPrinter.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMCodeGen.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMMC.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMScalarOpts.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMSelectionDAG.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMTarget.so.3.7, needed by
lib/libLLVMAArch64CodeGen.so.3.7.1, not found (try using -rpath or -rpath-l=
ink)
/usr/bin/ld: warning: libLLVMMCParser.so.3.7, needed by
lib/libLLVMAArch64AsmParser.so.3.7.1, not found (try using -rpath or
-rpath-link)
/usr/bin/ld: warning: libLLVMMCDisassembler.so.3.7, needed by
lib/libLLVMAArch64Disassembler.so.3.7.1, not found (try using -rpath or
-rpath-link)
/usr/bin/ld: warning: libLLVMAMDGPUUtils.so.3.7, needed by
lib/libLLVMAMDGPUCodeGen.so.3.7.1, not found (try using -rpath or -rpath-li=
nk)
/usr/bin/ld: warning: libLLVMTransformUtils.so.3.7, needed by
lib/libLLVMAMDGPUCodeGen.so.3.7.1, not found (try using -rpath or -rpath-li=
nk)
/usr/bin/ld: warning: libLLVMipo.so.3.7, needed by
lib/libLLVMAMDGPUCodeGen.so.3.7.1, not found (try using -rpath or -rpath-li=
nk)
/usr/bin/ld: warning: libLLVMX86Utils.so.3.7, needed by
lib/libLLVMX86CodeGen.so.3.7.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libLLVMOption.so.3.7, needed by
lib/libLLVMLibDriver.so.3.7.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libLLVMBitReader.so.3.7, needed by
lib/libLLVMObject.so.3.7.1, not found (try using -rpath or -rpath-link)
. . .

Context details:

# freebsd-version -ku; uname -aKU
11.0-CURRENT
11.0-CURRENT
FreeBSD FreeBSDx64 11.0-CURRENT FreeBSD 11.0-CURRENT #24 r297769M: Sat Apr =
 9
20:42:30 PDT 2016=20=20=20=20
markmi@FreeBSDx64:/usr/obj/clang/amd64.amd64/usr/src/sys/GENERIC-NODEBUG  a=
md64
1100105 1100105

# svnlite info /usr/ports/
Path: /usr/ports
Working Copy Root Path: /usr/ports
URL: svn://svn.freebsd.org/ports/head
Relative URL: ^/head
Repository Root: svn://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 412919
Node Kind: directory
Schedule: normal
Last Changed Author: antoine
Last Changed Rev: 412919
Last Changed Date: 2016-04-10 04:32:40 -0700 (Sun, 10 Apr 2016)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-208692-13>