Opened 13 years ago

Closed 9 years ago

#32581 closed defect (fixed)

reduce-algebra: don't break when runtime OS version != build-time OS version

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: mbrethen
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: haspatch Cc: kurthindenburg (Kurt Hindenburg)
Port: reduce-algebra

Description

If the version of OS X changes (even a minor version, for example updating from 10.7.2 to 10.7.3), redpsl no longer runs:

$ /opt/local/libexec/reduce-algebra/bin/redpsl 
Failed to find a version of bpsl that you have built
try ./configure --with-psl; make to build one.

This is because at build time, it runs its copy of config.guess to determine the OS name and full version, and uses that in a directory name that gets installed. Then at runtime, it again runs that config.guess to find the directory. config.guess returns the running OS's name and version, so this fails if the OS version at build time is different from the OS version at runtime. This is also significant if the user receives a pre-compiled binary built by our buildbot, because the buildbot's version of OS X might not be identical to the user's.

The attached patch is one way we could fix this.

Attachments (1)

reduce-algebra-config.guess.diff (878 bytes) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
proposed patch

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

proposed patch

comment:1 Changed 13 years ago by mbrethen@…

This won't work; config-guess returns 'x86_64-apple-darwin11.2.0' but reduce build uses 2 scripts: findos.sh and findhost.sh in /scripts to create the directory name (e.g. 'x86_64-mac_10.7_lion-darwin11.2.0').

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

As far as I can tell my fix should work correctly. My patch replaces the config.guess that gets installed with a simple script that echoes the value config.guess had at build time. At runtime, findos.sh and findhost.sh will call that modified script and thus be able to find the directory by the name it has, even if the OS version has since changed.

comment:3 Changed 13 years ago by mbrethen@…

You're right, I didn't look at it that way before. In effect, you're just saving a "snapshot" of the current system for future reference.

I'm currently looking at the linux install setup and think we can circumvent the need for config.guess entirely, as well as a wrapper in ${prefix}/bin.

comment:4 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added

Cc Me!

comment:5 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: newclosed

replaced_by reduce - if I understand the issue, it looks like this patch was basically added to the Portfile.

Note: See TracTickets for help on using tickets.