Skip to content
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

"building for iOS simulator, but linking in object file built for OSX, for architecture x86_64" #611

Closed
ex3ndr opened this issue Sep 11, 2015 · 13 comments

Comments

@ex3ndr
Copy link

ex3ndr commented Sep 11, 2015

After upgrading to Xcode 7, linker stops to link library from distribution when building for simulator.

@ex3ndr
Copy link
Author

ex3ndr commented Sep 13, 2015

Sorry, but this is very urgent thing as everybody started to switch to xcode 7 after release couple days ago.

@tomball
Copy link
Collaborator

tomball commented Sep 13, 2015

What library? If it's one included in j2objc's distribution, you have the option of building from source, then using the arch-specific libraries in the library's build_result directory. If the issue is with jre_emul, for example, link with jre_emul/build_result/simulator-libjre_emul.a.

Another option is to add the jre_emul/JreEmulation.xcodeproj as a subproject, and link with it instead of using a "-l jre_emul" flag.

@tomball
Copy link
Collaborator

tomball commented Sep 13, 2015

The reason this and your other bug report are currently marked "cannot reproduce" but are still open is because you reported general bugs without enough information to reproduce them.

@ex3ndr
Copy link
Author

ex3ndr commented Sep 14, 2015

Yes, problems is with jre_emul library.

@tomball
Copy link
Collaborator

tomball commented Sep 14, 2015

The problem is that Xcode no longer accepts use of an OS X library for 64-bit simulator models, like iPhone 6 -- even though the code itself is identical. We cannot distribute a single library any more that supports all architectures, because lipo won't accept both OS X x86_64 and an iOS x86_64 builds in the same fat library. We therefore need to change the build so the OS X and iOS archs are in different fat libraries.

One workaround is to use use 32-bit simulator test, like iPhone 4S, until there is a rebuilt release. Another is to add jre_emul/JreEmulation.xcodeproj as a sub-project.

@ex3ndr
Copy link
Author

ex3ndr commented Sep 17, 2015

i make rebuilded version of j2objc 0.9.8.1 and removed OSX support and changed arch type for simulator and prepared truncated package (guava doesn't respect some parameters as jre_emul do).
If anyone is interested in this, they can grab it at link: https://dl.bintray.com/actor/j2objc/j2objc-0.9.8.1.zip

tomball added a commit that referenced this issue Sep 18, 2015
…or iPhone simulator.

	Change on 2015/09/17 by tball <tball@google.com>
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=103293266
@tomball
Copy link
Collaborator

tomball commented Sep 18, 2015

Fixed in current source.

@tomball tomball closed this as completed Sep 18, 2015
@tomball
Copy link
Collaborator

tomball commented Sep 18, 2015

Thanks for working on this, but issue 611 has been fixed by updating our
build.

On Thu, Sep 17, 2015 at 12:22 PM Steve Kite notifications@github.com
wrote:

i make rebuilded version of j2objc 0.9.8.1 and removed OSX support and
changed arch type for simulator and prepared truncated package (guava
doesn't respect some parameters as jre_emul do).
If anyone is interested in this, they can grab it at link:
https://dl.bintray.com/actor/j2objc/j2objc-0.9.8.1.zip


Reply to this email directly or view it on GitHub
#611 (comment).

@tirrorex
Copy link

You saved my day, thanks guys

tomball added a commit that referenced this issue Sep 23, 2015
…mplified type param skipping.

	Change on 2015/09/21 by tball <tball@google.com>
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=103570844
tomball added a commit that referenced this issue Sep 23, 2015
GOOGLE: Xcode Quick Help screen shot at https://screenshot.[].com/cDbakVSdUHh.png
	Change on 2015/09/22 by tball <tball@google.com>
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=103646372
@davidmoore1
Copy link

Is this fix compatible with both XCode 6 and XCode 7? Also is there any plan to make an official release like a 0.9.8.2 that would contain this fix anytime soon?

@tomball
Copy link
Collaborator

tomball commented Sep 25, 2015

Yes, and released: https://github.com/google/j2objc/releases/tag/0.9.8.2

On Fri, Sep 25, 2015 at 8:33 AM David Moore notifications@github.com
wrote:

Is this fix compatible with both XCode 6 and XCode 7? Also is there any
plan to make an official release like a 0.9.8.2 that would contain this fix
anytime soon?


Reply to this email directly or view it on GitHub
#611 (comment).

@tomball
Copy link
Collaborator

tomball commented Sep 30, 2015

Solution is to use the latest release (0.9.8.2.1) or latest source code, as
this issue was closed when it was fixed.

On Tue, Sep 29, 2015 at 7:54 PM gagoongx2 notifications@github.com wrote:

linke error in Xcode 7
(linker command failed with exit code 1)

Solution is below
not include mac x86_64 library in universal
cp -r platform/x86_64-mac/lib/* lib

Plus
If you want to build with libstdc++.
change compiler clang to gcc , g++

  • #CC=clang
  • #CXX=clang
  • CC=gcc
  • CXX=g++

++#STDLIB=libc++
++STDLIB=libstdc++


Reply to this email directly or view it on GitHub
#611 (comment).

@ex3ndr
Copy link
Author

ex3ndr commented Oct 8, 2015

Worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants