Opened 11 years ago

Closed 8 years ago

#38561 closed defect (fixed)

openssl @1.0.1_1 build failure on Tiger (again) no-asm for Dawin 8?

Reported by: strombland@… Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: tiger Cc: neverpanic (Clemens Lang), ryandesign (Ryan Carsten Schmidt), metalkeys16@…, sacnorthern
Port: openssl

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

Same build failure encountered on OS 10.4 Tiger as reported in ticket #33741. Changing the default compiler to apple-gcc-4.2 as suggested in the last line of ticket #33741 also resulted in a build failure. I am using Xcode version 2.5 and running OS 10.4.11 Tiger.

Attachments (2)

main.log (32.6 KB) - added by strombland@… 11 years ago.
Portfile.txt (3.0 KB) - added by strombland@… 11 years ago.
modified openssl portfile for version 1.0.1e with no-asm

Download all attachments as: .zip

Change History (16)

Changed 11 years ago by strombland@…

Attachment: main.log added

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

Cc: ryandesign@… added
Description: modified (diff)
Keywords: tiger added; Tiger removed
Owner: changed from macports-tickets@… to mww@…

See #38015 for why we re-enabled asm, and see comment:ticket:38015:40 where I tested all systems I had access to and verified that they worked with and without asm, except for the few new model Mountain Lion systems that were experiencing the bug in that ticket, which required asm to be on. I did not have a Tiger i386 test machine set up however so I did not test that. And my testing was with 1.0.1d, and you're now using 1.0.1e. #33741 was with 1.0.1. The assembly code no doubt changes with each release.

Which specific Intel Mac model do you have? Any particular reason you're still running Tiger on it? All Intel Macs can be upgraded to at least Snow Leopard, which I feel is a better OS in most every way, and by upgrading you should encounter fewer problems building ports (though I can't guarantee that would resolve this particular issue).

comment:2 in reply to:  1 ; Changed 11 years ago by strombland@…

Model = MacBookPro3,1 and Processor = Intel Core 2 Duo

I am using the outdated Tiger OS because I regularly use outdated software, some of which is not transferable to Snow Leopard. Much of the software I would like to install on Tiger depends on openssl.

Would it be possible to replace openssl-1.0.1e.tar.gz with openssl-0.9.8y.tar.gz in whatever directory and then run sudo port install openssl? I have succesfully installed openssl 0.9.8y from source, but I don't know how to tell MacPorts to use openssl 0.9.8y as a dependency instead of 1.0.1e, if this is even possible...

FYI, I have a desktop running Snow Leopard as well, and there are no problems installing openssl 1.0.1e on that machine (however I have had build problems with other software, such as octave...but i dare not go into that).

comment:3 in reply to:  2 Changed 11 years ago by larryv (Lawrence Velázquez)

Replying to strombland@…:

Would it be possible to replace openssl-1.0.1e.tar.gz with openssl-0.9.8y.tar.gz in whatever directory and then run sudo port install openssl? I have succesfully installed openssl 0.9.8y from source, but I don't know how to tell MacPorts to use openssl 0.9.8y as a dependency instead of 1.0.1e, if this is even possible...

I think you can set up a local portfile repository with an openssl port that shadows MacPorts’. That way, updating your ports wouldn’t trash your older OpenSSL every time.

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

However, openssl 0.9.8* is old and we don't recommend you do this. We should instead fix openssl 1.0.1e so that it works on Tiger i386.

comment:5 Changed 11 years ago by danielluke (Daniel J. Luke)

Is there a reason to expend effort on 10.4? There is maybe a case for 10.5 (last version that runs on powerpc) but officially we only support current + previous OS releases, right?

If the maintainer wants to expend extra effort, or someone with an affected system has a patch, then of course we'd want to include it ...

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

MacPorts base runs on Tiger and later. openssl is such a fundamental port, depended on by so many other ports directly or indirectly, that I feel it's important to make some effort to make it work even still on Tiger. Reporting the problem to the developers of openssl is probably appropriate, since it's their code at issue here; we're not doing anything special in the portfile on Tiger to cause this problem.

Changed 11 years ago by strombland@…

Attachment: Portfile.txt added

modified openssl portfile for version 1.0.1e with no-asm

comment:7 Changed 11 years ago by strombland@…

Problem solved I believe. I went in and disabled asm in line 45 of the openssl portfile (see attached) using exactly the same format for congif.args found in the openssl97 portfile, which already has asm disabled. Afterwards openssl 1.0.1e installed successfully.

Thank you all for looking into this.

In case some other weary Tiger user stumbles across the same problem, here is a brief troubleshooting instruction set: Execute 'open /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/devel/openssl' in the command line to open the openssl directory in Finder. Then open the portfile with your favorite text editor and scroll down to line 45, the one that starts with config.args. Insert 'no-asm' between 'zlib' and 'no-krb5 ' and save the portfile. Now 'sudo port install openssl' again in the command line and it should work

comment:8 Changed 11 years ago by sacnorthern

Thanks for the Portfile fix, that worked just fine. :) I'm not looking for the fastest code, so no-asm is OK by me. Thanks also to the fixer of ICU.

I'm a Mac OS 10.4.11 user with Xcode-2.5 installed ( so old ) on MacBookPro2,1. My gcc is 4.0.1 from Apple. My goal here is to install the latest C++ Boost library.

The root of the compile error is from the Perl script that generates the assembly code for SHA1, etc. In "openssl-1.0.1e/crypto/perlasm/x86gas.pl", for macosx, it outputs a .comm directive with three parameters. The last, which is alignment, is rejected by GCC 4.0.1. I changed the Perl code to below (lines 159-165) and it assembled OK.

    if (grep {/\b${nmdecor}OPENSSL_ia32cap_P\b/i} @out) {
        my $tmp=".comm\t${nmdecor}OPENSSL_ia32cap_P,8";
        ## (ORIG) if ($::macosx)       { push (@out,"$tmp,2\n"); }
        ## (ORIG) elsif ($::elf)       { push (@out,"$tmp,4\n"); }
        ## (ORIG) else         { push (@out,"$tmp\n"); }
                        { push (@out,"$tmp\n"); }
    }

Maybe the maintainers need an "oldmacosx" define.... Also, important to delete "sha/sha1-586.s" and one other dot-S file where errors are generated.

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

Has anybody reported this problem to the developers of openssl yet? If so, please give us a URL of the bug report.

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

Cc: metalkeys16@… added

This same problem was mentioned again in comment:ticket:33741:14.

comment:11 in reply to:  8 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: bwitt@… added

Replying to bwitt@…:

The root of the compile error is from the Perl script that generates the assembly code for SHA1, etc. In "openssl-1.0.1e/crypto/perlasm/x86gas.pl", for macosx, it outputs a .comm directive with three parameters. The last, which is alignment, is rejected by GCC 4.0.1.

Have you reported this problem to the developers of openssl? If not, please do so. Then give us the URL of the bug report.

comment:12 Changed 11 years ago by Raptor007 (Raptor007)

I'm on a PowerPC G5 running Tiger 10.4.11, trying to install several libraries with +universal. They kept failing because they couldn't build the openssl dependency with +universal. The logfile revealed the error to be "x86cpuid.s:325:Rest of line ignored" when building for i386.

Adding no-asm to the Portfile improved the situation (thanks strombland!) but for some reason my build process was looking for /Developer/SDKs/MacOSX10.4u.sdk/opt, so I had to create a symlink:

sudo ln -s /opt /Developer/SDKs/MacOSX10.4u.sdk/opt

Now it works perfectly!

comment:13 Changed 9 years ago by jmroot (Joshua Root)

Cc: cal@… added
Owner: changed from mww@… to larryv@…

comment:14 Changed 8 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

The current OpenSSL Portfile disables assembly use on i386 Tiger, so this is fixed.

Note: See TracTickets for help on using tickets.