<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi, <br></div>I have tried to build the swift ecosystem on an Ubuntu 15.10 machine loaded with 16GB of RAM and 16GB of swap space. <br></div>What happens is that if you run the "utils/build-script -t" command as suggested, this will use all processors available to speedup the build<br></div>BUT<br></div>it will also try to perform parallel links of tools when finished compiling. <br></div>This is when memory is filled up totally and disks start to grind.<br></div>I tried running the whole thing with just one single job, using: <br><br></div>utils/build-script -j 1 -t<br><br></div>and it took more time to finish but it finished :) <br><br></div>I think there could be room for some enhancements in the way that the build script uses processors : either you know how much RAM isneeded to build the whole thing, or just get down to one single job for the purpose of linking. <br><br><br><div><div><div><div><div><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Message: 7<br>
Date: Mon, 14 Dec 2015 09:03:36 -0500<br>
From: Kevin Lundberg <<a href="mailto:kevin@klundberg.com">kevin@klundberg.com</a>><br>
To: <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
Subject: [swift-users] memory requirements for building swift on<br>
linux?<br>
Message-ID: <<a href="mailto:566ECC38.9030506@klundberg.com">566ECC38.9030506@klundberg.com</a>><br>
Content-Type: text/plain; charset=utf-8<br>
<br>
Hi All,<br>
<br>
I've set up a linux VM (ubuntu 15.10) in virtualbox on my windows PC to<br>
build and test swift on linux, but I've been unable to successfully<br>
build it to completion. I have all the repos including the corelibs<br>
cloned locally, and have followed all the steps as far as I know for<br>
installing dependencies. Every time I build, it fails somewhere during<br>
linking, the last time failing when linking "CXX shared library<br>
lib/libLTO.so".<br>
<br>
I don't have the full error, but I'm curious if there's some RAM<br>
requirement for building swift. My VM had 2GB, and I just bumped it up<br>
to 4GB to try again. Has anyone else run into this, and is there a<br>
recommended minimum needed to successfully build swift with? Could<br>
something else be the cause here instead of RAM if 2GB is in fact enough?<br>
<br>
Thanks!<br>
<br>
-Kevin<br>
<br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Mon, 14 Dec 2015 14:30:22 +0000<br>
From: Tobias Scholze <<a href="mailto:tobias.scholze@gmail.com">tobias.scholze@gmail.com</a>><br>
To: Kevin Lundberg <<a href="mailto:kevin@klundberg.com">kevin@klundberg.com</a>>, <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
Subject: Re: [swift-users] memory requirements for building swift on<br>
linux?<br>
Message-ID:<br>
<CAHZb28bw_7M10b+j69h55ykxunfPUocD=<a href="mailto:SatPMp-doNymNnsGg@mail.gmail.com">SatPMp-doNymNnsGg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi,<br>
to build Swift from the sources I used a 16 GB bare metal machine and it<br>
was not enough.<br>
So I think, you need a lot of memory ( > 16 GB) to have fun while building<br>
it.<br>
<br>
- Toby<br>
<br>
Kevin Lundberg via swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>> schrieb am Mo., 14.<br>
Dez. 2015 um 15:03 Uhr:<br>
<br>
> Hi All,<br>
><br>
> I've set up a linux VM (ubuntu 15.10) in virtualbox on my windows PC to<br>
> build and test swift on linux, but I've been unable to successfully<br>
> build it to completion. I have all the repos including the corelibs<br>
> cloned locally, and have followed all the steps as far as I know for<br>
> installing dependencies. Every time I build, it fails somewhere during<br>
> linking, the last time failing when linking "CXX shared library<br>
> lib/libLTO.so".<br>
><br>
> I don't have the full error, but I'm curious if there's some RAM<br>
> requirement for building swift. My VM had 2GB, and I just bumped it up<br>
> to 4GB to try again. Has anyone else run into this, and is there a<br>
> recommended minimum needed to successfully build swift with? Could<br>
> something else be the cause here instead of RAM if 2GB is in fact enough?<br>
><br>
> Thanks!<br>
><br>
> -Kevin<br>
> _______________________________________________<br>
> swift-users mailing list<br>
> <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
> <a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.swift.org/pipermail/swift-users/attachments/20151214/5ef837e0/attachment-0001.html" rel="noreferrer" target="_blank">https://lists.swift.org/pipermail/swift-users/attachments/20151214/5ef837e0/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 9<br>
Date: Mon, 14 Dec 2015 09:55:19 -0500<br>
From: Kevin Lundberg <<a href="mailto:kevin@klundberg.com">kevin@klundberg.com</a>><br>
To: Tobias Scholze <<a href="mailto:tobias.scholze@gmail.com">tobias.scholze@gmail.com</a>>, <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
Subject: Re: [swift-users] memory requirements for building swift on<br>
linux?<br>
Message-ID: <<a href="mailto:566ED857.90601@klundberg.com">566ED857.90601@klundberg.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
I was able to build it on my 8GB macbook successfully, but there may be<br>
platform differences there that caused that.<br>
<br>
It seems that 4GB isn't enough either, fails when linking clang-3.8.<br>
I'll have to figure something else out for linux for me. Thanks!<br>
<br>
On 12/14/2015 9:30 AM, Tobias Scholze wrote:<br>
> Hi,<br>
> to build Swift from the sources I used a 16 GB bare metal machine and<br>
> it was not enough.<br>
> So I think, you need a lot of memory ( > 16 GB) to have fun while<br>
> building it.<br>
><br>
> - Toby<br>
><br>
> Kevin Lundberg via swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
> <mailto:<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>>> schrieb am Mo., 14. Dez. 2015 um<br>
> 15:03 Uhr:<br>
><br>
> Hi All,<br>
><br>
> I've set up a linux VM (ubuntu 15.10) in virtualbox on my windows<br>
> PC to<br>
> build and test swift on linux, but I've been unable to successfully<br>
> build it to completion. I have all the repos including the corelibs<br>
> cloned locally, and have followed all the steps as far as I know for<br>
> installing dependencies. Every time I build, it fails somewhere during<br>
> linking, the last time failing when linking "CXX shared library<br>
> lib/libLTO.so".<br>
><br>
> I don't have the full error, but I'm curious if there's some RAM<br>
> requirement for building swift. My VM had 2GB, and I just bumped it up<br>
> to 4GB to try again. Has anyone else run into this, and is there a<br>
> recommended minimum needed to successfully build swift with? Could<br>
> something else be the cause here instead of RAM if 2GB is in fact<br>
> enough?<br>
><br>
> Thanks!<br>
><br>
> -Kevin<br>
> _______________________________________________<br>
> swift-users mailing list<br>
> <a href="mailto:swift-users@swift.org">swift-users@swift.org</a> <mailto:<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>><br>
> <a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.swift.org/pipermail/swift-users/attachments/20151214/15e62774/attachment-0001.html" rel="noreferrer" target="_blank">https://lists.swift.org/pipermail/swift-users/attachments/20151214/15e62774/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 10<br>
Date: Mon, 14 Dec 2015 09:04:22 -0800<br>
From: Daniel Dunbar <<a href="mailto:daniel_dunbar@apple.com">daniel_dunbar@apple.com</a>><br>
To: Kevin Lundberg <<a href="mailto:kevin@klundberg.com">kevin@klundberg.com</a>><br>
Cc: <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
Subject: Re: [swift-users] memory requirements for building swift on<br>
linux?<br>
Message-ID: <<a href="mailto:954151C6-67C8-40A9-ADC7-5D7292F7EC04@apple.com">954151C6-67C8-40A9-ADC7-5D7292F7EC04@apple.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
For those hitting this issue, you might try building without debug info to see if that helps (build-script -R).<br>
<br>
- Daniel<br>
<br>
> On Dec 14, 2015, at 6:55 AM, Kevin Lundberg via swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>> wrote:<br>
><br>
> I was able to build it on my 8GB macbook successfully, but there may be platform differences there that caused that.<br>
><br>
> It seems that 4GB isn't enough either, fails when linking clang-3.8. I'll have to figure something else out for linux for me. Thanks!<br>
><br>
> On 12/14/2015 9:30 AM, Tobias Scholze wrote:<br>
>> Hi,<br>
>> to build Swift from the sources I used a 16 GB bare metal machine and it was not enough.<br>
>> So I think, you need a lot of memory ( > 16 GB) to have fun while building it.<br>
>><br>
>> - Toby<br>
>><br>
>> Kevin Lundberg via swift-users < <mailto:<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>><a href="mailto:swift-users@swift.org">swift-users@swift.org</a> <mailto:<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>>> schrieb am Mo., 14. Dez. 2015 um 15:03 Uhr:<br>
>> Hi All,<br>
>><br>
>> I've set up a linux VM (ubuntu 15.10) in virtualbox on my windows PC to<br>
>> build and test swift on linux, but I've been unable to successfully<br>
>> build it to completion. I have all the repos including the corelibs<br>
>> cloned locally, and have followed all the steps as far as I know for<br>
>> installing dependencies. Every time I build, it fails somewhere during<br>
>> linking, the last time failing when linking "CXX shared library<br>
>> lib/libLTO.so".<br>
>><br>
>> I don't have the full error, but I'm curious if there's some RAM<br>
>> requirement for building swift. My VM had 2GB, and I just bumped it up<br>
>> to 4GB to try again. Has anyone else run into this, and is there a<br>
>> recommended minimum needed to successfully build swift with? Could<br>
>> something else be the cause here instead of RAM if 2GB is in fact enough?<br>
>><br>
>> Thanks!<br>
>><br>
>> -Kevin<br>
>> _______________________________________________<br>
>> swift-users mailing list<br>
>> <a href="mailto:swift-users@swift.org">swift-users@swift.org</a> <mailto:<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>><br>
>> <a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a> <<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a>><br>
><br>
><br>
> _______________________________________________<br>
> swift-users mailing list<br>
> <a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
> <a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.swift.org/pipermail/swift-users/attachments/20151214/78f22f84/attachment-0001.html" rel="noreferrer" target="_blank">https://lists.swift.org/pipermail/swift-users/attachments/20151214/78f22f84/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 11<br>
Date: Mon, 14 Dec 2015 09:22:58 -0800<br>
From: Joe Groff <<a href="mailto:jgroff@apple.com">jgroff@apple.com</a>><br>
To: David Turnbull <<a href="mailto:dturnbull@gmail.com">dturnbull@gmail.com</a>><br>
Cc: swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>><br>
Subject: Re: [swift-users] Here's a multi-platform OpenGL loader for<br>
Swift.<br>
Message-ID: <<a href="mailto:42D182F2-C966-4CBD-802E-C0803DDCB97A@apple.com">42D182F2-C966-4CBD-802E-C0803DDCB97A@apple.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
<br>
> On Dec 12, 2015, at 1:39 PM, David Turnbull via swift-users <<a href="mailto:swift-users@swift.org">swift-users@swift.org</a>> wrote:<br>
><br>
> It's looking like the Epoxy requirement for SwiftGL is going away real soon now. I was able to lookup the OpenGL symbols from pure Swift code. No compiled C code is needed at all. What follows is roughly how I will do it. It lazily loads the pointer the first time you use it. The Linux version is only slightly different.<br>
><br>
> Does anyone know a way to do this without the unsafeBitCast?<br>
><br>
> import Darwin<br>
><br>
> let handle = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY)<br>
><br>
> func DLOADglGetIntegerv(a:GLenum, _ b:UnsafeMutablePointer<GLint>) -> Void {<br>
> glGetIntegerv = unsafeBitCast(dlsym(handle, "glGetIntegerv"), glGetIntegerv.dynamicType)<br>
> glGetIntegerv(a,b)<br>
> }<br>
><br>
> public var glGetIntegerv:@convention(c) (GLenum, UnsafeMutablePointer<GLint>) -> Void = { DLOADglGetIntegerv($0,$1) }<br>
<br>
I think the unsafeBitCast is fundamentally necessary here to coerce the void pointer you get from dlsym to a C function pointer. I don't think it's a problem. This is pretty awesome!<br>
<br>
-Joe<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.swift.org/pipermail/swift-users/attachments/20151214/cdccd7e6/attachment-0001.html" rel="noreferrer" target="_blank">https://lists.swift.org/pipermail/swift-users/attachments/20151214/cdccd7e6/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
swift-users mailing list<br>
<a href="mailto:swift-users@swift.org">swift-users@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-users" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-users</a><br>
<br>
<br>
End of swift-users Digest, Vol 1, Issue 43<br>
******************************************<br>
</blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div></div>