[2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

Mojca Miklavec mojca at macports.org
Thu Sep 5 06:27:46 UTC 2019


On Thu, 5 Sep 2019 at 07:02, Bjarne D Mathiesen
<macintosh at mathiesen.info> wrote:
>
> Mojca Miklavec wrote:
> > On Wed, 4 Sep 2019 at 11:29, Bjarne D Mathiesen wrote:
> >> --with-gcc /usr/bin/gcc  --allow-different-user
> >>
> >> I've also tried "port -t install stack +bootstrap"
> >>
> >> is "--with-gcc /usr/bin/gcc" the problem ?!?
> >
> > I thought this was fixed to point to the chosen compiler?
> > But it's unlikely that this has anything to do with the problem.
> >
> >> and how do I solve it ?!? : port install libgcc ?!?
> >
> > Judging from the logs linked from
> > https://ports.macports.org/port/stack/ it's likely this particular
> > error:
> >
> > fatal: unable to access 'https://github.com/snoyberg/filelock.git/':
> > error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
> > protocol version
> >
> >
> > Some context from
> > https://build.macports.org/builders/ports-10.8_x86_64_legacy-builder/builds/101522/steps/install-port/logs/stdio:
> >
> > Cloning 97e83ecc133cd60a99df8e1fa5a3c2739ad007dc from
> > https://github.com/snoyberg/filelock.git
> > Received ExitFailure 128 when running
> > Raw command: /usr/bin/git clone
> > https://github.com/snoyberg/filelock.git
> > /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_stack/stack/work/.tmp/with-repo21735/cloned
> > Standard error:
> > Cloning into '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_stack/stack/work/.tmp/with-repo21735/cloned'...
> > fatal: unable to access 'https://github.com/snoyberg/filelock.git/':
> > error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert
> > protocol version
> >
> > The built-in SSL support is no longer sufficient on < 10.9. Can you
> > try if running /opt/local/bin/git/clone on the same repository works
> > as expected?
> > In case it does, the next question would be how to convince the build
> > system to use git from a non-default location.
>
> 1) /usr/bin/git doesn't seem to exist on 10.6.8
> 2) port install git
> 3) which git => /macport/bin/git
> 4) #=> git clone https://github.com/snoyberg/filelock.git/
> Cloning into 'filelock'...
> remote: Enumerating objects: 13, done.
> remote: Counting objects: 100% (13/13), done.
> remote: Compressing objects: 100% (10/10), done.
> Receiving objects: 100% (127/127), 24.31 KiB | 1.06 MiB/s, done.
> remote: Total 127 (delta 2), reused 11 (delta 1), pack-reused 114
> Resolving deltas: 100% (52/52), done.
>
> 5) symlink : ln -s /macports/bin/git /usr/bin/git
> #=> ls -l /usr/bin/git
> lrwxr-xr-x ... /usr/bin/git -> /macports/bin/git
>
> 6) port -cuvN install still immediately segfaults
> It doesn't look as if it even reaches that "git clone ..." point

Judging from the logs it seems that it fails at git clone on 10.8, and
segfaults on 10.6 and 10.7, which probably means that the bootstrap
binary has only been compiled for 10.8 and newer. Fixing the
certificate issue might be doable in an easier way than getting the
compiler to work on 10.6.

What might work (but I don't really know) is to download 10.6 SDK on a
new OS, install some version of stack there, and then force the
selection of C compiler, SDK, and target to compile a binary for 10.6.

It seems to me that one needs to start with a working compiler to
build a (newer) compiler, similar as you need a working C/C++ compiler
to build gcc or clang from source, except that they don't ship a
version compatible with older systems. I doubt that there is any
serious technical issue, but more of a lack of upstream interest.

Mojca


More information about the macports-dev mailing list