[swift-dev] R_ARM_GOT_PREL error when building Swift on Pi from source

Timothy Wood tjw at me.com
Mon Apr 18 01:33:08 CDT 2016


> On Apr 17, 2016, at 1:46 PM, Timothy Wood via swift-dev <swift-dev at swift.org> wrote:
> 
> 
>> On Apr 16, 2016, at 2:23 PM, William Dillon <william at housedillon.com <mailto:william at housedillon.com>> wrote:
>> 
>> What LLVM are you using?
>> 
>> You have to use the one from my github (and the arm branch) or it won't work:
>> 
>> https://github.com/hpux735/swift-llvm/tree/arm <https://github.com/hpux735/swift-llvm/tree/arm> 
>> 
>> I haven't had time to upstream the changes to LLVM.
>> 
>> - Will
> 
> 
> Ah, thanks! I was using <https://github.com/apple/swift-llvm/tree/swift-2.2-branch <https://github.com/apple/swift-llvm/tree/swift-2.2-branch>>, but will give your fork a try!
> 
> -tim
> 

I reset my Pi 3 to a fresh install of Jessie (2016-03-18), did the clang-3.6 install from <http://dev.iachieved.it/iachievedit/open-source-swift-on-raspberry-pi-2/> and tried building with the above mentioned branch of llvm. This fixed the spurious build failures I was seeing, but I’m hitting a persistent build failure now:

[939/1818] Building CXX object tools/clang/utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/ClangAttrEmitter.cpp.o
FAILED: /usr/bin/clang++-3.6   -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_OBJC_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/utils/TableGen -I/home/pi/Source/Swift/llvm/tools/clang/utils/TableGen -I/home/pi/Source/Swift/llvm/tools/clang/include -Itools/clang/include -Iinclude -I/home/pi/Source/Swift/llvm/include -fno-stack-protector -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 -Wdelete-non-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -Wno-nested-anon-types -O3    -UNDEBUG  -fno-exceptions -fno-rtti -MMD -MT tools/clang/utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/ClangAttrEmitter.cpp.o -MF tools/clang/utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/ClangAttrEmitter.cpp.o.d -o tools/clang/utils/TableGen/CMakeFiles/obj.clang-tblgen.dir/ClangAttrEmitter.cpp.o -c /home/pi/Source/Swift/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp
/home/pi/Source/Swift/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp:1075:23: error: no viable conversion from 'ArrayRef<std::pair<Record *, SMRange>>' to 'ArrayRef<llvm::Record *>'
    ArrayRef<Record*> Bases = Search->getSuperClasses();
                      ^       ~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/Source/Swift/llvm/include/llvm/ADT/ArrayRef.h:32:9: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'ArrayRef<std::pair<Record *, SMRange> >' to 'const llvm::ArrayRef<llvm::Record *> &' for 1st argument
  class ArrayRef {
        ^
/home/pi/Source/Swift/llvm/include/llvm/ADT/ArrayRef.h:32:9: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'ArrayRef<std::pair<Record *, SMRange> >' to 'llvm::ArrayRef<llvm::Record *> &&' for 1st argument
  class ArrayRef {
...

I might try again tomorrow updating to a newer clang build, or maybe I should just wave the white flag and rewrite my tiny codebase in C++ instead of trying to use Swift here, and wait for it to be a bit more stable/supported.

-tim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160417/789510bf/attachment.html>


More information about the swift-dev mailing list