February 20, 2017
On Sunday, 19 February 2017 at 20:19:36 UTC, Sai wrote:
> Done, installed OK.
>
> Executed it and it failed with exact same error, which I guess is expected:

Thanks for the feedback; I'll get that fixed as soon as possible.

I wasn't expecting it to fail, as I'd had a previous report of it working OK on 16.10. :-\
February 20, 2017
On 20 Feb 2017, at 11:52, Joseph Rushton Wakeling via digitalmars-d-ldc wrote:
> Thanks for the feedback; I'll get that fixed as soon as possible.

I presume that part of the improvements for classic snaps you mentioned was building on an older system where GCC doesn't default to position-independent code – try v1.1.1-beta1, which includes https://github.com/ldc-developers/ldc/pull/2009.

 — David
February 22, 2017
On Sunday, 19 February 2017 at 20:19:36 UTC, Sai wrote:
> sai@saivb:~/tmp$ /snap/bin/ldc2 t.d
> /usr/bin/ld: /snap/ldc2/4/bin/../lib/libdruntime-ldc.a(errno.c.o): relocation R_X86_64_PC32 against symbol `__errno_location@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: error: ld returned 1 exit status
> Error: /usr/bin/gcc failed with status: 1

Sai, Joseph – could you please verify that the new 1.1.1-beta1 snap works on both 14.04 and 16.10? We will go ahead with the release, then.

Thanks!

 — David
February 22, 2017
On Wednesday, 22 February 2017 at 08:38:49 UTC, David Nadlinger wrote:
> Sai, Joseph – could you please verify that the new 1.1.1-beta1 snap works on both 14.04 and 16.10? We will go ahead with the release, then.

Can confirm it works on 14.04.  I verified also with 16.10 last night, but can re-verify this evening if you want extra confirmation.

Sai, if you are happy to try this out, it would be good to have your confirmation that it works for you as well.
February 22, 2017
On Wednesday, 22 February 2017 at 12:15:02 UTC, Joseph Rushton Wakeling wrote:
> Can confirm it works on 14.04.  I verified also with 16.10 last night, but can re-verify this evening if you want extra confirmation.

Re-verified with 16.10: the 1.1.1-beta1 snap (revision 5) works fine for me.
February 22, 2017
On Wednesday, 22 February 2017 at 16:02:19 UTC, Joseph Rushton Wakeling wrote:
> On Wednesday, 22 February 2017 at 12:15:02 UTC, Joseph Rushton Wakeling wrote:
>> Can confirm it works on 14.04.  I verified also with 16.10 last night, but can re-verify this evening if you want extra confirmation.
>
> Re-verified with 16.10: the 1.1.1-beta1 snap (revision 5) works fine for me.

... and also the 1.1.1-beta1 prebuilt LDC downloaded from GitHub.
February 23, 2017
On Wednesday, 22 February 2017 at 16:02:19 UTC, Joseph Rushton Wakeling wrote:
> On Wednesday, 22 February 2017 at 12:15:02 UTC, Joseph Rushton Wakeling wrote:
>> Can confirm it works on 14.04.  I verified also with 16.10 last night, but can re-verify this evening if you want extra confirmation.
>
> Re-verified with 16.10: the 1.1.1-beta1 snap (revision 5) works fine for me.


Yes, I also verified it. No errors. Thank you very much.


sai@saivb:~/tmp$ /snap/ldc2/current/bin/ldc2  t.d

sai@saivb:~/tmp$ ./t
Hello world!

sai@saivb:~/tmp$ sudo snap info ldc2
name:      ldc2
summary:   "D compiler with LLVM backend"
publisher: ldc
description: |
  LDC is a portable compiler for the D programming Language, with modern
  optimization and code generation capabilities. It uses the official DMD
  compiler frontend to support the latest version of D2, and uses the LLVM Core
  libraries for code generation.
commands:
  - ldc2.ldc-prune-cache
  - ldc2
  - ldc2.ldmd2
  - ldc2.ldc-profdata
tracking:  edge
installed: 1.1.1 (6) 35MB classic
refreshed: 2017-02-22 20:07:36 -0500 EST
channels:
  edge:    1.1.1 (6) 35MB classic


February 23, 2017
On Wednesday, 22 February 2017 at 21:10:19 UTC, Joseph Rushton Wakeling wrote:
> On Wednesday, 22 February 2017 at 16:02:19 UTC, Joseph Rushton Wakeling wrote:
>> On Wednesday, 22 February 2017 at 12:15:02 UTC, Joseph Rushton Wakeling wrote:
>>> Can confirm it works on 14.04.  I verified also with 16.10 last night, but can re-verify this evening if you want extra confirmation.
>>
>> Re-verified with 16.10: the 1.1.1-beta1 snap (revision 5) works fine for me.
>
> ... and also the 1.1.1-beta1 prebuilt LDC downloaded from GitHub.


I am not sure how to download the prebuilt from GitHub, I am not good at navigating the GitHub pages yet. I already verified the snap, if you can give me a link to the pre-built on Github, I will download and test it on my PC.

Thank you (and David) for fixing this very promptly.

Just a stupid question:  Which one is preferred as a user? Snap version or the prebuilt version on Github? Personally I don't mind as long as the download/install instructions are clear. But It seems to me that snap is supposed to be more user friendly. So may be snaps are preferred for non-experts like me?




February 23, 2017
On Thursday, 23 February 2017 at 16:30:47 UTC, Sai wrote:
> I am not sure how to download the prebuilt from GitHub, I am not good at navigating the GitHub pages yet. I already verified the snap, if you can give me a link to the pre-built on Github, I will download and test it on my PC.

I don't think the GitHub prebuilt 1.1.1 packages are available yet.  You can check the list of releases (and corresponding downloads) here:
https://github.com/ldc-developers/ldc/releases

> Thank you (and David) for fixing this very promptly.

David did all the fixes, I just tested them out to make sure they worked ;-)

> Just a stupid question:  Which one is preferred as a user? Snap version or the prebuilt version on Github? Personally I don't mind as long as the download/install instructions are clear. But It seems to me that snap is supposed to be more user friendly. So may be snaps are preferred for non-experts like me?

It's not at all a stupid question.

The easy answer is, "Whichever you prefer as a user."  The slightly more complicated answer is that the snap packages are quite a recent effort which is still somewhat work-in-progress.  The current snap package is in the --edge snap channel (as in, 'bleeding edge') for a reason. ;-)

However, in practice, as an Ubuntu user, it is likely to be just as effective for you, and certainly easier to install and keep up to date.  So if that works nicely for you, there's no reason you shouldn't continue to use it.

If you do that, though, I'd suggest keeping an eye out for announcements related to the snap package, since its status may change fairly often in the near future.  You can also report any compilation problems you encounter here:
https://github.com/ldc-developers/ldc2.snap/issues
February 23, 2017
On Thursday, 23 February 2017 at 16:19:41 UTC, Sai wrote:
> sai@saivb:~/tmp$ /snap/ldc2/current/bin/ldc2  t.d

You shouldn't need to use the full path-to-binary like that.  If you type,

    which ldc2

on your system, what comes up?