0

I'm currently looking into automating a flex build so that we can get it running on a CI server.

After a bit of poking around on the Internet and asking around, Buildr as3 looks like a promising option, but I cannot get it to install correctly. Disclaimer: I am a ruby newbie (or a roob, if you will).

I've tried ruby 1.8.7, 1.9.2 and 1.9.3 with two PCs running the same OS. I get the same error in all cases. I'm using Windows 7 Enterprise 64 bit with SP1. Our development machines and the CI machine all run Windows.

I've been following these steps:

Install errors:

C:>gem install buildr-as3 Fetching: buildr-as3-0.2.19.gem (100%) Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing buildr-as3: ERROR: Failed to build gem native extension.

    C:/Ruby192/bin/ruby.exe extconf.rb

* extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=C:/Ruby192/bin/ruby extconf.rb:45:in open': No such file or directory - C:\Program Files (x86)\Java \jre6\include (Errno::ENOENT) from extconf.rb:45:in'

Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/rjb-1.3.3 for inspection. Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/rjb-1.3.3/ext/gem_make.out

I would paste the contents of mkmf.log, but for some reason it's no longer being created on either of my PCs (looked in both devkit & ruby folders but no sign of it, probably user error).

Googling for the errors I had in the mkmf.log file turned up this pastie, though:

Gist of it:

conftest.c: In function 't': conftest.c:8:53: error: 'random' undeclared (first use in this function) conftest.c:8:53:

It looks like it's trying to build something from source but dependencies are missing, but I can't figure it out. Any ideas? Failing that, is anyone successfully running builder-as3 on Windows and, if so, which versions did you use?

Any help appreciated. Thanks.

Mark Simpson
  • 23,245
  • 2
  • 44
  • 44

3 Answers3

2

The problem is that the JAVA_HOME variable points to a JRE which doesn't have an "include" folder.

Change your environment variable to point to the JDK, which I'm sure you have otherwise it's rather difficult to do any Java development ;)

serverdude
  • 456
  • 5
  • 5
  • Thanks for the reply. I don't (directly) do any Java development, but I do use tools that depend on the JRE (everything else works fine, this is the first problem I've had). You are correct in saying that the "include" folder doesn't exist. In the end, I did get it to install (see my answer), but I ultimately plumped for GradleFx instead. – Mark Simpson Jun 14 '12 at 12:56
1

The problem does not come from buildr-as3, but from one its dependencies, rjb.

rjb doesn't find the folder C:\Program Files (x86)\Java \jre6\include because there is a space in it.

To fix the issue, either consider using jruby or use a java installation and define a JAVA_HOME that don't contain spaces.

Please contact the user mailing list of the buildr project if you need further help!

Antoine Toulme
  • 937
  • 4
  • 15
1

In the end, a colleague suggested I try the following (note the parameter is the same as the one used when installing buildr):

gem install buildr-as3 --platform mswin32

It then installed without errors.

Mark Simpson
  • 23,245
  • 2
  • 44
  • 44