[llvm-dev] cmake with -DLLVM_ENABLE_PROJECTS=all fails

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] cmake with -DLLVM_ENABLE_PROJECTS=all fails

Amara Emerson via llvm-dev
What am I doing wrong?

I'm testing a patch I plan to submit which will remove the capability
for llvm_add_library to create both STATIC and SHARED libraries with
one invocation. As far as I can tell it's not used but I want to test
it as best I can. So I thought I test it by building "all" projects,
but I get many failures like:

    `.data' can not be used when making a PIE object; recompile with -fPIC

I built using:

  $ cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS=all
-DCMAKE_INSTALL_PREFIX=/home/wink/xxx -DCMAKE_BUILD_TYPE=Release
  $ ninja -j11 -v

I'm on an Arch Linux system with newish gcc:

  $ uname -a
  Linux wink-desktop 5.1.2-arch1-1-ARCH #1 SMP PREEMPT Wed May 15
00:09:47 UTC 2019 x86_64 GNU/Linux
  $ gcc --version
  gcc (GCC) 8.3.0
  Copyright (C) 2018 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And here is the first errors:

[3542/3545] cd /home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/tools/llgo
&& /usr/bin/cmake -E make_directory
/home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/tools/llgo/CMakeFiles
&& /usr/bin/cmake -E touch
/home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/tools/llgo/CMakeFiles/libgo-complete
&& /usr/bin/cmake -E touch
/home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/tools/llgo/libgo-prefix/src/libgo-stamp/libgo-done
[3543/3545] cd /home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/tools/llgo
&& /home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/bin/llgo
-static-libgo -o
/home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/lib/go/llgo-9.0.0/cgo
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/ast.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/doc.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/gcc.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/godefs.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/main.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/out.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/util.go
/home/wink/prgs/llvm/llvm-project/llgo/cmd/cgo/zdefaultcc.go
FAILED: lib/go/llgo-9.0.0/cgo
cd /home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/tools/llgo
&& /home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/bin/llgo
-static-libgo -o
/home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/lib/go/llgo-9.0.0/cgo
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/ast.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/doc.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/gcc.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/godefs.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/main.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/out.go
/home/wink/prgs/llvm/llvm-project/llgo/third_party/gofrontend/libgo/go/cmd/cgo/util.go
/home/wink/prgs/llvm/llvm-project/llgo/cmd/cgo/zdefaultcc.go
/usr/bin/ld: /tmp/llgo909121886.o: relocation R_X86_64_32S against
`.data' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /home/wink/prgs/llvm/llvm-project/build-Remove-unused-static-and-shared-library-building-in-llvm_add_library-enable_projects-clang-llgo/lib/libgo-llgo.a(go-append.o):
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when
making a PIE object; recompile with -fPIC
...
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev