-
Notifications
You must be signed in to change notification settings - Fork 80
Met No matching .ll file
error while running llgo-dist on MacOS
#36
Comments
Hi there, thanks for the report. I'm in the middle of getting PNaCl support working again, so it's a little bit untidy. You're getting the error because llgo-dist is trying to build for MacOS, when it should be building for the PNaCl target. What you should be doing instead (when it works properly) is something like: In the mean time you could try this: make a copy Please do send a pull request for fixing panic on MacOS. I don't have a Mac, so I don't know what needs to happen there. |
Thanks for the quick reply. The build can continue after copying But I have met several redeclaration errors in the following build. I have commented the whole file I will send out the pull request later, I have just replace the |
FWIW it works fine if you change the target triple to "x86_64-apple-macosx10.7.0" or "i386-apple-macosx10.7.0". Running
Haven't taken a closer look at what might be the cause yet. |
@hzmangel I fixed the sync/atomic issue today - can you please pull the latest changes and retest? Also, I'd really prefer not to drag in pthread so if quarnster's suggestions fixes the TLS usage, then let's leave panic.c alone. @quarnster It looks a bit like on MacOS, global symbols are given a preceding underscore. I think each asm("symbolname") in |
@axw That does indeed appear to be the case :)
|
@axw Sorry for the late reply. I have pulled the newest
Do you have any idea about this? |
@hzmangel It looks like llgo can't find the LLVM shared library; I think you need to set DYLD_LIBRARY_PATH (to the LLVM lib directory). llgo-dist builds llgo with "-r" (rpath), though, so I don't know why it should need that. |
@axw Thanks for the reply, I have set the environment variable before but still has no effect. The |
@quarnster , the thread-local issue has been fixed with the suggested methods, thanks. @axw I have created a lib directory and made a symlink of libLLVM-3.3svn.dylib and the llgo can be executed now. I am continue trying to build PNaCl module with llgo, thanks for your amazing tool. By the way, in your blog post of PNaCl, it shows a |
@hzmangel Thanks. That's a bit of a pain (having to create the lib dir manually), but shouldn't be too much of a problem when llgo binary distributions are generated. Regarding the blog post: llgo-link got deleted because I found there was no need to do anything special in the linker after all. Just use llvm-link directly. Having said that, I did try to build a PNaCl module a few nights ago and came across problems that were not present before. I think I may have broken the runtime type generate code, and there's also an issue with how the PP_* structures are declared in Go code (namely the function pointers are no longer the same width). I'll leave this issue open for now, because I think llgo ought to auto-detect the right triple to support TLS properly. I'll open a new issue to get PNaCl working again. |
Opened #37 |
@axw Thanks. I will follow those tickets and do the test on MacOS. |
Using darwin11 rather than just darwin enables TLS support, making llgo-dist run without manually specifying a target triple. Related to go-llvm#36
This can also be closed, right? |
Yes indeed, thanks. |
I was following post http://blog.awilkins.id.au/2012/12/go-in-browser-llgo-does-pnacl.html to install
llgo
on my Mac for writing PNaCl code, but I have met this problem:I have checked the syscall directory but only find
asm_linux_amd64.ll
andasm_linux_arm.ll
. Could you please tell me how to get the .ll file for MacOS?Here are some information of my dev env:
go get github.com/axw/llgo/cmd/llgo-dist
Thanks.
By the way, I have met some error while running llgo-dist in
pkg/runtime/panic.c
, the reason is because of thread-local variable is not supported by compiler on MacOS, I have made some changes in my local version and will submit a pull request if needed.The text was updated successfully, but these errors were encountered: