Opened 12 years ago

Closed 11 years ago

#36524 closed defect (worksforme)

base: truncated computed checksums on pure darwin

Reported by: daiyu.hurst@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.1.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), daiyu.hurst@…
Port:

Description

After upgrading from v2.0.4 to v2.1.0, I get something similar to what you see in the attached screen output for each port I try to install; the failure shown is from an attempt to install the gtk-doc port (it dies trying to install the first dependent port, xmlcatmgr-2.2).

It looks like up through MacPorts 2.0.4 the checksums are 32-bit, and become 64-bit with v2.1.0? At least as you can see the checksums shown in the portfiles are twice as long as the ones in the distfiles.

I did a sync just before the install attempt.

I will mention I'm running plain Darwin x86 8.01, and thus lacking Xcode I can't do selfupdate, and so I've bootstrapped MacPorts releases from:

1.6.0 -> 1.8.2 -> 1.9.2 -> 2.0.3 -> 2.0.4

And then, from 2.0.4 to 2.1.0 (for now I've dropped back to 2.0.4).

This having been the second time I've installed Darwin on this box and bootstrapped my way to this problem, I made a point to create a backup of the registry so that I could drop back to 2.0.4 again.

I'd performed the upgrade from 2.04 to 2.1.0 after receiving this error when trying to install the gtk-doc port:

---> Computing dependencies for gtk-doc.Error: Unable to execute port: invalid command name "compiler.blacklist"

Lastly, I'm aware there's not much collective will to assist the dozen or so of us plain (I will not use the term "pure") Darwin users; I do in fact have an iMac with Tiger on it, but it was a gift, I don't have the install disks, and don't wish to clutter it with development software. And I can't use it for the target application (not a program, just a use); the iMac lacks USB 2.0 ports, and what I'm doing really needs them, and this Celery-based PC has them.

Even as it is, I find MacPorts a great time-saver, and I'm happy you folks have spent so much time on it.

Thanks in advance for any and all help.... -dh

Attachments (2)

gtk-doc-install-fail.txt (3.7 KB) - added by daiyu.hurst@… 12 years ago.
screen output showing problem
main.log (36.4 KB) - added by daiyu.hurst@… 12 years ago.
new main.log showing install failure of target port gtk-doc and its first dependent port, xmlcatmgr

Download all attachments as: .zip

Change History (18)

Changed 12 years ago by daiyu.hurst@…

Attachment: gtk-doc-install-fail.txt added

screen output showing problem

comment:1 Changed 12 years ago by daiyu.hurst@…

Oh,

It might be worth mentioning, I applied the patch shown here:

#34463

to the sql.c source for 2.1.0 before building it.

Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 12 years ago by mf2k (Frank Schima)

Resolution: invalid
Status: newclosed

You need to update to the latest version of Macports, 2.1.2 currently. If you can't install Xcode, then you are running an unsupported system.

comment:3 Changed 12 years ago by daiyu.hurst@…

After I install 2.1.2 and get the same error, should I file a separate ticket, or append the results to this one?

comment:4 Changed 12 years ago by mf2k (Frank Schima)

FYI, it works for me. Please clean the port and attach the complete main.log with the error under Macports 2.1.2 and re-open the ticket. The error you cited is not true with Macports 2.1.2. i.e. compiler.blacklist is indeed a valid portfile command.

comment:5 Changed 12 years ago by daiyu.hurst@…

Okie dokie, will do.

comment:6 Changed 12 years ago by daiyu.hurst@…

Resolution: invalid
Status: closedreopened

After upgrading from v2.0.4 to v2.1.2, I get something similar to what you see in the attached screen output for each port I try to install; the failure shown is from an attempt to install the gtk-doc port (it dies trying to install the first dependent port, xmlcatmgr-2.2).

It looks like up through MacPorts 2.0.4 the checksums are 32-bit, and become 64-bit beginning with v2.1.0 and continuing with v2.1.2? At least as you can see the checksums shown in the portfiles are twice as long as the ones in the distfiles.

I did a sync just before the install attempt.

I will mention I'm running plain Darwin x86 8.01, and thus lacking Xcode I can't do selfupdate, and so I've bootstrapped MacPorts releases from:

1.6.0 -> 1.8.2 -> 1.9.2 -> 2.0.3 -> 2.0.4 -> 2.1.0

This having been the second time I've installed Darwin on this box and bootstrapped my way to this problem, I made a point to create a backup of the registry so that I will be able to drop back to 2.0.4 again.

I'd performed the upgrade from 2.04 to 2.1.2 after receiving this error when trying to install the gtk-doc port using 2.0.4:

---> Computing dependencies for gtk-doc.Error: Unable to execute port: invalid command name "compiler.blacklist"

So installing 2.1.0 previously, and 2.1.2 this time around, got rid of the aforementioned error, but results in this checksum semi-mismatch.

Lastly, I'm aware there's not much collective will to assist the dozen or so of us plain (I will not use the term "pure") Darwin users; I do in fact have an iMac with Tiger on it, but it was a gift, I don't have the install disks, and don't wish to clutter it with development software. And I can't use it for the target application (not a program, just a use); the iMac lacks USB 2.0 ports, and what I'm doing really needs them, and this Celery-based PC has them.

Even as it is, I find MacPorts a great time-saver, and I'm happy you folks have spent so much time on it.

Thanks in advance for any and all help.... -dh

Changed 12 years ago by daiyu.hurst@…

Attachment: main.log added

new main.log showing install failure of target port gtk-doc and its first dependent port, xmlcatmgr

comment:7 Changed 12 years ago by mf2k (Frank Schima)

Port: xmlcatmgr added; gtk-doc removed
Summary: gtk-doc Problem w/Checksum Length Change @ MacPorts 2.1.0xmlcatmgr: checksum error
Version: 2.1.02.1.2

This is a totally different error. Did you read and apply the FAQ on checksum errors?

comment:8 Changed 12 years ago by ecronin (Eric Cronin)

Component: portsbase
Port: xmlcatmgr removed

The important part is:

468	:error:checksum Checksum (md5) mismatch for xmlcatmgr-2.2.tar.gz
469	:info:checksum Portfile checksum: xmlcatmgr-2.2.tar.gz md5 4b0c7e075f5ff5aa86537b403468739a
470	:info:checksum Distfile checksum: xmlcatmgr-2.2.tar.gz md5 4b0c7e075f5ff5aa
471	:error:checksum Checksum (sha1) mismatch for xmlcatmgr-2.2.tar.gz
472	:info:checksum Portfile checksum: xmlcatmgr-2.2.tar.gz sha1 1761eb72234a14d3d919ce3ccb0c0550421bf2e8
473	:info:checksum Distfile checksum: xmlcatmgr-2.2.tar.gz sha1 1761eb72234a14d3d919
474	:error:checksum Checksum (rmd160) mismatch for xmlcatmgr-2.2.tar.gz
475	:info:checksum Portfile checksum: xmlcatmgr-2.2.tar.gz rmd160 6d01a88defccd086758f78d345a2abdf4be5c970
476	:info:checksum Distfile checksum: xmlcatmgr-2.2.tar.gz rmd160 6d01a88defccd086758f

So on pure darwin there is (probably) an issue with our checksum routines in pextlib that is resulting in the returned strings being half as long as they should be (8 bytes vs 16 for MD5 and 10 bytes vs 20 for sha1).

comment:9 Changed 12 years ago by ecronin (Eric Cronin)

Summary: xmlcatmgr: checksum errorbase: truncated computed checksums on pure darwin

comment:10 Changed 12 years ago by daiyu.hurst@…

Yes, it didn't seem to apply; it's not like the checksums are totally wrong, they're only half wrong. This happens for any and all ports after upgrading past 2.0.4.

Given some arbitrary port 'foo', if I drop back to 2.0.4, and don't encounter some feature in the port/dist that *requires* 2.1.0 or later, 'foo' will install fine. If I remove that port, upgrade, and try again, it will fail with this checksum half-error.

And I suspect it's got something to do with the difference between compiling MacPort with gcc 3.3 (which works up until 2.1.0), and compiling with gcc 4.0.

I looked to see if there was a configure option for MacPorts to force a build with gcc 3.3, but I didn't see it.

comment:11 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

I see you are running darwin 8, which is what Tiger was based on. Support for Tiger in MacPorts is rapidly declining; support for pure darwin 8 is undoubtedly worse. Is there a reason you're not using a more recent version of darwin? Mountain Lion is based on darwin 12.

I have never used pure darwin, but am not opposed to installing a pure darwin test system, either in VMware or in a partition on my G4. I just don't know where to begin. If you can send me instructions for how you set it up, maybe I can follow them too. If they're long, you could email me privately rather than paste into this ticket.

You can compile MacPorts with any compiler you like; it respects the CC environment variable. However our interest in gcc 3.3 at this time is nil, having started to decline in 2005 when Tiger was released and Apple changed the default compiler to gcc 4.0. And our interest in any kind of gcc is now declining, ever since Apple stopped shipping any version of gcc in Xcode 4.2 last year.

About the checksum length issue, I know that OS X uses UTF-16 internally for many of its strings. An md5 checksum should be 32 characters, or 64 UTF-16 bytes, long. So I could envision a scenario where we're specifying that the string should be 32 characters long, but that's being misinterpreted on pure darwin as meaning 32 bytes long, resulting in the string being cut in half. But I don't know right now where in the code that might be, or even if it's anywhere in the MacPorts code at all. For all I know it could be in Tcl, or in darwin itself.

I was going to ask if "make test" completes without errors, since I saw that we have a test of the checksum routines, but the tests don't complete for me either on a working Mountain Lion system, so nevermind.

comment:12 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Cc Me!

comment:13 Changed 12 years ago by daiyu.hurst@…

Hi Ryan,

I'm working with the pre-built images that Apple provides here:

http://opensource.apple.com/static/iso/

Since they've not seen fit to release a later version of Darwin, and building one myself would be a larger meta-task than is justified by the task at hand, I'm cobbling together just what I need to do the job.

I played with each of the images, but settled on the latest available:

http://opensource.apple.com/static/iso/darwinx86-801.iso.gz

This image comes with no X, but does have gcc 3.3, gcc 3.3 "fast", gcc 3.5, and gcc 4.0.

Then I downloaded MacPorts 1.60 and built & installed it, sync'd, followed by 1.8.2 & another sync. Next, I installed XFree86, having read ticket #22067 dealing with this. After that, I downloaded, built, and installed MacPorts 1.9.2, and sync'd. I installed the gcc_select port at this point. Following that, I downloaded, built, and installed MacPorts 2.0.3 using gcc 4.0.

Here I'll mention I usually keep gcc 3.3 the default compiler unless I have something fail to compile. I have little experience with gcc since 2.95, and 4.0 is just kinda terra incognita. With MacPort 2.0.3 installed, I changed the default compiler selection back to 3.3, and installed the wget port.

Although I've used computers since they were powered by steam, and love old stuff, I had no intention of using X windows by itself, I just needed it in place to add a nice gui, gnome 2 or later.

The gnome install attempt failed, so I downloaded, built, and installed MacPorts 2.0.4, and still got no love. The jump then from 2.0.4 to 2.10 was where I began encountering this problem with the checksums, which persist with 2.1.2.

So, if you'd prefer to close this and move on, no harm-no foul; but if you're puzzled enough by it to proceed, I'll send you any additional attachments you'd like, and I have another drive that I can wipe and do this entire process on again if need be.

comment:14 Changed 12 years ago by daiyu.hurst@…

The solution to pextlib generating "short" checksums for the dist files was to

export CFLAGS=-fwide-exec-charset=UTF-16

before running the configure script. I'm now successfully running MacPorts 2.1.2.

I consider this problem solved, the ticket can be closed.

Last edited 12 years ago by daiyu.hurst@… (previous) (diff)

comment:15 Changed 11 years ago by daiyu.hurst@…

Cc: daiyu.hurst@… added

Cc Me!

comment:16 Changed 11 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: reopenedclosed

OK, glad you got it working.

Note: See TracTickets for help on using tickets.