[MacPorts] #37740: webkit-gtk @1.10.2: undefined method `getbyte'

MacPorts noreply at macports.org
Tue Jan 22 17:04:43 PST 2013


#37740: webkit-gtk @1.10.2: undefined method `getbyte'
---------------------------+------------------------------------
  Reporter:  ryandesign@…  |      Owner:  jeremyhu@…
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.1.2
Resolution:                |   Keywords:  tiger leopard haspatch
      Port:  webkit-gtk    |
---------------------------+------------------------------------
Description changed by ryandesign@…:

Old description:

> After applying the patch from #37418 to get past the error in Leopard's
> system headers, the build fails with:
>
> {{{
> libtool: link: /usr/bin/g++-4.2 -pipe -O2 -arch i386 -O2 -arch i386 -o
> Programs/LLIntOffsetsExtractor Source/JavaScriptCore/llint
> /Programs_LLIntOffsetsExtractor-LLIntOffsetsExtractor.o  -L/opt/local/lib
> ./.libs/libWTF.a -licui18n -licuuc -licudata
> /opt/local/lib/libgio-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib -lz
> /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgthread-2.0.dylib
> /opt/local/lib/libffi.dylib /opt/local/lib/libglib-2.0.dylib -lresolv
> /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc -lm
> -lpthread -lstdc++
> /usr/bin/ruby ./Source/JavaScriptCore/offlineasm/asm.rb
> ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm
> Programs/LLIntOffsetsExtractor
> DerivedSources/JavaScriptCore/LLIntAssembly.h
> offlineasm: Parsing ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm
> and Programs/LLIntOffsetsExtractor and creating assembly file
> DerivedSources/JavaScriptCore/LLIntAssembly.h.
> ./Source/JavaScriptCore/offlineasm/offsets.rb:112:in
> `offsetsAndConfigurationIndex': undefined method `getbyte' for
> #<File:Programs/LLIntOffsetsExtractor (closed)> (NoMethodError)
>         from ./Source/JavaScriptCore/offlineasm/offsets.rb:111:in `loop'
>         from ./Source/JavaScriptCore/offlineasm/offsets.rb:111:in
> `offsetsAndConfigurationIndex'
>         from ./Source/JavaScriptCore/offlineasm/offsets.rb:109:in `open'
>         from ./Source/JavaScriptCore/offlineasm/offsets.rb:109:in
> `offsetsAndConfigurationIndex'
>         from ./Source/JavaScriptCore/offlineasm/asm.rb:208
> make: *** [DerivedSources/JavaScriptCore/LLIntAssembly.h] Error 1
> }}}
>
> Based on official documentation, my understanding is that [http://www
> .ruby-doc.org/core-1.8.6/IO.html#method-i-getc in ruby 1.8.x, "getc" gets
> a byte] (1.8.6 documentation) while [http://www.ruby-
> doc.org/core-1.9.3/IO.html#method-i-getc in ruby 1.9.x, "getc" gets a
> character] while [http://www.ruby-
> doc.org/core-1.9.3/IO.html#method-i-getbyte "getbyte" gets a byte] (1.9.3
> documentation).
>
> The question mark is 1.8.7, whose documentation [http://www.ruby-
> doc.org/core-1.8.7/IO.html#method-i-getbyte has a link in the sidebar for
> "getbyte"] but which takes you to the definition of "getc", which appears
> twice. Snow Leopard, Lion and Mountain Lion ship with ruby 1.8.7 and the
> port builds there, so it seems (and the [http://svn.ruby-
> lang.org/repos/ruby/tags/v1_8_7/NEWS ruby 1.8.7 NEWS file] confirms) that
> in ruby 1.8.7 "getbyte" is a compatibility alias for "getc".
>
> Leopard has ruby 1.8.6 and Tiger has ruby 1.8.2. It seems the most
> correct thing to do, if you want to get a byte (which I assume is what
> the code in Source/JavaScriptCore/offlineasm/offsets.rb wants to do), is
> to check the ruby version, and use "getc" on ruby 1.8.x and earlier ande
> "getbyte" on ruby 1.9.x and later. I don't know enough ruby to be able to
> do that. For now, since all versions of OS X that MacPorts runs on today
> (10.4 through 10.8 inclusive) have ruby 1.8.x, we could get away with
> unconditionally changing "getbyte" to "getc".
>
> I verified that changing "getbyte" to "getc" allows webkit-gtk @1.10.2 to
> build on Leopard.

New description:

 After applying the patch from #37418 to get past the error in Leopard's
 system headers, the build fails with:

 {{{
 libtool: link: /usr/bin/g++-4.2 -pipe -O2 -arch i386 -O2 -arch i386 -o
 Programs/LLIntOffsetsExtractor Source/JavaScriptCore/llint
 /Programs_LLIntOffsetsExtractor-LLIntOffsetsExtractor.o  -L/opt/local/lib
 ./.libs/libWTF.a -licui18n -licuuc -licudata
 /opt/local/lib/libgio-2.0.dylib /opt/local/lib/libgmodule-2.0.dylib -lz
 /opt/local/lib/libgobject-2.0.dylib /opt/local/lib/libgthread-2.0.dylib
 /opt/local/lib/libffi.dylib /opt/local/lib/libglib-2.0.dylib -lresolv
 /opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc -lm
 -lpthread -lstdc++
 /usr/bin/ruby ./Source/JavaScriptCore/offlineasm/asm.rb
 ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm
 Programs/LLIntOffsetsExtractor
 DerivedSources/JavaScriptCore/LLIntAssembly.h
 offlineasm: Parsing ./Source/JavaScriptCore/llint/LowLevelInterpreter.asm
 and Programs/LLIntOffsetsExtractor and creating assembly file
 DerivedSources/JavaScriptCore/LLIntAssembly.h.
 ./Source/JavaScriptCore/offlineasm/offsets.rb:112:in
 `offsetsAndConfigurationIndex': undefined method `getbyte' for
 #<File:Programs/LLIntOffsetsExtractor (closed)> (NoMethodError)
         from ./Source/JavaScriptCore/offlineasm/offsets.rb:111:in `loop'
         from ./Source/JavaScriptCore/offlineasm/offsets.rb:111:in
 `offsetsAndConfigurationIndex'
         from ./Source/JavaScriptCore/offlineasm/offsets.rb:109:in `open'
         from ./Source/JavaScriptCore/offlineasm/offsets.rb:109:in
 `offsetsAndConfigurationIndex'
         from ./Source/JavaScriptCore/offlineasm/asm.rb:208
 make: *** [DerivedSources/JavaScriptCore/LLIntAssembly.h] Error 1
 }}}

 Based on official documentation, my understanding is that [http://www
 .ruby-doc.org/core-1.8.6/IO.html#method-i-getc in ruby 1.8.x, "getc" gets
 a byte] (1.8.6 documentation) while [http://www.ruby-
 doc.org/core-1.9.3/IO.html#method-i-getc in ruby 1.9.x, "getc" gets a
 character] while [http://www.ruby-
 doc.org/core-1.9.3/IO.html#method-i-getbyte "getbyte" gets a byte] (1.9.3
 documentation).

 The question mark is 1.8.7, whose documentation [http://www.ruby-
 doc.org/core-1.8.7/IO.html#method-i-getbyte has a link in the sidebar for
 "getbyte"] but which takes you to the definition of "getc", which appears
 twice. Snow Leopard, Lion and Mountain Lion ship with ruby 1.8.7 and the
 port builds there, so it seems (and the [http://svn.ruby-
 lang.org/repos/ruby/tags/v1_8_7/NEWS ruby 1.8.7 NEWS file] confirms) that
 in ruby 1.8.7 "getbyte" is a compatibility alias for "getc".

 Leopard has ruby 1.8.6 and Tiger has ruby 1.8.2. It seems the most correct
 thing to do, if you want to get a byte (which I assume is what the code in
 Source/JavaScriptCore/offlineasm/offsets.rb wants to do), is to check the
 ruby version, and use "getc" on ruby 1.8.x and earlier and "getbyte" on
 ruby 1.9.x and later. I don't know enough ruby to be able to do that. For
 now, since all versions of OS X that MacPorts runs on today (10.4 through
 10.8 inclusive) have ruby 1.8.x, we could get away with unconditionally
 changing "getbyte" to "getc".

 I verified that changing "getbyte" to "getc" allows webkit-gtk @1.10.2 to
 build on Leopard i386.

--

-- 
Ticket URL: <https://trac.macports.org/ticket/37740#comment:5>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list