[MacPorts] #37740: webkit-gtk @1.10.2: undefined method `getbyte'
#37740: webkit-gtk @1.10.2: undefined method `getbyte' ---------------------------+------------------------ Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: tiger leopard | Port: webkit-gtk ---------------------------+------------------------ 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. -- Ticket URL: <https://trac.macports.org/ticket/37740> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37740: webkit-gtk @1.10.2: undefined method `getbyte' ---------------------------+--------------------------- Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard Port: webkit-gtk | ---------------------------+--------------------------- Comment (by jeremyhu@…): Thanks. I'll see if I can figure out enough ruby to know how to make this conditional and push something upstream. Otherwise, I'll just commit this. -- Ticket URL: <https://trac.macports.org/ticket/37740#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37740: webkit-gtk @1.10.2: undefined method `getbyte' ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: tiger leopard haspatch Port: webkit-gtk | ---------------------------+------------------------------------ Changes (by jeremyhu@…): * keywords: tiger leopard => tiger leopard haspatch -- Ticket URL: <https://trac.macports.org/ticket/37740#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 | ---------------------------+------------------------------------ Changes (by jeremyhu@…): * status: new => assigned -- Ticket URL: <https://trac.macports.org/ticket/37740#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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
#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 | ---------------------------+------------------------------------ Comment (by ryandesign@…): This [attachment:ruby-1.8.patch new patch] should work on any Ruby version. The method of checking the Ruby version uses string comparison, which would cause problems if there were ever a ruby 1.8.10 or a ruby 1.10.0, but although I cannot find documentation of that fact right now, I've heard that Ruby version numbering policy is such that those kind of version numbers will never exist, precisely so that string comparison of version numbers will work, and it's a method I've seen used in other projects. -- Ticket URL: <https://trac.macports.org/ticket/37740#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#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 | ---------------------------+------------------------------------ Comment (by jeremyhu@…): Thanks. Please commit. -- Ticket URL: <https://trac.macports.org/ticket/37740#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#37740: webkit-gtk @1.10.2: undefined method `getbyte' ---------------------------+------------------------------------ Reporter: ryandesign@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: fixed | Keywords: tiger leopard haspatch Port: webkit-gtk | ---------------------------+------------------------------------ Changes (by ryandesign@…): * status: assigned => closed * resolution: => fixed Comment: r101964. This fixes webkit-gtk on my Leopard i386 machine but it still fails on Leopard ppc due to #35989. -- Ticket URL: <https://trac.macports.org/ticket/37740#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts