So, I have a few of the binaries built but not quite there yet :-)
% uname -a
FreeBSD 11.0-CURRENT #0 r292747: Sat Dec 26 08:34:38 CST 2015
% ../build/Ninja-DebugAssert/swift-freebsd-x86_64/bin/swift --version
Swift version 2.2-dev (LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift 173fc871ff)
Target: x86_64-unknown-freebsd11.0
and again - same error, when it tries to link:
% cat hello.swift
print("hello world")
% ../build/Ninja-DebugAssert/swift-freebsd-x86_64/bin/swiftc hello.swift /usr/bin/ld:/sw/src/build/Ninja-DebugAssert/swift-freebsd-x86_64/lib/swift/freebsd/x86_64/swift.ld:10: syntax error
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
This is on FreeBSD head, clang-3.6 for bootstrapping the swift process
and tip of the trees for all the swift code today.
So, I have a few of the binaries built but not quite there yet :-)
% uname -a
FreeBSD 11.0-CURRENT #0 r292747: Sat Dec 26 08:34:38 CST 2015
% ../build/Ninja-DebugAssert/swift-freebsd-x86_64/bin/swift --version
Swift version 2.2-dev (LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift 173fc871ff)
Target: x86_64-unknown-freebsd11.0
and again - same error, when it tries to link:
% cat hello.swift
print("hello world")
% ../build/Ninja-DebugAssert/swift-freebsd-x86_64/bin/swiftc hello.swift
/usr/bin/ld:/sw/src/build/Ninja-DebugAssert/swift-freebsd-x86_64/lib/swift/freebsd/x86_64/swift.ld:10:
syntax error
clang++: error: linker command failed with exit code 1 (use -v to see
invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see
invocation)
This is on FreeBSD head, clang-3.6 for bootstrapping the swift process
and tip of the trees for all the swift code today.
% ../build/Ninja-DebugAssert/swift-freebsd-x86_64/bin/swift --version Swift version 2.2-dev (LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift bee0d955ff)
Target: x86_64-unknown-freebsd11.0
% ./hello hello world
% uname -a
FreeBSD localhost 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r292747
% ../build/Ninja-DebugAssert/swift-freebsd-x86_64/bin/swiftc hello.swift % ./hello hello world
This happens because the version of ld.bfd shipped with FreeBSD is too
old. Also, gold doesn't support some linker script directives. I
recommend you to install binutils from ports and set the ld.bfd from
binutils as default linker.
Eventually (hopefully soon), FreeBSD will switch to lld as default but
until then, I think it might make sense to add a check in the build
script to make sure the linker version is new enough.
I'll prepare a patch in the next days.
This happens because the version of ld.bfd shipped with FreeBSD is too
old. Also, gold doesn't support some linker script directives. I
recommend you to install binutils from ports and set the ld.bfd from
binutils as default linker.
Eventually (hopefully soon), FreeBSD will switch to lld as default but
until then, I think it might make sense to add a check in the build
script to make sure the linker version is new enough.
I'll prepare a patch in the next days.
Let me know if you face other problems,
···
On Sat, Dec 26, 2015 at 6:50 PM, Dmitri Gribenko <gribozavr@gmail.com> wrote:
+ Davide
On Sat, Dec 26, 2015 at 11:11 PM, Dan Mack via swift-users > <swift-users@swift.org> wrote:
Attempting to build swift from github from Dec 26th HEAD - after a few
adjustments I have gotton to this point where :