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 #57

Closed
kheftel-old opened this issue Jul 11, 2014 · 17 comments
Closed

getting started #57

kheftel-old opened this issue Jul 11, 2014 · 17 comments

Comments

@kheftel-old
Copy link

Hi,

I'm on win8.1 update 1, x64.

I followed the readme file, and as soon as I run run.bat, I get the following error:

  0 [main] bash 10120 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer.  Please report this problem to the public mailing list cygwin@cygwin.com

I tried changing my path per this issue, without success: #54

A bunch of googling turned up the following two entries from the mailing list:
https://cygwin.com/ml/cygwin/2012-04/msg00632.html
https://cygwin.com/ml/cygwin/2013-05/msg00145.html

From the information I found there, it looks like a.) something in Windows 8 broke the CWD command, and b.) they have apparently fixed it in a later version.

Can someone help me figure out how to update the cygwin install included in crossbridge? I'd rather not install a standalone cygwin, but I will if I have to.

@kheftel-old
Copy link
Author

I figured it out and got Hello World to compile.

I installed standard 64-bit cygwin, and got the error this guy talks about:
https://forums.adobe.com/thread/1515181

So I installed 32-bit cygwin, and now it works.

On to the other samples and hopefully getting some actual work done.

It might be good to mention these incompatibilities in the readme (bundled cygwin not up to date, cygwin 64-bit not being compatible with crossbridge under 64-bit win8.1, etc)

@kheftel-old
Copy link
Author

Edit: it no longer works. I never got any of the other samples to compile, either.

I created my own super-simple hello world program with no makefile to try and narrow it down.

Here's the code of hello.c:

#include <stdio.h>
int main() 
{
     printf("Hello World!\n"); 
}

and here's the output:

$ /cygdrive/c/crossbridge/sdk/usr/bin/gcc hello.c
      0 [main] cygpath 5260 C:\cygwin\bin\cygpath.exe: *** fatal error - Internal error: TP_NUM_C_BUFS too small: 6815827 > 10
 229066 [main] cygpath 5260 cygwin_exception::open_stackdumpfile: Dumping stack trace to cygpath.exe.stackdump
cc1: error in backend: Failed to run /cygdrive/c/crossbridge/sdk/usr/bin/../../u
sr/bin/llc with args: -jvm=C:\java\jdk1.8\bin\java -filetype=obj C:\cygwin\tmp\c
c78v8jE.o -o C:\cygwin\tmp\cc78v8jE.o -jvmopt -Xmx1500M
Error:
LLVM ERROR: Failed to run C:/cygwin/bin/cygpath.exe with args: -at mixed C:/cygwin/tmp/LLVM_10616/alctmp-862292.as
Error:
      0 [main] cygpath 5260 C:\cygwin\bin\cygpath.exe: *** fatal error - Internal error: TP_NUM_C_BUFS too small: 6815827 > 10
 229066 [main] cygpath 5260 cygwin_exception::open_stackdumpfile: Dumping stack trace to cygpath.exe.stackdump

Stack dump:
0.      Program arguments: C:\crossbridge\sdk\usr\bin\llc.exe -jvm=C:\java\jdk1.8\bin\java -filetype=obj C:\cygwin\tmp\cc78v8jE.o -o C:\cygwin\tmp\cc78v8jE.o -jvmopt -Xmx1500M

I'm running 32-bit cygwin installed in C:\cygwin. Java SDK 64-bit is reachable from cygwin:

$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

Any ideas? What am I missing?

@vpmedia
Copy link

vpmedia commented Jul 13, 2014

You can try to add more memory to the process:

peflags --cygwin-heap=4096 $(SDK)/usr/bin/llc$(EXEEXT)

http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html

Also you can try to add a global java option for similar reasons:

set \_JAVA\_OPTIONS=-Xms512m -Xmx4096m

Edit:
The used CrossBridge version and the available system memory would be useful.

You can try the updated SDK which is built using newer Cygwin:

http://sourceforge.net/projects/crossbridge-community/

@kheftel-old
Copy link
Author

Thanks for the reply! I tried it, it didn't help.

@vpmedia
Copy link

vpmedia commented Jul 13, 2014

You mean you tried both three things (peflags, java_options, newer crossbridge)?
(Plus tip: you can try to compile with gcc using the -v verbose flag)

gcc -v hello.c

)

@kheftel-old
Copy link
Author

I tried peflags, and -jvm-opt -Xmx4096m. I didn't know how to use java_options.

However, I didn't see your edit until now, I'm trying that now.

How do I tell for sure what crossbridge version I have? I THINK 1.0.1, but I can't remember...

Thanks for the new community page! I had no idea https://adobe-flash.github.io/crossbridge/ was discontinued, though I kind of had a feeling. Have you taken over crossbridge then? I see your fork is listed as the github link on that community page instead of the adobe one.

I'm downloading crossbridge 1.0.4 now, I'll let you know if it works. So glad to see that it's not completely abandoned :P

@kheftel-old
Copy link
Author

Here's the result of gcc-v hello.c if you're interested:

$ gcc hello.c -v -jvmopt -Xmx4096m
Using built-in specs.
Target: avm2-unknown-freebsd8
Configured with: /Users/liao/crossbridge2/llvm-gcc-4.2-2.9/configure --enable-la
nguages=c,c++,objc,obj-c++ --enable-llvm=/Users/liao/crossbridge2/build/win/llvm
-install/ --disable-bootstrap --disable-multilib --disable-libada --enable-sjlj-
exceptions --disable-shared --program-prefix= --prefix=/Users/liao/crossbridge2/
build/win/sdkoverlay/usr --with-sysroot= --with-build-sysroot=/Users/liao/crossb
ridge2/build/win/sdkoverlay/ --build=x86_64-apple-darwin10 --host=i686-pc-cygwin
 --target=avm2-unknown-freebsd8
Thread model: posix
gcc version 4.2.1 for Adobe AVM2 (Based on Apple Inc. build 5658) (LLVM build)
 /cygdrive/c/crossbridge/sdk/usr/bin/cc1.exe -quiet -v -iprefix /cygdrive/c/cros
sbridge/sdk/usr/bin/../../usr/lib/avm2-unknown-freebsd8/4.2.1/ hello.c -o /tmp/c
cOSqr6f.o -swf-version-internal=18 -jvmopt=-Xmx1500M -quiet -dumpbase hello.c -a
uxbase hello -version
ignoring nonexistent directory "/Users/liao/crossbridge2/build/win/sdkoverlay/us
r/lib/gcc/avm2-unknown-freebsd8/4.2.1/include"
ignoring nonexistent directory "/cygdrive/c/crossbridge/sdk/usr/bin/../../Users/
liao/crossbridge2/build/win/sdkoverlay/usr/lib/gcc/avm2-unknown-freebsd8/4.2.1/.
./../../../avm2-unknown-freebsd8/include"
#include "..." search starts here:
#include <...> search starts here:
 /cygdrive/c/crossbridge/sdk/usr/bin/../../usr/lib/avm2-unknown-freebsd8/4.2.1/i
nclude
 /cygdrive/c/crossbridge/sdk/usr/bin/../../usr/include
End of search list.
GNU C version 4.2.1 for Adobe AVM2 (Based on Apple Inc. build 5658) (LLVM build)
 (avm2-unknown-freebsd8)
        compiled by GNU C version 4.5.3.
GGC heuristics: --param ggc-min-expand=150 --param ggc-min-heapsize=131072
Compiler executable checksum: 504bd688290e21e02915f4b7e41b1616
      0 [main] cygpath 7224 C:\cygwin\bin\cygpath.exe: *** fatal error - Interna
l error: TP_NUM_C_BUFS too small: 6553700 > 10
 163179 [main] cygpath 7224 cygwin_exception::open_stackdumpfile: Dumping stack
trace to cygpath.exe.stackdump
cc1: error in backend: Failed to run /cygdrive/c/crossbridge/sdk/usr/bin/../../u
sr/bin/llc with args: -jvm=C:\java\jdk1.8\bin\java -filetype=obj C:\cygwin\tmp\c
cOSqr6f.o -o C:\cygwin\tmp\ccOSqr6f.o -jvmopt -Xmx1500M
Error:
LLVM ERROR: Failed to run C:/cygwin/bin/cygpath.exe with args: -at mixed C:/cygw
in/tmp/LLVM_10228/alctmp-844057.as
Error:
      0 [main] cygpath 7224 C:\cygwin\bin\cygpath.exe: *** fatal error - Interna
l error: TP_NUM_C_BUFS too small: 6553700 > 10
 163179 [main] cygpath 7224 cygwin_exception::open_stackdumpfile: Dumping stack
trace to cygpath.exe.stackdump

Stack dump:
0.      Program arguments: C:\crossbridge\sdk\usr\bin\llc.exe -jvm=C:\java\jdk1.
8\bin\java -filetype=obj C:\cygwin\tmp\ccOSqr6f.o -o C:\cygwin\tmp\ccOSqr6f.o -j
vmopt -Xmx1500M

@kheftel-old
Copy link
Author

OK, this is super strange. I downloaded and installed the new update of crossbridge from the community page. I extracted it and ran run.bat. It started downloading a bunch of cygwin updates. When it tried to install them, it errored out with the same code that I was seeing when trying to run gcc on the older cygwin install:

abnormal exit: exit code=-1073741819
running: C:\crossbridgenew\cygwin\bin\bash.exe --norc --noprofile "/etc/postinst
all/update-info-dir.sh"
      0 [main] bash 8700 C:\crossbridgenew\cygwin\bin\bash.exe: *** fatal error
- Internal error: TP_NUM_C_BUFS too small: 7143541 > 10
  95134 [main] bash 8700 cygwin_exception::open_stackdumpfile: Dumping stack tra
ce to bash.exe.stackdump

abnormal exit: exit code=-1073741819
Ending cygwin install

What am I missing? Is there something wrong with my computer LOL?

@kheftel-old
Copy link
Author

Here is a link to the entire output of run.bat: http://khef.co/paste/cygwinerror.html

@ddyer0
Copy link

ddyer0 commented Jul 13, 2014

I found that the cygwin that is part of the download is damaged in various ways.
Get a modern copy of cygwin from the source and configure it to be used instead
of the distrubuted one. Make sure no other cygwin-like tools are leaking into your
active path from other sources. I had a bunch of unix-like programs in my environment
for convenience, but they don't mix well with the cygwin tools.

@kheftel-old
Copy link
Author

Ok, I'll try it using the existing cygwin32 installation I was using with the older version of crossbridge.

@kheftel-old
Copy link
Author

Yes, I read your posts on other forums about your minimal path solution ddyer0. I'm honored that you commented on my thread :). What version of crossbridge was that with?

@ddyer0
Copy link

ddyer0 commented Jul 13, 2014

I'm using the current standard release. It's a shame no one with real knowledge is minding the store.

@kheftel-old
Copy link
Author

I got most of the samples to compile!!! Thanks so much for your help!

Is the current standard release 1.0.4 from this page? http://sourceforge.net/projects/crossbridge-community/

Also, I can't get the Lua example to compile. It ends with a couple of TODOs. Even when I comment out the lines and overlay AIR SDK over Flex SDK so I have mxmlc it doesn't work. I'm no good with MXML, I tried to get the sample to compile in Flash Builder 4.7 as well but I can't quite make it work.

The unfinished lines in the makefile read:

    #TODO: AIR SDK Does not provide MXML support, we should port the example to pure AS3
    #"$(FLEX)/bin/mxmlc" -library-path+=lua.swc luatest.mxml -debug=$(MXMLC_DEBUG) -o luatest.swf
    #TODO: AIR SDK Fails to compile with ambiguous reference to Starling Texture
    #cd LuaStarling && "$(FLEX)/bin/mxmlc" -library-path+=../lua.swc LuaStarling.as -debug=$(MXMLC_DEBUG) -o LuaStarling.swf

When I un-comment those lines, I get:

#TODO: AIR SDK Does not provide MXML support, we should port the example to pure
 AS3
"/cygdrive/c/flexair/bin/mxmlc" -library-path+=lua.swc luatest.mxml -debug=true
-o luatest.swf
Loading configuration: C:\flexair\frameworks\flex-config.xml

Error: C:\crossbridge\samples\Example_Lua\luatest.mxml is of an unsupported type
: mxml

Makefile:32: recipe for target 'all' failed
make: *** [all] Error 2

Can anyone shed any light? What am I missing?

@kheftel-old
Copy link
Author

Also, when I try and compile the lua sample in Flash Builder 4.7, I get hung up on mx:TextArea errors and it can't find sample.lua.vfs.ISpecialFile

@vpmedia
Copy link

vpmedia commented Jul 14, 2014

Hi,
Since no other maintainers are currently active I had to make some bold decisions alone, like:

  • removing bundled cygwin from downloadable sdk
  • deprecate examples using MXML and just use pure AS3 (Apache Flex is hard to install headless in a CI environment)
  • so on...

If you have any major issues with the software please report it using the github ticket system, more optimally send pull requests with fixes ; )

@kheftel-old
Copy link
Author

I have successfully converted the MXML Lua example to a mobile AIR project in FLash Builder. It only loads one lua script, however, and doesn't let you change scripts or alter it.

I get 500 lua-controlled sprites on an iPhone5 at 30fps with no slowdown on an iphone 5. I haven't tried 60 fps yet because including the crossbridge lua script in the project bumped my build time up from a few minutes to a couple of hours. Also, I had to use --swf-verision=17 to get it to compile, as I got a mutex error on the device otherwise.

If you want me to help package this example up for general consumption as a SWF, I would be willing to help out, though I know nothing about git and am a total crossbridge novice.

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

3 participants