Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#45184 closed defect (invalid)

bash @4.3.26 does not build on Mac OS X 10.4 Tiger

Reported by: geoffd2 Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.3.0
Keywords: tiger Cc: ryandesign (Ryan Carsten Schmidt)
Port: bash

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Attempting to update bash in the light of the Shellshock vuln -

sudo port install bash
--->  Computing dependencies for bash
--->  Configuring bash
Error: org.macports.configure for port bash returned: configure failure: command execution failed
Please see the log file for port bash for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_shells_bash/bash/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port bash failed

Please assume I know little of macports, compiling etc. If it's relevant, upgrading apple-gcc42 from 4.0.1 failed also.

Attachments (1)

bashfail.log (13.0 KB) - added by geoffd2 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by geoffd2

Attachment: bashfail.log added

comment:1 Changed 10 years ago by geoffd2

Cc: geoffdown@… added

Cc Me!

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

Cc: ryandesign@… added; geoffdown@… removed
Description: modified (diff)
Keywords: bash removed
Owner: changed from macports-tickets@… to raimue@…
Port: bash added

The log shows some very strange errors, like:

:info:configure sh: DUALCASE=1: Command not found.
:info:configure sh: export: Command not found.
:info:configure sh: Missing }.

However the log is also not from a clean build, so before we debug further, please clean bash and try again.

What do you mean, "upgrading apple-gcc42 from 4.0.1 failed also"? The apple-gcc42 port is required to build almost any port on Tiger, so if you can't build that, that would be a problem. However, the fact that MacPorts began attempting to build bash suggests apple-gcc42 is already successfully installed.

You set the Version field to 2.3.0... If you are really running MacPorts 2.3.0, please run "sudo port selfupdate" to upgrade to version 2.3.1.

comment:3 Changed 10 years ago by raimue (Rainer Müller)

Summary: bash 0.4.26 won't install - OSX10.4 Tigerbash @4.3.26 does not build on Mac OS X 10.4 Tiger

I don't have OS X 10.4 and especially no PowerPC to test whether bash builds. As the error was raised during configure, the config.log from the work directory would also help to get a better understanding what failed here.

However, be aware that even if you update bash through MacPorts, /bin/bash will still be vulnerable and it's certain that you will never get an update from Apple for that. Better don't use such a setup productively.

comment:4 Changed 10 years ago by geoffd2

I think I may have caused the problem by changing 'sh' to link to tcsh instead of bash. Changing it back allowed bash to build - though I see that @4.3.26 has disappeared, so it is @4.3.25 that has installed. I was *upgrading* apple-gcc42 to the latest version, and that seems to be building ok as well. I did try "sudo port selfupdate" before all this, but it seemed to hang. Should it take a long time?

Is there any reason I can't rename /bin/bash and create a symlink from /bin/bash to /opt/local/bin/bash ? Or even move the binary to /bin/ ?

comment:5 in reply to:  4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Replying to geoffdown@…:

I think I may have caused the problem by changing 'sh' to link to tcsh instead of bash.

Yup, that would certainly break everything; don't do that. /bin/sh needs to be bash.

Changing it back allowed bash to build - though I see that @4.3.26 has disappeared, so it is @4.3.25 that has installed.

The version available today is 4.3.27. If that's not the version you got, selfupdate and try again.

I was *upgrading* apple-gcc42 to the latest version, and that seems to be building ok as well.

Ok, I was just confused by you mentioning "upgrading apple-gcc42 from 4.0.1" since the apple-gcc42 port has never been at version "4.0.1". When it was originally added in 2007, the version was "5531"; today, the version is "5666.3".

I did try "sudo port selfupdate" before all this, but it seemed to hang. Should it take a long time?

You can run with the "-v" flag to learn more about what selfupdate is doing (i.e. "sudo port -v selfupdate"). If your computer is slow and/or there are lots of changes to download, it can take several minutes. If you really did have MacPorts 2.3.0 before and are therefore updating to 2.3.1, it will take several minutes longer than that to build the new version.

Is there any reason I can't rename /bin/bash and create a symlink from /bin/bash to /opt/local/bin/bash ? Or even move the binary to /bin/ ?

Replacing /bin/sh with a copy of bash installed by MacPorts might work. It might also cause problems. I can't guarantee that bash 4 from MacPorts is completely 100% backward compatible with bash 2 preinstalled on Tiger. Certainly all the scripts used as part of the operating system were tested with bash 2; there may be problem running them under bash 4.

If you're willing to accept that risk, then after backing up your existing /bin/sh somewhere, your options are as you said to either make /bin/sh a symlink to /opt/local/bin/bash or to copy /opt/local/bin/bash to /bin/sh. Using a symlink has the problem that if you ever uninstall or deactivate bash in MacPorts, you system may stop working properly, up to and including no longer being able to boot up. Copying MacPorts bash to /bin/sh would thus be safer, with the caveat that you should re-copy it anytime you later update the MacPorts bash port if you want to continue to stay up to date.

comment:6 in reply to:  4 Changed 10 years ago by raimue (Rainer Müller)

Replying to geoffdown@…:

I think I may have caused the problem by changing 'sh' to link to tcsh instead of bash.

Yes, that would definitely be the problem. The syntax for csh/tcsh and sh/bash is different, you can't interchange them.

Note: See TracTickets for help on using tickets.