Problems deserializing Numbers - wrong serialVersionUID

597 views
Skip to first unread message

andrew...@gmail.com

unread,
Oct 22, 2014, 11:20:58 AM10/22/14
to j2objc-...@googlegroups.com
Attempting to deserialize a simple class containing a Number subclass (in this case an Integer) fails with an exception, when the source serialized data was created by a real JRE, or with J2ObjC when the writing architecture is different to the reading architecture (e.g. written on 32 bit iOS, read on 64 bit iOS).

Example class:

public class MyObject implements Serializable {

public static final long serialVersionUID = 5943653096623040347L;

private Number theNumber;

public void setTheNumber(Number inNumber) {
this.theNumber = inNumber;
}

public Number getTheNumber() {
return theNumber;
}
}

Used in following Java code to write out serialisation data from java version "1.7.0_60":

MyObject obj = new MyObject();
obj.setTheNumber(new Integer(42));
FileOutputStream fos = new FileOutputStream(new File(FILENAME));
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(obj);


…and then read back using this Java code:

FileInputStream fis = new FileInputStream(new File(FILENAME));
ObjectInputStream ois = new ObjectInputStream(fis);
MyObject readObj = (MyObject) ois.readObject();

…which when translated by j2objc looks like this:

NSString *path = [[NSBundle mainBundle] pathForResource: @"serialized" ofType:@"data"];
JavaIoFileInputStream *fis = [[JavaIoFileInputStream alloc] initWithJavaIoFile:[[JavaIoFile alloc] initWithNSString: path]];
JavaIoObjectInputStream *ois = [[JavaIoObjectInputStream alloc] initWithJavaIoInputStream:fis];
ComCompanyMyObject *readObj = (ComCompanyMyObject *) check_class_cast([ois readObject], [ComCompanyMyObject class]);


When run, this produces an exception with the following message:

*** Terminating app due to uncaught exception 'JavaIoInvalidClassException', reason: 'Incompatible class (SUID): java.lang.Number: static final long serialVersionUID =-8742448824652078965L; but expected java.lang.Number: static final long serialVersionUID =3837013709921908632L;'

…and the following stack trace:


#0 0x000000010d3c8b8a in objc_exception_throw ()
#1 0x000000010c10a301 in JavaIoObjectInputStream_verifyAndInit_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1553
#2 0x000000010c107b55 in JavaIoObjectInputStream_readNewClassDesc_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1326
#3 0x000000010c10395c in JavaIoObjectInputStream_readClassDesc_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:714
#4 0x000000010c107d71 in JavaIoObjectInputStream_readNewClassDesc_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1346
#5 0x000000010c10395c in JavaIoObjectInputStream_readClassDesc_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:714
#6 0x000000010c10857e in JavaIoObjectInputStream_readNewObject_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1366
#7 0x000000010c103f24 in JavaIoObjectInputStream_readNonPrimitiveContent_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:792
#8 0x000000010c1090be in JavaIoObjectInputStream_readObject_2 at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1477
#9 0x000000010c108f90 in -[JavaIoObjectInputStream readObject] at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:426
#10 0x000000010c102f68 in JavaIoObjectInputStream_readFieldValues_2 at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:998
#11 0x000000010c102595 in -[JavaIoObjectInputStream defaultReadObject] at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:175
#12 0x000000010c1065ea in JavaIoObjectInputStream_readObjectForClass_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1147
#13 0x000000010c105658 in JavaIoObjectInputStream_readHierarchy_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1046
#14 0x000000010c1087ff in JavaIoObjectInputStream_readNewObject_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1403
#15 0x000000010c103f24 in JavaIoObjectInputStream_readNonPrimitiveContent_ at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:792
#16 0x000000010c1090be in JavaIoObjectInputStream_readObject_2 at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:1477
#17 0x000000010c108f90 in -[JavaIoObjectInputStream readObject] at ~/jre_emul/build_result/Classes/java/io/ObjectInputStream.m:426


Using jdeserialize to dump the deserialized data:

reset ordered!
reading new string: handle 0x7e0001 bufsz 18
read null classdesc
read new classdesc: handle 0x7e0000 name com.company.MyObject
reading new object: handle 0x7e0002 classdesc [cd 0x7e0000: name com.company.MyObject uid 5943653096623040347]
read null classdesc
read new classdesc: handle 0x7e0004 name java.lang.Number
read new classdesc: handle 0x7e0003 name java.lang.Integer
reading new object: handle 0x7e0005 classdesc [cd 0x7e0003: name java.lang.Integer uid 1360826667806852920]
done reading object for handle 0x7e0005
done reading object for handle 0x7e0002
read: com.company.MyObject _h0x7e0002 = r_0x7e0000;
//// BEGIN stream content output
com.company.MyObject _h0x7e0002 = r_0x7e0000;
//// END stream content output

//// BEGIN class declarations (excluding array classes)
class java.lang.Number implements java.io.Serializable {
}

class java.lang.Integer extends java.lang.Number implements java.io.Serializable {
int value;
}

class com.company.MyObject implements java.io.Serializable {
java.lang.Number theNumber;
}

//// END class declarations

//// BEGIN instance dump
[instance 0x7e0005: 0x7e0003/java.lang.Integer
field data:
0x7e0003/java.lang.Integer:
value: 42
0x7e0004/java.lang.Number:
]
[instance 0x7e0002: 0x7e0000/com.company.MyObject
field data:
0x7e0000/com.company.MyObject:
theNumber: r0x7e0005: java.lang.Integer _h0x7e0005 = r_0x7e0003;
]
//// END instance dump


From digging through the code, the crux of the problem (or as close to it as I can get) is that in JavaIoObjectInputStream_verifyAndInit_(), the call to [JavaIoObjectStreamClass lookupStreamClassWithIOSClass:localClass]; ends up returning the class java.lang.Number with a different serialVersionUID to the localClass variable, hence the exception being thrown.

Does anyone know why this is or can provide any pointers to help with a fix? Currently using J2Objc 0.9.3.1.

Many thanks,

Andrew

Tom Ball

unread,
Oct 22, 2014, 2:09:17 PM10/22/14
to j2objc-...@googlegroups.com
I'll certainly look into it, but we've never promised full serialization compatibility with the JRE, as the two architectures are (obviously) very different. If you are using serialization to send data between a server and client, I recommend using something designed for that case, such as protocol buffers. The Android team has a lightweight, fast protobuf library called Nano some teams are successfully using in-house. JSON is another option, especially if your data is limited to string key-value maps, arrays, and primitives.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Ebling

unread,
Oct 22, 2014, 2:48:59 PM10/22/14
to j2objc-...@googlegroups.com
Thanks Tom. Compatibility with JRE serialization files is not a problem per se, but compatibility within j2objc between 32 and 64 bit devices is much more of an issue. It's simply interesting that the same problem occurs with serialization files from JRE.

Sent from my iPhone
You received this message because you are subscribed to a topic in the Google Groups "j2objc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/j2objc-discuss/1zCZYvxBGhY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to j2objc-discus...@googlegroups.com.

Tom Ball

unread,
Oct 22, 2014, 3:05:31 PM10/22/14
to j2objc-...@googlegroups.com
Ever wonder why the Swing team refused to use serialization, and wrote java.beans archiver classes instead? ;-)

To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.

Tom Ball

unread,
Nov 19, 2014, 3:59:33 PM11/19/14
to j2objc-...@googlegroups.com
This should be working with release 0.9.5.

On Wed Oct 22 2014 at 12:05:30 PM Tom Ball <tb...@google.com> wrote:
Ever wonder why the Swing team refused to use serialization, and wrote java.beans archiver classes instead? ;-)

On Wed Oct 22 2014 at 11:49:01 AM Andrew Ebling <andrew...@gmail.com> wrote:
Thanks Tom. Compatibility with JRE serialization files is not a problem per se, but compatibility within j2objc between 32 and 64 bit devices is much more of an issue. It's simply interesting that the same problem occurs with serialization files from JRE.

Sent from my iPhone
To unsubscribe from this group and all its topics, send an email to j2objc-discuss+unsubscribe@googlegroups.com.

Tarun Gupta

unread,
Sep 28, 2015, 7:07:24 AM9/28/15
to j2objc-discuss
Hi Tom,

I am working on sending messages cross platform and implementing DHT using freepastry. While sending message I got below error while Serializing/ Deserializing on android code. 

java.lang.RuntimeException: java.io.InvalidClassException: [I; Incompatible class (SUID): [I: static final long serialVersionUID =-6435596488789528755L; but expected [I: static final long serialVersionUID =5600894804908749477L;


As per your last comment this was resolved with release of 0.9.5. Could you please suggest a way round to tackle the above error or does it need serialization alternative.


Thanks,

Tarun


On Thursday, 20 November 2014 02:29:33 UTC+5:30, Tom Ball wrote:
This should be working with release 0.9.5.

On Wed Oct 22 2014 at 12:05:30 PM Tom Ball <tb...@google.com> wrote:
Ever wonder why the Swing team refused to use serialization, and wrote java.beans archiver classes instead? ;-)

On Wed Oct 22 2014 at 11:49:01 AM Andrew Ebling <andrew...@gmail.com> wrote:
Thanks Tom. Compatibility with JRE serialization files is not a problem per se, but compatibility within j2objc between 32 and 64 bit devices is much more of an issue. It's simply interesting that the same problem occurs with serialization files from JRE.

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "j2objc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/j2objc-discuss/1zCZYvxBGhY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to j2objc-discus...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.

Tom Ball

unread,
Sep 28, 2015, 12:54:36 PM9/28/15
to j2objc-discuss
This doesn't involve any JRE classes I know of, as neither of those serialVersionUID numbers are in our source base or Android's libcore library. The issue may be a serializable class that doesn't define a serialVersionUID, and the mechanism for calculating a default number is different on the two platforms. If that's true for a JRE class, please file a bug with the name of the problem class. If it's not a JRE class but is publicly shareable, please attach the class's source.

Once that's done, you should be able to fix this by defining an explicit serialVersionUID (calculated using the JDK's serialver utility) and making sure all platforms sharing that file are updated to include it.

Tarun Gupta

unread,
Sep 29, 2015, 7:57:21 AM9/29/15
to j2objc-discuss
Hi Tom,

Thanks for your reply and its not a JRE class. We could not able to figure out which class is creating a problem related to serialVersionUID. The complete error which is generated by android systems after sending a message:

09-29 17:01:58.436: I/System.out(30561): 0x33F63B:rice.p2p.scribe@myScribeInstance:20150929.170158.435:Exception in deserializer in PastryEndpoint ScribeImpl[[SNH: <0x33F63B..>//192.168.1.104:5554]] myScribeInstance -968778621:myScribeInstance rice.p2p.scribe.javaserialized.JavaScribeContentDeserializer@dc5bc0d java.io.InvalidClassException: [I; Incompatible class (SUID): [I: static final long serialVersionUID =-6435596488789528755L; but expected [I: static final long serialVersionUID =5600894804908749477L;


09-29 17:12:34.222: I/System.out(31101): :rice.selector@Default:20150929.171234.221:ERROR (SelectorManager.run):  java.lang.RuntimeException: java.io.InvalidClassException: [I; Incompatible class (SUID): [I: static final long serialVersionUID =-6435596488789528755L; but expected [I: static final long serialVersionUID =5600894804908749477L;


Attached is the complete stack trace of the above error.

It would be helpful if you could suggest in which class we need to specify the serialVersionUID.

Thanks,
Tarun Gupta
Stacktrace.rtf

Tom Ball

unread,
Sep 29, 2015, 11:16:26 PM9/29/15
to j2objc-discuss
Thanks, the stacktrace helped. It looks like the issue is with serializing arrays; they don't have serialVersionUID fields, and computing the value for arrays is incorrect. Until this is fixed, serialized classes with non-volatile array fields should have their own serialVersionUID (or use ArrayLists instead).

Tom Ball

unread,
Sep 30, 2015, 12:57:56 PM9/30/15
to j2objc-discuss
Which system is reporting this error? The line number for ObjectInputStream.verifyAndInit() doesn't match j2objc's runtime, which checks for and waives matching of array classes. If the JVM is throwing this exception, it's not adhering to the specification defined in Serializable's javadoc.

Tom Ball

unread,
Sep 30, 2015, 4:53:31 PM9/30/15
to j2objc-discuss
I verified that array serialVersionUIDs are correctly being ignored. Compile the attached and run it with Java, it will fail because arrayuids-in.bin doesn't exist. Copy the just-created arrayuids-out.bin to arrayuids-in.bin, and running it again will show it works with the JVM. Now build and run with j2objc ("j2objc ArrayUIDs.java; j2objcc ArrayUIDs.m; ./a.out ArrayUIDs"), and that works, though a different arrayuids-out.bin will be generated because of internal class differences. Copy that to arrayuids-in.bin, then rerun the JVM version to verify it can read the j2objc-generated bin file without problem.

As for what classes to specify a serialVersionUID, it normally a good idea to do so for all serializable classes. If you open your project in Eclipse, it will warn when they aren't present, and will generate the correct string if you ask it to correct each warning. If that's too much work, I'd start with serializable classes that have int[] fields, since that's the reported type in the exception.
ArrayUIDs.java

Tarun Gupta

unread,
Oct 1, 2015, 7:39:56 AM10/1/15
to j2objc-discuss
Hi Tom,

Actually we are trying to implement DHT (Freepastry) on phones - Android and iOS. We are using standard Java code for android and the same code converted by j2ObjC for running app on iOS. It works fine for sending messages on same platform. For cross platform there comes the serialization error.

We have tried the following:
1) We followed the solution suggested by you and tried running ArrayUIDs.java. It worked fine both ways.
2) We have added eclipse generated serialVersionUID in all the files which implemented Serializable interface directly or indirectly. (Verified this in eclipse. There were no warnings/errors regarding serialization).
3) Converted the above code in j2ObjC.
4) The above code works fine when we try communicating between Java to Java. But when sending messages from j2ObjC code to Java Code the same error as stated above occurs. 
"09-29 17:01:58.436: I/System.out(30561): 0x33F63B:rice.p2p.scribe@myScribeInstance:20150929.170158.435:Exception in deserializer in PastryEndpoint ScribeImpl[[SNH: <0x33F63B..>//192.168.1.104:5554]] myScribeInstance -968778621:myScribeInstance rice.p2p.scribe.javaserialized.JavaScribeContentDeserializer@dc5bc0d java.io.InvalidClassException: [I; Incompatible class (SUID): [I: static final long serialVersionUID =-6435596488789528755L; but expected [I: static final long serialVersionUID =5600894804908749477L;"

We tried searching for serialVersionUID's : -6435596488789528755L and 5600894804908749477L but could not find it in any of the classes. Moreover the stack-trace also do not clearly indicate the suspected filename. 
Moreover the serialization program provided by you worked fine both ways ie, j2ObjC to Java and vice versa. 
So this puts me in a dilemma. I cannot understand what could be the root cause or logic behind such a discrepancy.
Could you please shed some light on it. 

Bruno

unread,
Oct 1, 2015, 11:50:18 AM10/1/15
to j2objc-discuss
I'd be wary of using this as it doesn't appear to be actively maintained. From the site, the most recent release was six years old and openly advertises their poor security:

Current release is 2.1 (March 13, 2009).

Minimal security (no support for malicious nodes)

It's also not published as a package and isn't anywhere to be found on MavenCentral or JCenter. That means we'll never do continuous build or testing of the library. As such I'd strongly suggest looking to see if there's another better maintained library that's suitable for you.

Tom Ball

unread,
Oct 1, 2015, 1:33:24 PM10/1/15
to j2objc-...@googlegroups.com
The issue appears to be that the JVM on your server is checking the serialVersionUID of int[] (aka "[I"), even though that violates the java.lang.Serializable doc-comment about array versions. We should be able to force JVM serialVersionUIDs for primitive arrays, but that may prove difficult to fake for object arrays since default UIDs are calculated using a secure hash.

Please file a short bug regarding this (cut&paste anything useful from this thread), so you'll be notified as soon as it's fixed.

Tom Ball

unread,
Oct 1, 2015, 2:59:25 PM10/1/15
to j2objc-...@googlegroups.com
No need for the bug report -- I found why default serialVersionUIDs for arrays were different. That calculation includes the class's modifiers, and it turns out all arrays are "public abstract final", not "public" (a new "gotcha" Java interview question :-). Changing that in the runtime, and now all arrays have the same UIDs, even different object classes.

Here's the fix, if you want to try it before the change is reviewed and promoted:

--- a/j2objc/jre_emul/Classes/IOSArrayClass.m
+++ b/j2objc/jre_emul/Classes/IOSArrayClass.m
@@ -25,6 +25,7 @@
 #import "NSCopying+JavaCloneable.h"
 #import "java/io/Serializable.h"
 #import "java/lang/InstantiationException.h"
+#import "java/lang/reflect/Modifier.h"
 
 @implementation IOSArrayClass
 
@@ -94,6 +95,11 @@
   return [IOSObjectArray arrayWithLength:0 type:componentType_];
 }
 
+- (int)getModifiers {
+  return JavaLangReflectModifier_PUBLIC | JavaLangReflectModifier_ABSTRACT
+      | JavaLangReflectModifier_FINAL;
+}
+
 - (BOOL)isEqual:(id)anObject {
   return [anObject isKindOfClass:[IOSArrayClass class]] &&
     [componentType_ isEqual:[anObject getComponentType]];

Tarun Gupta

unread,
Oct 5, 2015, 4:36:11 AM10/5/15
to j2objc-discuss
Thanks Tom, I stuck into another problem where after getting the latest source code with your changes I ran into compilation issue. Below is the description:

Building j2objc annotations

mvn -q generate-resources dependency:sources

building j2objc jar

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:24: error: package org.objectweb.asm does not exist

import org.objectweb.asm.AnnotationVisitor;

                        ^

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:25: error: package org.objectweb.asm does not exist

import org.objectweb.asm.ClassReader;

                        ^

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:26: error: package org.objectweb.asm does not exist

import org.objectweb.asm.ClassVisitor;

                        ^

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:27: error: package org.objectweb.asm does not exist

import org.objectweb.asm.Opcodes;

                        ^

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:185: error: cannot find symbol

          ClassReader classReader = new ClassReader(file.getInputStream());

          ^

  symbol:   class ClassReader

  location: class PackagePrefixes

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:185: error: cannot find symbol

          ClassReader classReader = new ClassReader(file.getInputStream());

                                        ^

  symbol:   class ClassReader

  location: class PackagePrefixes

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:186: error: cannot find symbol

          classReader.accept(new ClassVisitor(Opcodes.ASM5) {

                                 ^

  symbol:   class ClassVisitor

  location: class PackagePrefixes

src/main/java/com/google/devtools/j2objc/util/PackagePrefixes.java:186: error: cannot find symbol

          classReader.accept(new ClassVisitor(Opcodes.ASM5) {

                                              ^

  symbol:   variable Opcodes

  location: class PackagePrefixes

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

8 errors

make[1]: *** [/Users/tarun/Downloads/j2objc/translator/build_result/j2objc.jar] Error 1

make: *** [translator] Error 2


Any help would be required! 


Regards,

Tarun Gupta

harshl...@gmail.com

unread,
Oct 5, 2015, 5:39:09 AM10/5/15
to j2objc-discuss
Hi Bruno,
Could you suggest a better library to implement DHT other than FreePastry??
Thanks in advance.

harshl...@gmail.com

unread,
Oct 5, 2015, 5:41:12 AM10/5/15
to j2objc-discuss
Hi Tom,
I stumbled into a similar problem as Tarun described i.e., compilation issue. Could you plz help!

Thanks in advance.

Keith Stanger

unread,
Oct 5, 2015, 10:24:33 AM10/5/15
to j2objc-discuss
There was an error in our Maven pom.xml file, which has since been fixed: https://github.com/google/j2objc/commit/4999c249ee2c3d929f7dc9f30942cac3a5d5db5f

Harsh Lal

unread,
Oct 6, 2015, 4:42:06 AM10/6/15
to j2objc-discuss
Hi Keith,
I tried the pom fix. I also tried with different versions of asm jar but of no help. The jar is being downloaded(checked) but somehow the java file is unable to reference it via import statements.
I am still getting the same error when trying to make dist for j2objC clone!

Keith Stanger

unread,
Oct 6, 2015, 9:16:19 AM10/6/15
to j2objc-...@googlegroups.com
You're right this is broken on github. I'll have a fix in shortly. The fix is to add this line to java_deps/jars.mk:
ASM_JAR = asm-5.0.4.jar

Bruno

unread,
Oct 6, 2015, 11:32:24 AM10/6/15
to j2objc-...@googlegroups.com
I searched around and couldn't find anything else. The most promising one to me seemed to be Openkad but same as FreePastry, it doesn't appears to be maintained or available on JCenter or Maven Central. So I'm stuck at this point

Harsh Lal

unread,
Oct 6, 2015, 11:57:10 PM10/6/15
to j2objc-discuss
Same here Bruno. Anywayz I will keep searching until I find something good. Do update me if you find something similar.

Tarun Gupta

unread,
Oct 7, 2015, 12:42:09 AM10/7/15
to j2objc-discuss
Hi Keith,
I tried with this fix but yet I am not able to build the project.

Following is the error I receive:

Building j2objc annotations

mvn -q generate-resources dependency:sources

building j2objc jar

Note: src/main/java/com/google/devtools/j2objc/types/AbstractTypeBinding.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Makefile:1380: ../make/static_framework.mk: No such file or directory

make[1]: *** No rule to make target `../make/static_framework.mk'.  Stop.

make: *** [jre_emul_jar_dist] Error 2

Tom Ball

unread,
Oct 7, 2015, 1:00:58 AM10/7/15
to j2objc-discuss
static_framework.mk is still under development. Running "make dist" shouldn't invoke it, only "make dist_all" (so don't run the latter).

Tarun Gupta

unread,
Oct 7, 2015, 1:05:52 AM10/7/15
to j2objc-discuss
Hi Tom,

I am using the "make dist". Please refer the complete logs below:

TARUNs-MacBook-Pro:j2objc tarun$ make dist

Locale:

Darwin TARUNs-MacBook-Pro.local 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

Xcode 7.0 Build version 7A220

Apple LLVM version 7.0.0 (clang-700.0.72)

Target: x86_64-apple-darwin14.5.0

Thread model: posix


Environment:

Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.spmHkVSmHt/Render

DISPLAY=/private/tmp/com.apple.launchd.Qdo725mHqd/org.macosforge.xquartz:0

HOME=/Users/tarun

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home

LC_CTYPE=UTF-8

LOGNAME=tarun

M2_HOME=/usr/local/apache-maven-3.3.3

MAKEFLAGS=

MAKELEVEL=1

MFLAGS=

PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/apache-maven-3.3.3/bin

PWD=/Users/tarun/Documents/j2objc

SHELL=/bin/bash

SHLVL=2

SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.8RSUP9qv7b/Listeners

TERM=xterm-256color

TERM_PROGRAM=Apple_Terminal

TERM_PROGRAM_VERSION=343.7

TERM_SESSION_ID=52C1C6AD-0FA2-4A52-B639-C20FD85AAF64

TMPDIR=/var/folders/y8/f8sqqmkn6sn2t_4tr7vsqzwh0000gn/T/

USER=tarun

XPC_FLAGS=0x0

XPC_SERVICE_NAME=0


Makefile:1380: ../make/static_framework.mk: No such file or directory

make[1]: *** No rule to make target `../make/static_framework.mk'.  Stop.

make: *** [jre_emul_jar_dist] Error 2


Thanks,

Tarun Gupta

...

Keith Stanger

unread,
Oct 7, 2015, 9:21:55 AM10/7/15
to j2objc-discuss
Hey Tom, static_framework.mk is included by a number of makefiles now, so it's required even without building "dist_all".

Tom Ball

unread,
Oct 7, 2015, 4:44:22 PM10/7/15
to j2objc-discuss
The code is waiting for your review. ;-)  cl/104890514

Tarun Gupta

unread,
Oct 8, 2015, 1:55:04 AM10/8/15
to j2objc-discuss
Hey Keith and Tom, Thanks for your extended support. I got this working and could able to communicate cross-platform. You guys are amazing :)

...
Reply all
Reply to author
Forward
0 new messages