[swift-dev] Building swift-3.1-branch from source

Florian Friedrich ffried at me.com
Tue Apr 25 09:43:14 CDT 2017


What version of clang are you using? I’ve had the same problem with clang 3.9 when building on Ubuntu 16.04 on RasPi: https://twitter.com/ffried/status/833985445516165121
Using clang 3.8 worked fine.


best regards,

Florian Friedrich
(CTO / CIO, Senior Developer @ ser.soft GmbH)


> On 25. Apr 2017, at 16:35, Vivian Kong via swift-dev <swift-dev at swift.org> wrote:
> 
> I actually have a question regarding build as well. I haven't been able to build 3.1 branch from source on Ubuntu 16.04 x86_64. I hit this error:
> 
> ./swift/utils/build-script -r
> 
> ...
> 
> swift: using gold linker
> + /usr/bin/cmake --build /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64 -- -j2 all swift-test-stdlib-linux-x86_64
> [5/63] Linking CXX executable bin/swift-reflection-dump
> FAILED: : && /usr/bin/clang++ -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -O2 -L/home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/./lib/swift/linux -target x86_64-unknown-linux-gnu -lpthread -ldl -fuse-ld=gold tools/swift-reflection-dump/CMakeFiles/swift-reflection-dump.dir/swift-reflection-dump.cpp.o -o bin/swift-reflection-dump -L/home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/./lib -lswiftReflection /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/lib/libLLVMObject.a /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/lib/libLLVMSupport.a /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/lib/libLLVMBitReader.a /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/lib/libLLVMCore.a /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/lib/libLLVMMCParser.a /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/lib/libLLVMMC.a /home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/lib/libLLVMSupport.a -lrt -ldl -ltinfo -lpthread -lz -lm -Wl,-rpath,/home/vivkong/swift31/build/Ninja-RelWithDebInfoAssert/llvm-linux-x86_64/./lib && :
> /home/vivkong/swift31/swift/include/swift/Remote/MetadataReader.h:92: error: undefined reference to 'swift::Demangle::mangleNode(std::shared_ptr<swift::Demangle::Node> const&)'
> /home/vivkong/swift31/swift/include/swift/Remote/MetadataReader.h:152: error: undefined reference to 'swift::Demangle::mangleNode(std::shared_ptr<swift::Demangle::Node> const&)'
> /home/vivkong/swift31/swift/include/swift/Reflection/TypeRefBuilder.h:171: error: undefined reference to 'swift::Demangle::mangleNode(std::shared_ptr<swift::Demangle::Node> const&)'
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> [5/63] Linking CXX static library lib/libswiftBasic.a
> ninja: build stopped: subcommand failed.
> ./swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
> 
> I saw https://bugs.swift.org/browse/SR-4147 <https://bugs.swift.org/browse/SR-4147> opened for the master branch (and the workaround is to move to Ubuntu 16.04). I'm actually able to build the 3.1 branch on s390x so I'm wondering if I'm missing some pre-reqs or setting? Any clues would be much appreciated!
> 
> Regards,
> 
> Vivian Kong
> Linux on z Systems Open Source Ecosystem
> IBM Canada Toronto Lab
> 
> <graycol.gif>Ian Partridge ---2017/04/25 10:27:39 AM---On 25 April 2017 at 15:15, Vivian Kong <vivkong at ca.ibm.com> wrote: > I had to remove swift/utils/swi
> 
> From: Ian Partridge <ipartridge at gmail.com>
> To: Vivian Kong/Toronto/IBM at IBMCA
> Cc: Alex Blewitt <alblue at apple.com>, swift-dev <swift-dev at swift.org>
> Date: 2017/04/25 10:27 AM
> Subject: Re: [swift-dev] Building swift-3.1-branch from source
> 
> 
> 
> 
> On 25 April 2017 at 15:15, Vivian Kong <vivkong at ca.ibm.com> wrote:
> > I had to remove swift/utils/swift_build_support/__init__.pyc if it is there (it got generated when I use the checkout script from the master branch). Wonder if that might help you.
> 
> Yes it works!  Thanks!
> 
> -- 
> Ian Partridge
> 
> 
> 
> 
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170425/47aa6880/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3565 bytes
Desc: not available
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20170425/47aa6880/attachment.p7s>


More information about the swift-dev mailing list