[swift-users] libswift frontend ios

Ramakrishna Mallireddy ramakrishna.malli at gmail.com
Mon Mar 21 14:29:29 CDT 2016


After resolving the opengles conflict with llvm code base, I am stuck at
undefined symbol error,

Undefined symbols for architecture i386:

  "(anonymous namespace)::*LoweredValue*::*$_6*::*$_7*::*~$_7()*",
referenced from:

      (anonymous namespace)::*LoweredValue*::*LoweredValue*(*swift*::*irgen*
::*Explosion*&) in libSwift.a(*IRGenSIL*.o)

ld: symbol(s) not found for architecture i386

I am not getting this error, when I link the swift libs generated by the
build script that comes with the swift source.

This error is generated, only when I included all the swift front-end
source[except Immediate.a source ] in my project and compiled it as a
single static library and linked it to my app.

I believe the following code (*IRGenSIL.cpp*) is the one that mentioned in
the error:

*LoweredValue(Explosion &e)*

*    : kind(Kind::Explosion), explosion{{}} {*

*    auto Elts = e.claimAll();*

*    explosion.values.append(Elts.begin(), Elts.end());*

*  }*

Thanks

Ramakrishna

On Fri, Mar 18, 2016 at 3:17 AM, Joe Groff <jgroff at apple.com> wrote:

>
> > On Mar 17, 2016, at 2:22 PM, Ramakrishna Mallireddy <
> ramakrishna.malli at gmail.com> wrote:
> >
> > The libLLVMContainer.dylib is actually from opengl.framework.
> > On iOS the lib may be loaded by opengles.framework and I am not using
> any opengl myself, ios may be loading it by default.
> >
> > I have compiled llvm core & support libs along with my llvmtest code,
> Even then the conflict remains.
> > How to I get around this.
>
> You should statically link in any LLVM libraries you need, ensuring you
> link the versions built as part of your swiftc build. LLVM libraries are
> not ABI-stable, and any LLVM libraries that might happen to be distributed
> in the OS are not for use outside the OS.
>
> -Joe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160322/29dea228/attachment.html>


More information about the swift-users mailing list