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

getting started #54

Open
ddyer0 opened this issue May 7, 2014 · 7 comments
Open

getting started #54

ddyer0 opened this issue May 7, 2014 · 7 comments

Comments

@ddyer0
Copy link

ddyer0 commented May 7, 2014

I'm no novice, but I've been unable to get the samples to compile or find any active support forum.

On Windows 7, the complaint is
LLVM ERROR: Error: Unable to launch the Java Virtual Machine.
I have about a dozen JVMs installed, the default is 64 bit java 1.8_05

It would help if there were some FAQ about specifying explicitly what JVM to use.
Or a more visible community forum. The adobe forum is essentially unused.

@vpmedia
Copy link

vpmedia commented May 8, 2014

Try setting JAVA_OPTS environment variable (-Xms1024m -Xmx8192 in my example):
http://docs.ubmatrix.com/webhelp/xda/1_0_1/Configure_Java_Environment_Options_%28JAVA_OPTS%29.htm

@ddyer0
Copy link
Author

ddyer0 commented May 8, 2014

Setting JAVA_OPTS environment variable made no difference, but I eventually succeeded by adding
-jvmopt=-Xmx1G to BASE_CFLAGS in Makefile.common

The next stumble is while compiling sample 5
-------- Sample 5 --------

Now compile a SWC and demo SWF
"/cygdrive/c/crossbridge/sdk/usr/bin/g++" -Werror -Wno-write-strings -Wno-trigraphs -jvmopt=-Xmx1G -O4 MurmurHash3.cpp a
s3api.cpp main.cpp -emit-swc=sample.MurmurHash -o MurmurHash.swc
"C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0/bin/mxmlc" -static-link-runtime-shared-libraries -co
mpiler.omit-trace-statements=false -library-path=MurmurHash.swc -debug=false swcdemo.as -o swcdemo.swf
dirname: extra operand Files\\Adobe\\Adobe' Trydirname --help' for more information.
Error: Unable to access jarfile C:/crossbridge/cygwin/lib/mxmlc.jar
Makefile:2: recipe for target T05' failed make[2]: *** [T05] Error 1 make[2]: Leaving directory/cygdrive/c/crossbridge/samples/05_SWC'
Makefile:35: recipe for target T05' failed make[1]: *** [T05] Error 2 make[1]: Leaving directory/cygdrive/c/crossbridge/samples'
Makefile:2: recipe for target `all' failed
make: *** [all] Error 2

@vpmedia
Copy link

vpmedia commented May 8, 2014

Looks like a path issue:
Try using: $(call nativepath,$(FLEX))
Or directly: $(shell cygpath -at mixed $(FLEX))
Also space in path names could lead to errors, you can move the sdk or use shortened path:
/cygdrive/c/Progra~1/Flex...
Also you can use AIR SDK instead of Flex:
https://www.adobe.com/devnet/air/air-sdk-download.html

@ddyer0
Copy link
Author

ddyer0 commented May 8, 2014

It was a path issue, moving the target sdk to /cygdrive/c/crossbridge/4.6.0 worked

@ddyer0
Copy link
Author

ddyer0 commented May 8, 2014

Where does the default value (that I had to override) -Xmx1500M come from? It doesn't appear anywhere in distribution that I can find.

@vpmedia
Copy link

vpmedia commented May 8, 2014

https://github.com/adobe-flash/crossbridge/blob/master/llvm-gcc-4.2-2.9/gcc/config/avm2/avm2.h
line 158

I've removed this in my fork because I think it's better to depend on JAVA_OPTS env. or supply by param.

@ddyer0
Copy link
Author

ddyer0 commented May 12, 2014

After the above, the "samples" build still failed on sample 5.

My explanation is that my typical devlopers path is full of all kinds of stuff, including perl,
msvc, some version or other of cygwin, some random unix command tools, and so on.
I eventually fixed the rest of the samples build process by cleaning up my path.

In run.bat, before the path modification

set a minimal path to avoid contamination of the environment with unexpected programs

note this includes the JDK path we want to use

set path=C:\java\jdk1.8.0\bin;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;

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

2 participants