nokogiri build process

218 views
Skip to first unread message

Aaron Patterson

unread,
Jan 27, 2011, 4:46:03 PM1/27/11
to nokogi...@googlegroups.com
I've updated the build process in master so that JRuby uses rake-compiler.

To compile and run the tests with MRI:

$ gem install hoe rake-compiler racc rexical
$ rake

To compile and run the tests with JRuby

$ gem install racc rexical
$ jgem install hoe rake-compiler
$ jruby -S rake

To package the MRI gem:

$ rake package

To package the JRuby gem:

$ jruby -S rake package

I'll work to remove the dependency on C Ruby for the JRuby build
process, but it isn't really high on my priority list.

--
Aaron Patterson
http://tenderlovemaking.com/

Yoko Harada

unread,
Jan 27, 2011, 5:38:12 PM1/27/11
to nokogi...@googlegroups.com
On Thu, Jan 27, 2011 at 4:46 PM, Aaron Patterson
<aaron.p...@gmail.com> wrote:
> I've updated the build process in master so that JRuby uses rake-compiler.
>
> To compile and run the tests with MRI:
>
>  $ gem install hoe rake-compiler racc rexical
>  $ rake
>
> To compile and run the tests with JRuby
>
>  $ gem install racc rexical
>  $ jgem install hoe rake-compiler
>  $ jruby -S rake

This looks simple and consistent to CRuby version.
I confirmed this worked with JRuby.

>
> To package the MRI gem:
>
>  $ rake package
>
> To package the JRuby gem:
>
>  $ jruby -S rake package

But, this seems not to work.

cp tmp/java/nokogiri/nokogiri.jar lib/nokogiri.jar
rake aborted!
Don't know how to build task 'pkg/nokogiri-1.5.0.beta.3-java'

(See full trace by running task with --trace)


https://gist.github.com/799442 is the output with --trace option

-Yoko

>
> I'll work to remove the dependency on C Ruby for the JRuby build
> process, but it isn't really high on my priority list.
>
> --
> Aaron Patterson
> http://tenderlovemaking.com/
>

> --
> You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
> To post to this group, send email to nokogi...@googlegroups.com.
> To unsubscribe from this group, send email to nokogiri-tal...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nokogiri-talk?hl=en.
>
>

Aaron Patterson

unread,
Jan 27, 2011, 5:50:27 PM1/27/11
to nokogi...@googlegroups.com
On Thu, Jan 27, 2011 at 2:38 PM, Yoko Harada <yok...@gmail.com> wrote:
> On Thu, Jan 27, 2011 at 4:46 PM, Aaron Patterson
> <aaron.p...@gmail.com> wrote:
>> I've updated the build process in master so that JRuby uses rake-compiler.
>>
>> To compile and run the tests with MRI:
>>
>>  $ gem install hoe rake-compiler racc rexical
>>  $ rake
>>
>> To compile and run the tests with JRuby
>>
>>  $ gem install racc rexical
>>  $ jgem install hoe rake-compiler
>>  $ jruby -S rake
>
> This looks simple and consistent to CRuby version.
> I confirmed this worked with JRuby.
>
>>
>> To package the MRI gem:
>>
>>  $ rake package
>>
>> To package the JRuby gem:
>>
>>  $ jruby -S rake package
>
> But, this seems not to work.
>
> cp tmp/java/nokogiri/nokogiri.jar lib/nokogiri.jar
> rake aborted!
> Don't know how to build task 'pkg/nokogiri-1.5.0.beta.3-java'
>
> (See full trace by running task with --trace)
>
>
> https://gist.github.com/799442 is the output with --trace option

What version of hoe are you using? It may be a bug in hoe, and we
need to require a newer version.

Yoko Harada

unread,
Jan 27, 2011, 8:36:21 PM1/27/11
to nokogi...@googlegroups.com
On Thu, Jan 27, 2011 at 5:50 PM, Aaron Patterson

I updated hoe to 2.8.0, but no difference.
I'm suspecting the gem name. I have nokogiri-1.5.0.beta.3.gem, but the
error message says 'pkg/nokogiri-1.5.0.beta.3-java'
Maybe, the suffix "-java" should be deleted.

-Yoko

>
> --
> Aaron Patterson
> http://tenderlovemaking.com/
>

Aaron Patterson

unread,
Jan 28, 2011, 1:50:24 AM1/28/11
to nokogi...@googlegroups.com

Sorry, I forgot to push a commit. It should work now. :-)

Yoko Harada

unread,
Jan 28, 2011, 3:42:45 PM1/28/11
to nokogi...@googlegroups.com
On Fri, Jan 28, 2011 at 1:50 AM, Aaron Patterson

Aaron, it still doesn't work.

I freshly cloned out and tried rake. It was worse. Somewhat rake
expects nokogiri.jar is created in lib/nokogiri/nokogiri.jar, but
actually, nokogiri.jar was created in lib/nokogiri.jar. I wonder you
have old nokogiri.jar in your lib/nokogiri/nokogiri.jar. The file size
of released version of nokogiri.jar is not the same as freshly
compiled one.

Maybe something is different from your repo and mine. Every time I run
rake, I get the warning, WARNING: Could not perform some
cross-compiling: No MinGW tools or unknown setup platform? Do you see
this warning?

-Yoko

>
> --
> Aaron Patterson
> http://tenderlovemaking.com/
>

Aaron Patterson

unread,
Jan 28, 2011, 4:28:43 PM1/28/11
to nokogi...@googlegroups.com
On Fri, Jan 28, 2011 at 12:42 PM, Yoko Harada <yok...@gmail.com> wrote:
>> Sorry, I forgot to push a commit.  It should work now.  :-)
>
> Aaron, it still doesn't work.
>
> I freshly cloned out and tried rake. It was worse. Somewhat rake
> expects nokogiri.jar is created in lib/nokogiri/nokogiri.jar, but
> actually, nokogiri.jar was created in lib/nokogiri.jar. I wonder you
> have old nokogiri.jar in your lib/nokogiri/nokogiri.jar. The file size
> of released version of nokogiri.jar is not the same as freshly
> compiled one.

Oops, I'm really sorry. I just pushed again. Please try the latest master.

> Maybe something is different from your repo and mine. Every time I run
> rake, I get the warning, WARNING: Could not perform some
> cross-compiling: No MinGW tools or unknown setup platform? Do you see
> this warning?

I don't get that warning, but I have the cross compile toolchain
installed. If you don't install cross compile tools, then you'll see
that warning. But if you don't need to cross compile, then don't
worry about it.

Yoko Harada

unread,
Jan 28, 2011, 5:49:41 PM1/28/11
to nokogi...@googlegroups.com
On Fri, Jan 28, 2011 at 4:28 PM, Aaron Patterson
<aaron.p...@gmail.com> wrote:
> On Fri, Jan 28, 2011 at 12:42 PM, Yoko Harada <yok...@gmail.com> wrote:
>>> Sorry, I forgot to push a commit.  It should work now.  :-)
>>
>> Aaron, it still doesn't work.
>>
>> I freshly cloned out and tried rake. It was worse. Somewhat rake
>> expects nokogiri.jar is created in lib/nokogiri/nokogiri.jar, but
>> actually, nokogiri.jar was created in lib/nokogiri.jar. I wonder you
>> have old nokogiri.jar in your lib/nokogiri/nokogiri.jar. The file size
>> of released version of nokogiri.jar is not the same as freshly
>> compiled one.
>
> Oops, I'm really sorry.  I just pushed again.  Please try the latest master.

Thanks. Now, "jruby -S rake" worked. But, "jruby -S rake package"
still doesn't work.

jruby -S rake package
(in /Users/yoko/Works/nokogiri/package-test/nokogiri)
warning: couldn't activate the debugging plugin, skipping
warning: couldn't activate the git plugin, skipping
warning: couldn't activate the gemspec plugin, skipping


WARNING: Could not perform some cross-compiling: No MinGW tools or
unknown setup platform?

cp tmp/java/nokogiri/nokogiri.jar lib/nokogiri/nokogiri.jar
rake aborted!
Don't know how to build task 'pkg/nokogiri-1.5.0.beta.4-java'

(See full trace by running task with --trace)


This task worked with CRuby, though.

>
>> Maybe something is different from your repo and mine. Every time I run
>> rake, I get the warning, WARNING: Could not perform some
>> cross-compiling: No MinGW tools or unknown setup platform? Do you see
>> this warning?
>
> I don't get that warning, but I have the cross compile toolchain
> installed.  If you don't install cross compile tools, then you'll see
> that warning.  But if you don't need to cross compile, then don't
> worry about it.

I understood. I'll ignore this warning.

-Yoko

>
> --
> Aaron Patterson
> http://tenderlovemaking.com/
>

Aaron Patterson

unread,
Jan 28, 2011, 6:00:04 PM1/28/11
to nokogi...@googlegroups.com

Sorry this keeps breaking for you Yoko. I *think* rake-compiler
defines the 'pkg/nokogiri-1.5.0.beta.4-java' task. I'm running:

[apatterson@higgins ~]$ gem list rake-compiler hoe

*** LOCAL GEMS ***

rake-compiler (0.7.1, 0.7.0)
[apatterson@higgins ~]$ gem list hoe

*** LOCAL GEMS ***

hoe (2.8.0, 2.6.2, 2.6.0)
hoe-debugging (1.0.1)
hoe-gemspec (1.0.0)
hoe-git (1.3.0)
hoe-seattlerb (1.2.2)
[apatterson@higgins ~]$

What versions do you have?

Yoko Harada

unread,
Jan 28, 2011, 11:14:24 PM1/28/11
to nokogi...@googlegroups.com
On Fri, Jan 28, 2011 at 6:00 PM, Aaron Patterson

I'm going to write what caused this problem for people who are
watching this thread.

The difference between Aaron's and my environment was JRuby's version.
I was using JRuby 1.6.0RC1, but Aaron was not. When I switched to
JRuby 1.5.5, rake package worked fine. It is JRuby's regression. I
filed this issue, http://jira.codehaus.org/browse/JRUBY-5438

For sure, JRuby 1.6.0RC1 is fine to *use* Nokogiri as well as compile it.

-Yoko

>
> --
> Aaron Patterson
> http://tenderlovemaking.com/
>

Reply all
Reply to author
Forward
0 new messages