<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Peter, what are you doing specifically. I.e. are you passing any arguments to swift or something like that? Can you give a full reproducer?<div class=""><br class=""></div><div class="">Also can you type swift -v to confirm the version #?</div><div class=""><br class=""></div><div class="">Michael</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 30, 2017, at 12:04 PM, Michael Gottesman via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Interesting... it looks like we /do/ have an integration test that imports glibc into the repl:<div class=""><br class=""></div><div class=""><a href="https://github.com/apple/swift-integration-tests/blob/master/repl/test-repl-glibc.py" class="">https://github.com/apple/swift-integration-tests/blob/master/repl/test-repl-glibc.py</a></div><div class=""><br class=""></div><div class="">Probably could use one that imports Foundation though.</div><div class=""><br class=""></div><div class="">Michael<br class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 30, 2017, at 12:00 PM, Michael Gottesman &lt;<a href="mailto:mgottesman@apple.com" class="">mgottesman@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hmm... this sounds like this may be a good integration test. I am not sure what is going on here though. If I have a moment I will take a look a bit later today.<br class=""><br class="">Michael<br class=""><br class=""><blockquote type="cite" class="">On Jan 28, 2017, at 1:22 PM, Peter Ronnquist via swift-users &lt;<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>&gt; wrote:<br class=""><br class="">I have the same problem with importing Glibc into the REPL with "Swift<br class="">3.1 Development", Ubuntu 16.10, Jan 22, 2017, that was reported on the<br class="">snapshot from 15 December (see below).<br class=""><br class="">Is this working for anyone?<br class=""><br class="">Best Regards<br class="">Peter Ronnquist<br class=""><br class=""><br class=""><br class=""><br class=""><br class="">On Monday 19 December Chris Double wrote:<br class=""><br class=""><br class=""><br class="">Using the Ubuntu 16.10 snapshot from 15 December (or a build from<br class="">master) I can't seem to get "import Foundation" or "import Glibc"<br class="">working in the REPL. Here's an example:<br class=""><br class="">-----------------8&lt;------------------<br class="">$ swift<br class="">Welcome to Swift version 3.1-dev (LLVM 7d4a331ed3, Clang d8c33dc710,<br class="">Swift 2ea7951d05). Type :help for assistance.<br class=""> 1&gt; import Glibc<br class="">&lt;module-includes&gt;:3:10: note: in file included from &lt;module-includes&gt;:3:<br class="">#include "///usr/include/utmp.h"<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^<br class=""><br class="">///usr/include/utmp.h:23:10: note: in file included from<br class="">///usr/include/utmp.h:23:<br class="">#include &lt;sys/types.h&gt;<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^<br class=""><br class="">error: /usr/include/x86_64-linux-gnu/sys/types.h:146:10: error:<br class="">'stddef.h' file not found<br class="">#include &lt;stddef.h&gt;<br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^<br class=""><br class="">error: could not build Objective-C module 'SwiftGlibc'<br class="">-----------------8&lt;------------------<br class=""><br class=""><br class="">This works fine if I use 'swiftc' and compile a file:<br class=""><br class="">$ cat x.swift<br class="">import Glibc<br class=""><br class="">print(random())<br class=""><br class="">$ swiftc x.swift<br class="">$ ./x<br class="">...<br class="">-----------------8&lt;------------------<br class=""><br class="">If I explicitly pass include paths to 'swift' it works in the REPL:<br class=""><br class="">-----------------8&lt;------------------<br class="">$ swift -I/home/user/swift-install/usr/lib/swift/clang/include/<br class="">-I/home/user/swift-install/usr/include/lldb/Symbol/<br class="">Welcome to Swift version 3.1-dev (LLVM 7d4a331ed3, Clang d8c33dc710,<br class="">Swift 2ea7951d05). Type :help for assistance.<br class=""> 1&gt; import Glibc<br class=""> 2&gt; random()<br class="">$R0: Int = 1804289383<br class="">-----------------8&lt;------------------<br class=""><br class="">Is there some setting or installation setup step I'm missing?<br class=""><br class="">-- <br class=""><a href="http://bluishcoder.co.nz/" class="">http://bluishcoder.co.nz</a><br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></div></div>_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></div></blockquote></div><br class=""></div></body></html>