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
jre_emul_dist Error 2: #915
Comments
There's something unusual in your Mac's build environment (if you aren't building on a Mac, then close this bug since a Mac is required to build with any iOS or macOS SDK). First, run Next, run If those are okay, run |
Hi Tom! Yesterday it turned out to launch Reversi on an iPhone, thanks!
And today again the problem is: "J2OBJC_HOME not currently defined in Settings.xcconfig, currently set to '/ Users / bohan / j2objc-dist'
Command / bin / sh failed with exit code 1 ".
What's wrong?
I understand the technology correctly:
1. Release the J2OBJC release to the root directory ($ HOME)
2. Source code in the project directory
3. In the project folder I make make dist
4. After the successful execution of Update the Build Settings and Adding a J2ObjC Build Rule
If the above is true, then
J2OBJC_HOME = $ HOME / J2OBJC;
or
J2OBJC_HOME = project directory / J2OBJC / dist;
?
Sincerely, Nick
…Среда, 29 ноября 2017, 22:28 +06:00 от Tom Ball ***@***.***>:
There's something unusual in your Mac's build environment (if you aren't building on a Mac, then close this bug since a Mac is required to build with any iOS or macOS SDK).
First, run ps to make sure you are using the bash shell. While other shells probably work, that's the default Mac shell and what the j2objc team uses.
Next, run clang --version to see if it's at least version 8 (current version is 9.0.0), and xcrun --show-sdk-version to check for an iOS SDK of 9 or higher.
If those are okay, run which make to ensure you're running /usr/bin/make, and make -v to make sure you're running GNU Make 3.8 or later. That's important because some of j2objc's build macros use the $? operator .
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub , or mute the thread .
|
There's no magic here: J2OBJC_HOME is just an environment variable. Try testing it on the command line, outside of Xcode:
If it lists the j2objc command, then that's the right variable. If instead you get "ls: /Users/bohan/j2objc-dist: No such file or directory", then there's the problem. It has nothing to do with j2objc itself, but just how environment variables are used by the command-line and Xcode. One important point is that Mac and Linux file systems are case-sensitive. Since few directories on those systems use names with all capital letters, the convention is to use all capitals for environment variables so it's easy to tell the difference at a glance. There is no directory called J2OBJC, it is j2objc. Unfortunately the default Mac filesystem allows case-insensitive matching, but it's a good habit to only refer to directories by their actual names, and not a case-insensitive version. From your comment, my guess is that you built j2objc from source, and its top-level directory is /Users/bohan/j2objc/. If that's true, then the dist directory is under that root directory, in /Users/bohan/j2objc/dist (not j2objc-dist). If that's true, then the following is the right setting in Settings.xcconfig:
|
The dist directory built by the j2objc build is in the j2objc project directory. If you cloned the j2objc source code to /Users/bohan/j2objc, then the right Settings.xcconfig line should be:
|
If you want to test the J2OBJC_HOME setting outside of Xcode, on the command-line run:
You should see the usage message from the j2objc translator. If instead it says "No such file or directory", then export the correct J2OBJC_HOME value, test to verify, then copy that value to Settings.xcconfig. |
What am I doing wrong:
|
Or do I need to unpack the source code, put my project's directory there and run the myProject / make dist command through the terminal? |
A little bit about yourself. I am 58 years old. 5 years ago I lost my job. In search of work I began to be engaged in programming. I created websites. But the competition is very big. This year I decided to get acquainted with the development for iPhone (the experience of 3 months of independent learning). A week ago, a company invited me for a probationary period. They want to adapt their Android applications to the iPhone. 11/27/2017 I found your program. |
Your settings all look good. All the circled issues list shows is that the
linker failed, not why it failed. To get details, click on the conversation
list icon (under the 2 in Torgai2 in your screen shots), select the last
build log, then expand the failing line to get the details.
…On Sat, Dec 2, 2017 at 11:58 AM NikolBoh ***@***.***> wrote:
What am I doing wrong:
1. I downloaded and unzipped the release 2.0.5 (not the source).
2. Created a new project in Xcode.
3. Added to the project folder with classes of my project in Java /
4. Set up in Build Settings (as in the screenshots).
5. I started the project.
What's wrong?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#915 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC2kr8H2JVZeiLMeqQacx5ZtdARQ0dG8ks5s8avzgaJpZM4Qu7Vw>
.
|
Your choice of j2objc worries me. It is NOT a tool that magically converts
Android apps to iOS, but many managers think so and then make their
engineers jump though very difficult hoops.
What it is designed is to do is support experienced engineering teams that
write *cross-platform* Java, which requires design skill and discipline.
But both iOS and Android apps are frequently written with the
platform-specific and the cross-platform code mixed together. Porting an
app that was not designed to be cross-platform is very difficult, and it's
often faster and easier to just rewrite it.
j2objc is hard to use in part because developing any app to build and test
on multiple platforms is hard. It normally requires a team with years of
software engineering experience. And j2objc's tool set and documentation
assumes developers using it are software engineers with lots of
experience. There
are many other multi-platform solutions that are easier to use.
<http://thinkapps.com/blog/development/develop-for-ios-v-android-cross-platform-tools/>
Do you have a technical leader you can discuss this with? Check the Android
app's source files, and see how many classes there are that don't have any
android.* or similar imports, which cannot be translated as is. If most
classes have Android dependencies, then you'll likely be more successful if
you wrote the app from scratch in Swift (if that's what you learned), using
the Android app as a specification for how it should behave.
…On Sat, Dec 2, 2017 at 2:13 PM NikolBoh ***@***.***> wrote:
A little bit about yourself. I am 58 years old. 5 years ago I lost my job.
In search of work I began to be engaged in programming. I created websites.
But the competition is very big. This year I decided to get acquainted with
the development for iPhone (the experience of 3 months of independent
learning). A week ago, a company invited me for a probationary period. They
want to adapt their Android applications to the iPhone. 11/27/2017 I found
your program.
Therefore, please forgive me for idiotic questions.
And forgive me for my English.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#915 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AC2kr1UoyTDWpwdhfyVz7cj4rY1NYjQWks5s8cuQgaJpZM4Qu7Vw>
.
|
Thanks for the answer! I did not expect a full translation from java to object c. But will the classes translate? And that's already a lot, I think. There is a starting point from where to start! Thanks for the link, be sure to get acquainted. (and the class translation continues in j2objc, 16 hours!) |
Tom, I correctly understand that you recommend using JVM (Avian for example) to create a cross-platform. And re-write our application. Or can we move our application to the JVM? How critical is the clarity of the MCV data sharing scheme? (and the translation of classes in j2objc continues, 22 hours!) |
There is an impression that Building libjre_emul.a 7 cycle does (?). This is normal? 28 hours have already passed, and everything works and works. Building libjre_emul.a highlighted. So it should be? Wait when it's over? |
Good afternoon Tom! 29 hours was a transfer and as a result issued: |
Hi!
I first started using j2objc (2.0.5),
After running make dist in the directory /j2objc/ gives an error:
"
Building j2objc annotations
mvn -q generate-resources dependency: sources
building j2objc jar
building jre_emul.jar
building jre_emul-src.jar
/ bin / sh: line 0: [: / Users / XXXX / Documents / ?: binary operator expected
/ bin / sh: line 0: [: / Users / XXXX / Documents / ?: binary operator expected
/ bin / sh: line 0: [: / Users / XXXX / Documents / ?: binary operator expected
/ bin / sh: line 0: [: / Users / XXXX / Documents / ?: binary operator expected
/ bin / sh: line 0: [: / Users / XXXX / Documents / ?: binary operator expected
/ bin / sh: line 0: [: / Users / XXXX / Documents / ?: binary operator expected
/ bin / sh: ... / jre_emul / build_result / Classes / .translate_mark_jre_emul: No such file or directory
....
"
And there are about 30 such lines.
How to fix? What is the reason?
The text was updated successfully, but these errors were encountered: