blackwinter / unicode

Unicode normalization library. (Mirror of Yoshida-san's code base to maintain the RubyGem.)
http://www.yoshidam.net/Ruby.html#unicode
80 stars 13 forks source link

Ruby-2.0.0preview1 Compilation failure #2

Closed zealot128 closed 11 years ago

zealot128 commented 11 years ago

Hello. Using the latest ruby 2.0.0, which slowly gets traction as Rails Core will use it, I try to upgrade our project to the latest:

$ gem install unicode -v '0.4.3'                                                                                             
Fetching: unicode-0.4.3.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing unicode:
        ERROR: Failed to build gem native extension.

        /profiles/swi/.rvm/rubies/ruby-2.0.0-preview1/bin/ruby extconf.rb
creating Makefile

make
make: Warning: File `Makefile' has modification time 1,5e+02 s in the future
compiling wstring.c
compiling ustring.c
compiling unicode.c
linking shared-object unicode.so
make: warning:  Clock skew detected.  Your build may be incomplete.

make install
make: Warning: File `Makefile' has modification time 1,5e+02 s in the future
/usr/bin/install -c -m 0755 unicode.so /profiles/swi/.rvm/gems/ruby-2.0.0-preview1@empfehlungsbund/gems/unicode-0.4.3/.
/usr/bin/install: `unicode.so' and `/profiles/swi/.rvm/gems/ruby-2.0.0-preview1@empfehlungsbund/gems/unicode-0.4.3/./unicode.so' are the same file
make: *** [install-so] Error 1

Gem files will remain installed in /profiles/swi/.rvm/gems/ruby-2.0.0-preview1@empfehlungsbund/gems/unicode-0.4.3 for inspection.
Results logged to /profiles/swi/.rvm/gems/ruby-2.0.0-preview1@empfehlungsbund/gems/unicode-0.4.3/./gem_make.out

If I clone this git directly, the same:

$ ruby extconf.rb
$ make
compiling ustring.c
compiling wstring.c
compiling unicode.c
linking shared-object unicode.so

$ make install
/usr/bin/install -c -m 0755 unicode.so /profiles/swi/.rvm/rubies/ruby-2.0.0-preview1/lib/ruby/site_ruby/2.0.0/x86_64-linux
installing default unicode libraries

$ gem build unicode.gemspec
WARNING:  description and summary are identical
  Successfully built RubyGem
  Name: unicode
  Version: 0.4.3
  File: unicode-0.4.3.gem

$ gem install unicode-0.4.3.gem                                                                                                                        [swi@hal]
Building native extensions.  This could take a while...
ERROR:  Error installing unicode-0.4.3.gem:
        ERROR: Failed to build gem native extension.

        /profiles/swi/.rvm/rubies/ruby-2.0.0-preview1/bin/ruby extconf.rb
creating Makefile

make
make: Warning: File `Makefile' has modification time 1,5e+02 s in the future
compiling wstring.c
compiling ustring.c
compiling unicode.c
linking shared-object unicode.so
make: warning:  Clock skew detected.  Your build may be incomplete.

make install
make: Warning: File `Makefile' has modification time 1,5e+02 s in the future
/usr/bin/install -c -m 0755 unicode.so /profiles/swi/.rvm/gems/ruby-2.0.0-preview1/gems/unicode-0.4.3/.
/usr/bin/install: `unicode.so' and `/profiles/swi/.rvm/gems/ruby-2.0.0-preview1/gems/unicode-0.4.3/./unicode.so' are the same file
make: *** [install-so] Error 1

Gem files will remain installed in /profiles/swi/.rvm/gems/ruby-2.0.0-preview1/gems/unicode-0.4.3 for inspection.
Results logged to /profiles/swi/.rvm/gems/ruby-2.0.0-preview1/gems/unicode-0.4.3/./gem_make.out

Any ideas?

blackwinter commented 11 years ago

hi stefan, it works for me on latest trunk (ruby 2.0.0dev (2012-11-06 trunk 37492) [x86_64-linux]). and judging from the error message it might rather be an issue with your environment; maybe this SO thread will help you sort it out.

in any case, i don't see how this could be an issue with unicode. please let me know if you find out otherwise.

cheers jens

zealot128 commented 11 years ago

Thank you for your answer; seems to be the case:

Typically this occurs when building in a NFS mounted directory, and the clocks on the client and the NFS server are out of sync.

The solution is to run an NTP client on both the NFS server and all clients.