Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-05 Thread Mojca Miklavec
On Wed, 4 Sep 2019 at 18:30, Ken Cunningham wrote:
>
> The new ghc infrastructure is broken on 10.6, and at a quick glance, it looks 
> like it starts building at 10.8, which is actually not too bad, and better 
> than I thought:  
>
> I am not sure if i will ever get around to trying to fix the older systems, 
> and I would doubt if anyone else ever will. It might or might not be possible 
> to do so.
>
> There was some minor talk of resurrecting the ghc v7 infrastructure, but I 
> think that is a dead duck idea as the whole family of hs-* ports needed for 
> it are disappearing too.
>
> So -- you might be out-of-luck there, unless I break my leg or something :>

I guess this would be required to support 10.7 and older:
https://gitlab.haskell.org/ghc/ghc/wikis/cross-compilation
We would need a newer machine to backport to 10.6 first, then from
10.6 do the rest of i386/ppc if necessary.

This one seems to have been compiled on 10.7:
https://www.haskell.org/ghc/download_ghc_7_8_4#macosx_x86_64

Support for the hs-* family might be feasible with Karan's work (he
will also be at the MacPorts meeting in Slovenia in October), but it
probably won't help a bit without a suitable compiler running on that
platform.

Mojca


Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-05 Thread Mojca Miklavec
On Thu, 5 Sep 2019 at 07:02, Bjarne D Mathiesen
 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


Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-04 Thread Bjarne D Mathiesen
Mojca Miklavec wrote:
> 
> 
> V sre., 4. sep. 2019 19:41 je oseba Bjarne D Mathiesen
> mailto:macint...@mathiesen.info>> napisala:
> 
> Joshua Root wrote:
> > It looks like the compiler version check is just assuming that all
> > compilers are gcc. It checks whether the version is at least 4.4,
> which
> > is correct for gcc but not for clang.
> 
> so how do I eg force it to use clang-8.0 ?!?
> 
> 
> ${system_gcc} needs to be replaced with ${configure.cc} in the Portfile.

that didn't make any difference ... it still uses /usr/bin/gcc

> 
> There is plan to switch to portgroup to build stack.
> 
> Mojca
> 

-- 
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
--
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz


Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-04 Thread Bjarne D Mathiesen
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

> 
> Mojca
> 

-- 
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
--
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz


Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-04 Thread Ken Cunningham
I haven't dug in, but unless something has significantly changed,  ghc needs to 
bootstrap from a prebuilt compiler that it downloads, and this prebuilt 
compiler does not run on 10.6.8, so you're out of luck until (at least) we 
figure out how to bootstrap something from a version of ghc that did run on 
10.6.8.

This is not likely to be a small project, but I would be happy to be surprised.

You'd probably be better off to see what is calling in ghc and whether that can 
be turned off -- perhaps it's not really needed.

Ken






On 2019-09-04, at 12:40 PM, Mojca Miklavec wrote:

> 
> 
> V sre., 4. sep. 2019 19:41 je oseba Bjarne D Mathiesen 
>  napisala:
> Joshua Root wrote:
> > It looks like the compiler version check is just assuming that all
> > compilers are gcc. It checks whether the version is at least 4.4, which
> > is correct for gcc but not for clang.
> 
> so how do I eg force it to use clang-8.0 ?!?
> 
> ${system_gcc} needs to be replaced with ${configure.cc} in the Portfile.
> 
> There is plan to switch to portgroup to build stack.
> 
> Mojca



Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-04 Thread Bjarne D Mathiesen
Joshua Root wrote:
> It looks like the compiler version check is just assuming that all
> compilers are gcc. It checks whether the version is at least 4.4, which
> is correct for gcc but not for clang.

so how do I eg force it to use clang-8.0 ?!?

-- 
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
--
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz


Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-04 Thread Joshua Root
On 2019-9-5 02:30 , Ken Cunningham wrote:
> The new ghc infrastructure is broken on 10.6, and at a quick glance, it looks 
> like it starts building at 10.8, which is actually not too bad, and better 
> than I thought:  
> 
> I am not sure if i will ever get around to trying to fix the older systems, 
> and I would doubt if anyone else ever will. It might or might not be possible 
> to do so.

It looks like the compiler version check is just assuming that all
compilers are gcc. It checks whether the version is at least 4.4, which
is correct for gcc but not for clang.

- Josh


Re: [2.6.0-beta1 & LibcxxOnOlderSystems] stack fails to build

2019-09-04 Thread Bjarne D Mathiesen



Ken Cunningham wrote:
> The new ghc infrastructure is broken on 10.6, and at a quick glance, it looks 
> like it starts building at 10.8, which is actually not too bad, and better 
> than I thought:  
> 
> I am not sure if i will ever get around to trying to fix the older systems, 
> and I would doubt if anyone else ever will. It might or might not be possible 
> to do so.
> 
> There was some minor talk of resurrecting the ghc v7 infrastructure, but I 
> think that is a dead duck idea as the whole family of hs-* ports needed for 
> it are disappearing too.
> 
> So -- you might be out-of-luck there, unless I break my leg or something :>

<3 ;-) :-D I'll contract that out to somebody, then :-D ;-) <3

> Ken
> 

It's needed for (at least) recent versions of dovecot2 like
   dovecot2 @2.3.7.2 (mail)
somewhere in the dependency tree.
& dovecot2 is mission-critcal for mee.

My 2 Mac Minis can be hacked to run 10.8, so that will be the route,
I'll have to take then.

-- 
Bjarne D Mathiesen
Korsør ; Danmark ; Europa
--
denne besked er skrevet i et (næsten) M$-frit miljø
MacOS X 10.13.6 High Sierra :
   17" 2011 MacBook Pro ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3
   2012 Mac Pro ; 2 x 3.46GHz 6-Core Xeon ; 48GB
MacOS X 10.6.8 Snow Leopard :
   Mac Mini ; 2GHz Core 2 Duo (64 bit) ; 4GB (3GB actual) 667MHz
   Mac Mini ; 1.83GHz Core Duo (32 bit) ; 2GB 667Mhz