-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compilation errors/warnings #35
Comments
Are you cross compiling in a Darwin machine? The C bindings are dynamically linked libraries that need to exist in your system. Because the libraries are specific to each operating system (libxml in darwin is different than libxml in linux), you can't cross compile gokogiri for multiple platforms in the same machine. What you'd have to do is get a machine that mimics the target machine you're trying to compile for and compile the code strictly for that there. So if you need linux_i386, linux_amd64, and darwin, then you need three machines, one of each, and you can compile your code on each one individually. |
That's what I was afraid of :( I guess I will need to setup vagrant. Isn't there a way around where the libraries compiled for each platform are available on my darwin machine and linked at compile time? Seems unlikely but just checking all my options. |
Hmmm, I haven't really tried it, but I guess it would be possible to point the go compiler to different locations for different libraries when compiling for different OSes, each location containing libraries that have been compiled for those systems. |
Actually, that would depend on whether the linkers used can link a library that was not compiled for this system, and I doubt the linker in a linux computer knows what the hell to do with a .dylb file from mac =/ I doubt it's possible. |
When I cross compile my app using gokogiri, I get the following messages:
Everything works well for darwin tho.
The text was updated successfully, but these errors were encountered: