You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Andrew Pietsch <an...@pietschy.com> on 2008/05/19 06:06:54 UTC

Tests not working on Mac OS 10.4 PPC

Hi all,

I decided to try and figure out why my
package(:jar).merge(artifact(ANTLR_RUNTIME)) wasn't working so I checked
buildr out of svn and tried to run the tests (using Intellij IDEA).  I'm
getting fatal errors for all tests, I've attached the exception below.

Any ideas?

$ ruby --version
ruby 1.8.5 (2006-12-25 patchlevel 12) [powerpc-darwin8.8.0]
$ buildr --version
Buildr 1.3.0
$ java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
Java HotSpot(TM) Client VM (build 1.5.0_13-120, mixed mode, sharing)

Running specs...
Exec: /opt/local/bin/ruby -e
STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /opt/local/bin/spec
/Users/andrew/svn/buildr/spec/application_spec.rb
/Users/andrew/svn/buildr/spec/archive_spec.rb
/Users/andrew/svn/buildr/spec/artifact_namespace_spec.rb
/Users/andrew/svn/buildr/spec/artifact_spec.rb
/Users/andrew/svn/buildr/spec/build_spec.rb
/Users/andrew/svn/buildr/spec/checks_spec.rb
/Users/andrew/svn/buildr/spec/common_spec.rb
/Users/andrew/svn/buildr/spec/compile_spec.rb
/Users/andrew/svn/buildr/spec/groovy_compilers_spec.rb
/Users/andrew/svn/buildr/spec/java_bdd_frameworks_spec.rb
/Users/andrew/svn/buildr/spec/java_compilers_spec.rb
/Users/andrew/svn/buildr/spec/java_packaging_spec.rb
/Users/andrew/svn/buildr/spec/java_spec.rb
/Users/andrew/svn/buildr/spec/java_test_frameworks_spec.rb
/Users/andrew/svn/buildr/spec/packaging_spec.rb
/Users/andrew/svn/buildr/spec/project_spec.rb
/Users/andrew/svn/buildr/spec/scala_compilers_spec.rb
/Users/andrew/svn/buildr/spec/test_spec.rb
/Users/andrew/svn/buildr/spec/transport_spec.rb
/Users/andrew/svn/buildr/spec/version_requirement_spec.rb -fs -c
/Users/andrew/svn/buildr/lib/buildr/java/version_requirement.rb:47:in
`create': Failed to parse ">=1.5.3" due to:
/opt/local/lib/ruby/site_ruby/1.8/rubygems/version.rb:89:in `match': can't
convert Fixnum into String (RuntimeError)
    from
/Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:451:in
`requirement_hash'
    from
/Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:399:in
`initialize'
    from
/Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:607:in
`new'
    from
/Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:607:in
`need'
    from
/Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:603:in
`each_pair'
    from
/Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:603:in
`need'
    from /Users/andrew/svn/buildr/lib/buildr/java/groovyc.rb:137:in `inject'
    from
/Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:601:in
`each'
     ... 22 levels...
    from /opt/local/bin/spec:16:in `load'
    from /opt/local/bin/spec:16
    from -e:1:in `load'
    from -e:1

Re: Tests not working on Mac OS 10.4 PPC

Posted by Andrew Pietsch <an...@pietschy.com>.
>
> > At this point I'm going to give up.  Do you know if there's any reason
> rake
> > doesn't updated it's dependency to rjb 1.1.3?  That version installs fine
> on
> > my box.
>
> 1.1.3 won't install on Windows.
>
> The dependency is set in line 31 of the Rakefile, so if you're using
> rake install you can edit this line and use 1.1.3 instead of 1.1.2.
>

It gets better (c:

rake install
(in /Users/andrew/svn/buildr)
Please run rake setup to install the Docter document generation library
Compiling Java libraries ...
ruby -Ilib -Iaddon bin/buildr compile
/usr/local/lib/ruby/gems/1.8/gems/rjb-1.1.3/lib/rjbcore.bundle: Failed to
load /usr/local/lib/ruby/gems/1.8/gems/rjb-1.1.3/lib/rjbcore.bundle
(LoadError)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /usr/local/lib/ruby/gems/1.8/gems/rjb-1.1.3/lib/rjb.rb:21
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`gem_original_require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
        from ./lib/buildr/java/rjb.rb:17
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from ./lib/buildr/java.rb:18
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from ./lib/buildr.rb:32
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from bin/buildr:19
rake aborted!
Command failed with status (1): [ruby -Ilib -Iaddon bin/buildr compile...]
/Users/andrew/svn/buildr/rakefile:41
(See full trace by running task with --trace)

Sadly I think it's time to give up.  As great though buildr looks, any
confidence that I can rely on it (more so its dependencies) in the heat of
battle has been shot )c:

Thanks for all your help thus far.

Cheers
Andrew

Re: Tests not working on Mac OS 10.4 PPC

Posted by Assaf Arkin <ar...@intalio.com>.
On Tue, May 20, 2008 at 11:20 PM, Andrew Pietsch <an...@pietschy.com> wrote:
>>
>> It looks like locale.h might be the problem?
>>
>> I have one in /usr/include/locale.h and one in
>> /Developer/SDKs/MacOSX10.5.sdk/usr/include/locale.h.  The later comes
>> from the Apple developer tools, should also be there in the OS 10.4
>> SDK.
>>
>
> I've updated to the latest xcode for 10.4.  I now have usr/include/locale.h
> the one under /Developer/...   but the compile still fails with the same
> errors.
>
> At this point I'm going to give up.  Do you know if there's any reason rake
> doesn't updated it's dependency to rjb 1.1.3?  That version installs fine on
> my box.

1.1.3 won't install on Windows.

The dependency is set in line 31 of the Rakefile, so if you're using
rake install you can edit this line and use 1.1.3 instead of 1.1.2.

Assaf

>
> Cheers
> Andrew
>



-- 
CTO, Intalio
http://www.intalio.com

Re: Tests not working on Mac OS 10.4 PPC

Posted by Andrew Pietsch <an...@pietschy.com>.
>
> It looks like locale.h might be the problem?
>
> I have one in /usr/include/locale.h and one in
> /Developer/SDKs/MacOSX10.5.sdk/usr/include/locale.h.  The later comes
> from the Apple developer tools, should also be there in the OS 10.4
> SDK.
>

I've updated to the latest xcode for 10.4.  I now have usr/include/locale.h
the one under /Developer/...   but the compile still fails with the same
errors.

At this point I'm going to give up.  Do you know if there's any reason rake
doesn't updated it's dependency to rjb 1.1.3?  That version installs fine on
my box.

Cheers
Andrew

Re: Tests not working on Mac OS 10.4 PPC

Posted by Assaf Arkin <ar...@intalio.com>.
On Mon, May 19, 2008 at 10:27 PM, Andrew Pietsch <an...@pietschy.com> wrote:
>>
>> You'll need a more recent version of RubyGems, some features depend on it,
>> so:
>>
>> sudo gem update --system
>>
>> You might also have to upgrade to Ruby 1.8.6, I'm not sure if 1.8.5 will
>> work or not, in which case, check the script we link to (uses MacPorts or
>> Fink):
>>
>> http://incubator.apache.org/buildr/getting_started.html#osx
>>
>
> Yep, my mistake.  I've installed a later version of ruby and all was going
> well until rake tried to install rjb 1.1.2.
>
> Installing #<Gem::Specification name=rjb version=1.1.2> ...
> sudo env JAVA_HOME=/Library/Java/Home /usr/local/bin/ruby -S gem install rjb
> -v 1.1.2
> Bulk updating Gem source index for: http://gems.rubyforge.org/
> Building native extensions. This could take a while...
> ERROR: Error installing rjb:
>        ERROR: Failed to build gem native extension.
>
> /usr/local/bin/ruby extconf.rb install rjb -v 1.1.2
> checking for jni.h... yes
> checking for dl.h... yes
> checking for locale_charset() in iconv.h... no
> checking for nl_langinfo() in langinfo.h... no
> checking for setlocale() in locale.h... no
> checking for getenv()... no
> creating extconf.h
> creating Makefile

On my machine I get:

checking for jni.h... yes
checking for dl.h... yes
checking for locale_charset() in iconv.h... no
checking for nl_langinfo() in langinfo.h... yes
checking for setlocale() in locale.h... yes
checking for getenv()... yes
creating extconf.h
creating Makefile

It looks like locale.h might be the problem?

I have one in /usr/include/locale.h and one in
/Developer/SDKs/MacOSX10.5.sdk/usr/include/locale.h.  The later comes
from the Apple developer tools, should also be there in the OS 10.4
SDK.

Assaf

>
> make
> gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
> -I/Library/Java/Home/include -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g
> -O2 -fno-common -pipe -fno-common -I/Library/Java/Home/include -arch i386 -c
> load.c
> gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
> -I/Library/Java/Home/include -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g
> -O2 -fno-common -pipe -fno-common -I/Library/Java/Home/include -arch i386 -c
> riconv.c
> riconv.c: In function 'get_charcode_name_by_locale':
> riconv.c:64: error: 'LOCALE_UTF8_TABLE' undeclared (first use in this
> function)
> riconv.c:64: error: (Each undeclared identifier is reported only once
> riconv.c:64: error: for each function it appears in.)
> riconv.c:66: error: 'LOCALE_EUC_TABLE' undeclared (first use in this
> function)
> riconv.c:68: error: 'LOCALE_SJIS_TABLE' undeclared (first use in this
> function)
> make: *** [riconv.o] Error 1
>
>
> Gem files will remain installed in
> /usr/local/lib/ruby/gems/1.8/gems/rjb-1.1.2 for inspection.
> Results logged to
> /usr/local/lib/ruby/gems/1.8/gems/rjb-1.1.2/ext/gem_make.out
> rake aborted!
> Command failed with status (1): [sudo env JAVA_HOME=/Library/Java/Home
> /usr...]
>
>
> I think I'm stuck. buildr doesn't run at all now and rjb version 1.1.0
> through to 1.1.2 fail to install manually. In searching the user lists it
> seems this problem has been encountered on windows. Is there a known
> workaround for the Mac?
>



-- 
CTO, Intalio
http://www.intalio.com

Re: Tests not working on Mac OS 10.4 PPC

Posted by Andrew Pietsch <an...@pietschy.com>.
>
> You'll need a more recent version of RubyGems, some features depend on it,
> so:
>
> sudo gem update --system
>
> You might also have to upgrade to Ruby 1.8.6, I'm not sure if 1.8.5 will
> work or not, in which case, check the script we link to (uses MacPorts or
> Fink):
>
> http://incubator.apache.org/buildr/getting_started.html#osx
>

Yep, my mistake.  I've installed a later version of ruby and all was going
well until rake tried to install rjb 1.1.2.

Installing #<Gem::Specification name=rjb version=1.1.2> ...
sudo env JAVA_HOME=/Library/Java/Home /usr/local/bin/ruby -S gem install rjb
-v 1.1.2
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while...
ERROR: Error installing rjb:
        ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install rjb -v 1.1.2
checking for jni.h... yes
checking for dl.h... yes
checking for locale_charset() in iconv.h... no
checking for nl_langinfo() in langinfo.h... no
checking for setlocale() in locale.h... no
checking for getenv()... no
creating extconf.h
creating Makefile

make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
-I/Library/Java/Home/include -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g
-O2 -fno-common -pipe -fno-common -I/Library/Java/Home/include -arch i386 -c
load.c
gcc -I. -I. -I/usr/local/lib/ruby/1.8/universal-darwin8.0 -I.
-I/Library/Java/Home/include -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g
-O2 -fno-common -pipe -fno-common -I/Library/Java/Home/include -arch i386 -c
riconv.c
riconv.c: In function 'get_charcode_name_by_locale':
riconv.c:64: error: 'LOCALE_UTF8_TABLE' undeclared (first use in this
function)
riconv.c:64: error: (Each undeclared identifier is reported only once
riconv.c:64: error: for each function it appears in.)
riconv.c:66: error: 'LOCALE_EUC_TABLE' undeclared (first use in this
function)
riconv.c:68: error: 'LOCALE_SJIS_TABLE' undeclared (first use in this
function)
make: *** [riconv.o] Error 1


Gem files will remain installed in
/usr/local/lib/ruby/gems/1.8/gems/rjb-1.1.2 for inspection.
Results logged to
/usr/local/lib/ruby/gems/1.8/gems/rjb-1.1.2/ext/gem_make.out
rake aborted!
Command failed with status (1): [sudo env JAVA_HOME=/Library/Java/Home
/usr...]


I think I'm stuck. buildr doesn't run at all now and rjb version 1.1.0
through to 1.1.2 fail to install manually. In searching the user lists it
seems this problem has been encountered on windows. Is there a known
workaround for the Mac?

Re: Tests not working on Mac OS 10.4 PPC

Posted by Assaf Arkin <ar...@intalio.com>.
On Sun, May 18, 2008 at 9:06 PM, Andrew Pietsch <an...@pietschy.com> wrote:

> Hi all,
>
> I decided to try and figure out why my
> package(:jar).merge(artifact(ANTLR_RUNTIME)) wasn't working so I checked
> buildr out of svn and tried to run the tests (using Intellij IDEA).  I'm
> getting fatal errors for all tests, I've attached the exception below.
>
> Any ideas?


You'll need a more recent version of RubyGems, some features depend on it,
so:

sudo gem update --system

You might also have to upgrade to Ruby 1.8.6, I'm not sure if 1.8.5 will
work or not, in which case, check the script we link to (uses MacPorts or
Fink):

http://incubator.apache.org/buildr/getting_started.html#osx

Assaf


>
> $ ruby --version
> ruby 1.8.5 (2006-12-25 patchlevel 12) [powerpc-darwin8.8.0]
> $ buildr --version
> Buildr 1.3.0
> $ java -version
> java version "1.5.0_13"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
> Java HotSpot(TM) Client VM (build 1.5.0_13-120, mixed mode, sharing)
>
> Running specs...
> Exec: /opt/local/bin/ruby -e
> STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /opt/local/bin/spec
> /Users/andrew/svn/buildr/spec/application_spec.rb
> /Users/andrew/svn/buildr/spec/archive_spec.rb
> /Users/andrew/svn/buildr/spec/artifact_namespace_spec.rb
> /Users/andrew/svn/buildr/spec/artifact_spec.rb
> /Users/andrew/svn/buildr/spec/build_spec.rb
> /Users/andrew/svn/buildr/spec/checks_spec.rb
> /Users/andrew/svn/buildr/spec/common_spec.rb
> /Users/andrew/svn/buildr/spec/compile_spec.rb
> /Users/andrew/svn/buildr/spec/groovy_compilers_spec.rb
> /Users/andrew/svn/buildr/spec/java_bdd_frameworks_spec.rb
> /Users/andrew/svn/buildr/spec/java_compilers_spec.rb
> /Users/andrew/svn/buildr/spec/java_packaging_spec.rb
> /Users/andrew/svn/buildr/spec/java_spec.rb
> /Users/andrew/svn/buildr/spec/java_test_frameworks_spec.rb
> /Users/andrew/svn/buildr/spec/packaging_spec.rb
> /Users/andrew/svn/buildr/spec/project_spec.rb
> /Users/andrew/svn/buildr/spec/scala_compilers_spec.rb
> /Users/andrew/svn/buildr/spec/test_spec.rb
> /Users/andrew/svn/buildr/spec/transport_spec.rb
> /Users/andrew/svn/buildr/spec/version_requirement_spec.rb -fs -c
> /Users/andrew/svn/buildr/lib/buildr/java/version_requirement.rb:47:in
> `create': Failed to parse ">=1.5.3" due to:
> /opt/local/lib/ruby/site_ruby/1.8/rubygems/version.rb:89:in `match': can't
> convert Fixnum into String (RuntimeError)
>    from
> /Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:451:in
> `requirement_hash'
>    from
> /Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:399:in
> `initialize'
>    from
> /Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:607:in
> `new'
>    from
> /Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:607:in
> `need'
>    from
> /Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:603:in
> `each_pair'
>    from
> /Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:603:in
> `need'
>    from /Users/andrew/svn/buildr/lib/buildr/java/groovyc.rb:137:in `inject'
>    from
> /Users/andrew/svn/buildr/lib/buildr/packaging/artifact_namespace.rb:601:in
> `each'
>     ... 22 levels...
>    from /opt/local/bin/spec:16:in `load'
>    from /opt/local/bin/spec:16
>    from -e:1:in `load'
>    from -e:1
>