www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC 1.1.0 released

reply David Nadlinger <code klickverbot.at> writes:
Hi everyone,

On behalf of the LDC team I am happy to finally announce the 
release of LDC 1.1.0, based on the 2.071. It has been in the 
making for an uncharacteristically long time, but we hope you 
will enjoy the multitude of new features: profile-guided 
optimization, better-integrated link-time optimization, 
experimental cross module inlining and first Windows DLL export 
support; along with UDAs for fine-grained optimizer control (e.g. 
 fastmath), a partial object file cache, and of course many other 
bug fixes and improvements.

Binary packages (now also including Dub) and the source tarball 
can be found on the GitHub release page, along with the detailed 
changelog:

https://github.com/ldc-developers/ldc/releases/tag/v1.1.0

All the binary packages are built against LLVM 3.9.1. The Linux 
x86/x86_64 binaries are built on Ubuntu 12.04 LTS and should work 
on any newer distribution. The Win32 and Win64 MSVC versions are 
built with Visual Studio 2015, and shouldn't be expected to work 
with any older version.

Note that there were some changes to the command line semantics, 
which – although mostly minute – could break some application: 
http://forum.dlang.org/post/ubobkfmsspbsmjunosna forum.dlang.org

Please be sure to report any bugs at 
https://github.com/ldc-developers/ldc/issues, and feel free to 
post here in the digitalmars.D.ldc forums for any questions or 
comments.

Oh, and stay tuned for a new release soon, now that the LDC 
release process has been straightened out and the team has more 
manpower again. There even is a pull request open for 2.072.2 
already.

  — David
Jan 31
next sibling parent Dan Olson <gorox comcast.net> writes:
David Nadlinger <code klickverbot.at> writes:

 Binary packages (now also including Dub) and the source tarball can be
 found on the GitHub release page, along with the detailed changelog:

 https://github.com/ldc-developers/ldc/releases/tag/v1.1.0

 All the binary packages are built against LLVM 3.9.1. The Linux
 x86/x86_64 binaries are built on Ubuntu 12.04 LTS and should work on
 any newer distribution. The Win32 and Win64 MSVC versions are built
 with Visual Studio 2015, and shouldn't be expected to work with any
 older version.
Just added armhf binary (arm-none-linux-gnueabihf) built on Raspbian GNU/Linux 8.0 (jessie). It can run on both armv7 and armv6 systems (Raspberry Pi 2,3 are armv7, original Pi 1 and Pi Zero are armv6). I've only tested it on Raspbian, hopefully it will work on other ARM boards running a compatible Linux version. -- Dan
Jan 31
prev sibling next sibling parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Wednesday, 1 February 2017 at 03:40:42 UTC, David Nadlinger 
wrote:
 On behalf of the LDC team I am happy to finally announce the 
 release of LDC 1.1.0, based on the 2.071. It has been in the 
 making for an uncharacteristically long time, but we hope you 
 will enjoy the multitude of new features: profile-guided 
 optimization, better-integrated link-time optimization, 
 experimental cross module inlining and first Windows DLL export 
 support; along with UDAs for fine-grained optimizer control 
 (e.g.  fastmath), a partial object file cache, and of course 
 many other bug fixes and improvements.
Congratulations everyone! :-) I've uploaded an updated version of the snap package to the Ubuntu store, based on the following package definition: https://github.com/ldc-developers/ldc2.snap/releases/tag/rev2 As before this is now awaiting manual review, which based on previous experience should take a few working days. I'll make a post in the Announce forum once it is published. The snap package uses LLVM 3.8, since there's not a 3.9 package available in Ubuntu 16.04. I'm looking into how to most effectively get 3.9 in there; it will probably involve building LLVM from source, but since that's a reasonably hefty process, I thought I'd get an initial v1.1.0 snap out there before moving on that.
Feb 02
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Friday, 3 February 2017 at 00:52:49 UTC, Joseph Rushton 
Wakeling wrote:
 I've uploaded an updated version of the snap package to the 
 Ubuntu store, based on the following package definition:
 https://github.com/ldc-developers/ldc2.snap/releases/tag/rev2

 As before this is now awaiting manual review, which based on 
 previous experience should take a few working days.  I'll make 
 a post in the Announce forum once it is published.
It's now published in the `edge` channel. For people with it already installed, `sudo snap refresh` (or `sudo snap refresh --edge ldc2` if that doesn't work) should upgrade it for you. Otherwise, sudo snap install --classic --edge ldc2 ... should install it on an Ubuntu 16.04 system or later. A colleague gave it a go on his Arch machine, and it seems that the `snapd` version available there still doesn't support classic snaps. If anyone is running Debian, Gentoo, Fedora or OpenSUSE, it would be great to know about your experience -- you can install `snapd` following the instructions here: https://snapcraft.io/docs/core/install
Feb 03
parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Friday, 3 February 2017 at 21:45:09 UTC, Joseph Rushton 
Wakeling wrote:
 It's now published in the `edge` channel.  For people with it 
 already installed, `sudo snap refresh` (or `sudo snap refresh 
 --edge ldc2` if that doesn't work) should upgrade it for you.  
 Otherwise,

     sudo snap install --classic --edge ldc2

 ... should install it on an Ubuntu 16.04 system or later.
This has now been updated: https://github.com/ldc-developers/ldc2.snap/releases/tag/rev3 The new package uses a fresh build of LLVM 3.9.1 as the backend, as well as bootstrapping with a fresh build of LDC 0.17.3. Thanks to Johan's advice I've also enabled LTO support. This is definitely an experimental feature -- I'm not 100% sure the package's LLVMgold-ldc.so plugin will work on systems that do not have ABI compatibility with Ubuntu 16.04 -- but since the package is still in the (bleeding) 'edge' channel, I thought it was worth trying out ;-) Let me know if you try it out and it works (or fails!) for you! Thanks & best wishes, -- Joe
Feb 09
prev sibling parent reply Sai <tmp tmp.com> writes:
On Wednesday, 1 February 2017 at 03:40:42 UTC, David Nadlinger 
wrote:
 Hi everyone,

 On behalf of the LDC team I am happy to finally announce the 
 release of LDC 1.1.0, based on the 2.071. It has been in the 
 making for an uncharacteristically long time, but we hope you 
 will enjoy the multitude of new features: profile-guided 
 optimization, better-integrated link-time optimization, 
 experimental cross module inlining and first Windows DLL export 
 support; along with UDAs for fine-grained optimizer control 
 (e.g.  fastmath), a partial object file cache, and of course 
 many other bug fixes and improvements.

 Binary packages (now also including Dub) and the source tarball 
 can be found on the GitHub release page, along with the 
 detailed changelog:

 https://github.com/ldc-developers/ldc/releases/tag/v1.1.0

 All the binary packages are built against LLVM 3.9.1. The Linux 
 x86/x86_64 binaries are built on Ubuntu 12.04 LTS and should 
 work on any newer distribution. The Win32 and Win64 MSVC 
 versions are built with Visual Studio 2015, and shouldn't be 
 expected to work with any older version.

 Note that there were some changes to the command line 
 semantics, which – although mostly minute – could break some 
 application: 
 http://forum.dlang.org/post/ubobkfmsspbsmjunosna forum.dlang.org

 Please be sure to report any bugs at 
 https://github.com/ldc-developers/ldc/issues, and feel free to 
 post here in the digitalmars.D.ldc forums for any questions or 
 comments.

 Oh, and stay tuned for a new release soon, now that the LDC 
 release process has been straightened out and the team has more 
 manpower again. There even is a pull request open for 2.072.2 
 already.

  — David
I am using Lubuntu 16.10, testing a simple hello world: sai saivb:~$ uname -a Linux saivb 4.8.0-37-generic #39-Ubuntu SMP Thu Jan 26 02:27:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux sai saivb:~/tmp$ cat t.d import std.stdio; int main(string[] args) { writefln("Hello world!"); return 0; } I am getting the following error: sai saivb:~/tmp$ ldc2 t.d /usr/bin/ld: /home/sai/Programs/ldc2-1.1.0-linux-x86_64/bin/../lib/libdrunti e-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 saivb:~/tmp$ ldc2 -relocation-model=dynamic-no-pic t.d /usr/bin/ld: /home/sai/Programs/ldc2-1.1.0-linux-x86_64/bin/../lib/libdrunti e-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 saivb:~/tmp$ ldc2 -relocation-model=pic t.d /usr/bin/ld: /home/sai/Programs/ldc2-1.1.0-linux-x86_64/bin/../lib/libdrunti e-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 I posted this in other thread, anything else that I can do besides recompiling druntime/phobos? Thanks in advance.
Feb 18
parent reply David Nadlinger <code klickverbot.at> writes:
On Saturday, 18 February 2017 at 21:50:27 UTC, Sai wrote:
 I posted this in other thread, anything else that I can do 
 besides recompiling druntime/phobos?
This is actually a bug in the binary package, which I just added an issue for: https://github.com/ldc-developers/ldc/issues/2008 Ubuntu 16.10 unfortunately broke forwards-compatibility for libraries and compilers, in the sense that they patched the linker to create position-independent executables by default. We decided to follow suit and make LDC default to position-independent code on Linux as well (which makes sense as it enables ASLR and friends). Thus, setting `-relocation-model=pic` doesn't change anything – as indicated in the error message, the problem is in the C parts of the standard library, not your D code. This is because the packages are built on an older Ubuntu version, with the default C compiler settings – which of course implicitly default to non-PIC. We'll have to amend our build scripts and push out a new point release to fix this. I'm rather amazed that during six (!) beta versions, nobody tested the binaries on 16.10… (DMD 2.071.2 and older was completely broken on 16.10 for this reason.) — David
Feb 18
parent reply Sai <tmp tmp.com> writes:
On Saturday, 18 February 2017 at 23:09:29 UTC, David Nadlinger 
wrote:
 On Saturday, 18 February 2017 at 21:50:27 UTC, Sai wrote:
 [...]
This is actually a bug in the binary package, which I just added an issue for: https://github.com/ldc-developers/ldc/issues/2008 [...]
Ah, thanks for the detailed reply. Funny that I downloaded the beta version for testing exactly this, but couldn't thanks to my new born daughter :) Looking forward to the next point release with the fix.
Feb 19
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Sunday, 19 February 2017 at 15:05:18 UTC, Sai wrote:
 Ah, thanks for the detailed reply. Funny that I downloaded the 
 beta version for testing exactly this, but couldn't thanks to 
 my new born daughter :)
 Looking forward to the next point release with the fix.
Since you're on Ubuntu 16.10 you could also try the snap package for LDC 1.1.0: sudo snap install --classic --edge ldc2
Feb 19
parent reply Sai <tmp tmp.com> writes:
On Sunday, 19 February 2017 at 16:51:39 UTC, Joseph Rushton 
Wakeling wrote:
 Since you're on Ubuntu 16.10 you could also try the snap 
 package for LDC 1.1.0:

     sudo snap install --classic --edge ldc2
Done, installed OK. Executed it and it failed with exact same error, which I guess is expected: 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
Feb 19
next sibling parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
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. :-\
Feb 20
parent David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
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
Feb 20
prev sibling parent reply David Nadlinger <code klickverbot.at> writes:
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
Feb 22
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
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.
Feb 22
parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
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.
Feb 22
next sibling parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
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.
Feb 22
parent reply Sai <tmp tmp.com> writes:
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?
Feb 23
parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
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
Feb 23
prev sibling parent reply Sai <tmp tmp.com> writes:
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
Feb 23
next sibling parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
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?
Feb 23
parent reply Sai <tmp tmp.com> writes:
On Thursday, 23 February 2017 at 17:56:59 UTC, Joseph Rushton 
Wakeling wrote:
 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?
I had the old ldc installed from apt-get on the path. I uninstalled it now and added /snap/bin to the path. I know I could have just added the /snap/bin in the beginning of the path without removing old ldc, but I want to remove it anyway due to the PIC errors.
Feb 24
parent Temtaime <temtaime gmail.com> writes:
ldc.acomirei.ru
Just updated to 1.1.1 version!
Mar 15
prev sibling parent Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Thursday, 23 February 2017 at 16:19:41 UTC, Sai wrote:
 sai saivb:~/tmp$ sudo snap info ldc2
Oh, and `snap info` doesn't need `sudo` in order to work. You can run it as a regular user. It's only when you are doing things like install/remove that you need `sudo` privileges.
Feb 23