[MacPorts] #24505: testdisk-6.11 Reports wrong bigendian architecture
#24505: testdisk-6.11 Reports wrong bigendian architecture -------------------------------------+-------------------------------------- Reporter: wickedguitar6@… | Owner: macports-tickets@… Type: update | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: testdisk bigendian gpt | Port: testdisk-6.11 -------------------------------------+-------------------------------------- testdisk-6.11 has a fault bigendian architecture detection in its configure file. Therefore if there is in the environment a "CFLAGS=-arch ...." argument, it assumes that the bigendian arch is universal (e.g. even if "CFLAGS=-arch i386"). This results in that the program cannot correctly analyse GPT volumes (fails with GPT: invalid header size). I patched the configure file so that bigendian is true only if "-arch" contains "ppc" or "ppc64". I also patched the Portfile. Sorry if the technical terms are not 100% correct. -- Ticket URL: <http://trac.macports.org/ticket/24505> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24505: testdisk-6.11 Reports wrong bigendian architecture -------------------------------------+-------------------------------------- Reporter: wickedguitar6@… | Owner: snc@… Type: update | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: haspatch | Port: testdisk-6.11 -------------------------------------+-------------------------------------- Changes (by snc@…): * keywords: testdisk bigendian gpt => haspatch * status: new => assigned * owner: macports-tickets@… => snc@… -- Ticket URL: <http://trac.macports.org/ticket/24505#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24505: testdisk-6.11 Reports wrong bigendian architecture --------------------------------------+------------------------------------- Reporter: wickedguitar6@… | Owner: snc@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: haspatch Port: testdisk-6.11 | --------------------------------------+------------------------------------- Changes (by snc@…): * status: assigned => closed * resolution: => fixed * type: update => defect Comment: Committed in r66511. -- Ticket URL: <http://trac.macports.org/ticket/24505#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24505: testdisk-6.11 Reports wrong bigendian architecture --------------------------------------+------------------------------------- Reporter: wickedguitar6@… | Owner: snc@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: haspatch Port: testdisk-6.11 | --------------------------------------+------------------------------------- Comment(by snc@…): and r66515. -- Ticket URL: <http://trac.macports.org/ticket/24505#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24505: testdisk 6.11: cannot analyse GPT volumes (GPT: invalid header size) --------------------------------------+------------------------------------- Reporter: wickedguitar6@… | Owner: snc@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: haspatch, endian Port: testdisk | --------------------------------------+------------------------------------- Changes (by ryandesign@…): * keywords: haspatch => haspatch, endian * cc: ryandesign@… (added) * port: testdisk-6.11 => testdisk Comment: Replying to [ticket:24505 wickedguitar6@…]:
testdisk-6.11 has a fault bigendian architecture detection in its configure file. Therefore if there is in the environment a "CFLAGS=-arch ...." argument, it assumes that the bigendian arch is universal (e.g. even if "CFLAGS=-arch i386"). This results in that the program cannot correctly analyse GPT volumes (fails with GPT: invalid header size).
I patched the configure file so that bigendian is true only if "-arch" contains "ppc" or "ppc64". I also patched the Portfile.
The autoconf variable ac_cv_c_bigendian is not being set to the value "true" or "false" at this point in the configure script; it is being set to the value "universal", whatever that means to autoconf. This "feature" of autoconf has never made sense to me, and your fix for it concerns me in that I doubt the problems experienced are specific to testdisk; it seems logical to me that every software package using endian detection via autoconf would also be affected (at least in MacPorts, where we always supply -arch flags, even when building for a single architecture, which is the situation the developers of autoconf seem not to have anticipated). Would you be willing to bring this issue to the attention of the developers of autoconf yet again and work with them towards a solution? IMHO the solution is to delete the ability for autoconf to detect endianness, since that is not the business of a configuration script but the business of defines in the sourcefiles. That's obviously not a workable solution since so much software out there already uses this flawed autoconf capability, but the solution they've developed so far is clearly not workable either, and detecting and fixing the problem in each individual affected port is not an effective use of anybody's time. -- Ticket URL: <http://trac.macports.org/ticket/24505#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24505: testdisk 6.11: cannot analyse GPT volumes (GPT: invalid header size) --------------------------------------+------------------------------------- Reporter: wickedguitar6@… | Owner: snc@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: haspatch, endian Port: testdisk | --------------------------------------+------------------------------------- Comment(by jmr@…): Replying to [comment:4 ryandesign@…]:
This "feature" of autoconf has never made sense to me, and your fix for it concerns me in that I doubt the problems experienced are specific to testdisk; it seems logical to me that every software package using endian detection via autoconf would also be affected
Huh? This is something that autoconf gets right, unlike the SIZEOF_FOO stuff. If you have ac_cv_c_bigendian=universal, you get something like this in config.h: {{{ #if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 #endif }}} How is that "flawed"? -- Ticket URL: <http://trac.macports.org/ticket/24505#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24505: testdisk 6.11: cannot analyse GPT volumes (GPT: invalid header size) --------------------------------------+------------------------------------- Reporter: wickedguitar6@… | Owner: snc@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: haspatch, endian Port: testdisk | --------------------------------------+------------------------------------- Comment(by ryandesign@…): Well, a) if that's what it does, why does it need to check anything at all? Why can't it unconditionally insert that code, since it looks like it should be fine for all cases? and b) why does using that code cause testdisk to malfunction? -- Ticket URL: <http://trac.macports.org/ticket/24505#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts