www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC 0.16.0 beta2 is out! Try out before we create the final release!

reply Kai Nacke <kai redstar.de> writes:
Hi everyone!

On behalf of the LDC team I am proud to announce the LDC 0.16.0 
beta2 release!
It is based on the 2.067.1 front-end and LLVM 3.1-3.7 (OS X: no 
support for 3.3).

If no more severe errors are reported then the next version will 
be the final release. The LDC team already considers this the 
best LDC release of all times!

Big news is that the Win64 version of the compiler reaches 
production quality, thanks to the hard work from kinke!

This release has been checked to work on Linux/PPC64 and 
OpenSolaris (x86), too. There is still a major issue on FreeBSD 
(x86_64) (issue #1119).
Due to a library build problem with druntime/Phobos there is no 
MinGW32 version (issue #1121). This is currently under 
investigation but we are also looking for volunteers. If you need 
this platform please consider helping us!!!

Big thanks to everyone who provided feedback on the last beta 
version! Without your feedback it would not be possible to 
eliminate the bugs so fast!

Most important changes are:

- Frontend is now at 2.067.1
- LLVM 3.7 is supported
- DMD-style coverage analysis is added
- ABI changes which fixes a lot of bugs in the Win64 compiler
- The ldc2 driver now only use slow -debuglib libraries if 
explicitly asked to

Be sure to read the change log at the GitHub release page which 
also has the package download links:
https://github.com/ldc-developers/ldc/releases/tag/v0.16.0-beta2

MD5 checksums for the release packages:

cdba4f2e043ed55409a7ba27d35f1fc9 ldc-0.16.0-beta2-src.tar.gz
9ba23d30393ad3af6bcad76c6ac347f4 
ldc2-0.16.0-beta2-linux-x86.tar.gz
cbd6418b6eab0eedbe999b727dc18a61 
ldc2-0.16.0-beta2-linux-x86.tar.xz
eb6a89f95446a909739ae5748335bc97 
ldc2-0.16.0-beta2-linux-x86_64.tar.gz
a07a1f622eddba7419b94325d913082e 
ldc2-0.16.0-beta2-linux-x86_64.tar.xz
e316f5fb2e2b1df764b76b114fc0db98 
ldc2-0.16.0-beta2-osx-x86_64.tar.gz
3fc6a2276b263a97398cfd28cc98641c 
ldc2-0.16.0-beta2-osx-x86_64.tar.xz
9f9e0d23b5a8a449159b47b715c0963d ldc2-0.16.0-beta2-win64-msvc.zip

Regarding the binaries:
The Linux binaries are built on Ubuntu 12.04 LTS with gcc 4.8.x 
and LLVM 3.7.0. They work on Ubuntu 12.04 LTS (or later) without 
installing additional software.

The OS X binaries are built with LLVM 3.6.2 on OS X 10.10.

The Win64 MSVC version is built with VS2015 using LLVM 3.7 in 
release mode. The distribution now contains a precompiled libcurl 
7.40.0 from http://d.darktech.org/libcurl.html. For any other 
VisualStudio version you need to rebuild the library.
You find the build script here: 
https://github.com/ldc-developers/ldc-scripts/blob/master/ldc2-win64/RELEASE.proj

Please be sure to report any bugs at 
https://github.com/ldc-developers/ldc/issues, and feel free to 
drop by at the digitalmars.D.ldc forums 
(http://forum.dlang.org/group/digitalmars.D.ldc) for any 
questions or comments.

Thanks to everybody involved in making this happen!

Regards,
Kai
Oct 10 2015
next sibling parent Daniel N <ufo orbiting.us> writes:
On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Big news is that the Win64 version of the compiler reaches 
 production quality, thanks to the hard work from kinke!
Fantastic, thanks! (I filed one minor issue, otherwise looks great!)
Oct 10 2015
prev sibling next sibling parent extrawurst <stephan extrawurst.org> writes:
On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Hi everyone!

 On behalf of the LDC team I am proud to announce the LDC 0.16.0 
 beta2 release!
 It is based on the 2.067.1 front-end and LLVM 3.1-3.7 (OS X: no 
 support for 3.3).

 [...]
Works great in my projects! Awesome work!
Oct 10 2015
prev sibling next sibling parent reply Ivan Butygin <ivan.butygin gmail.com> writes:
On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Hi everyone!

 On behalf of the LDC team I am proud to announce the LDC 0.16.0 
 beta2 release!
 It is based on the 2.067.1 front-end and LLVM 3.1-3.7 (OS X: no 
 support for 3.3).

 [...]
Hello, I have some issues with align() attribute. http://pastebin.com/1uCRwDfS Assert fails if I uncomment somefun(buf) line but works otherwise. win64 msvc build ldc2 main.d -w -g -unittest -m64 -oq
Oct 11 2015
parent reply Kai Nacke <kai redstar.de> writes:
On Sunday, 11 October 2015 at 13:35:48 UTC, Ivan Butygin wrote:
 On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Hi everyone!

 On behalf of the LDC team I am proud to announce the LDC 
 0.16.0 beta2 release!
 It is based on the 2.067.1 front-end and LLVM 3.1-3.7 (OS X: 
 no support for 3.3).

 [...]
Hello, I have some issues with align() attribute. http://pastebin.com/1uCRwDfS Assert fails if I uncomment somefun(buf) line but works otherwise. win64 msvc build ldc2 main.d -w -g -unittest -m64 -oq
Hmm, I see in the IR %_param_0 = alloca %bug.some_buf*, align 8 ; [#uses = 2, size/byte = 8] which is consistent with the output. :-( Regards, Kai
Oct 11 2015
parent Kai Nacke <kai redstar.de> writes:
On Sunday, 11 October 2015 at 14:20:44 UTC, Kai Nacke wrote:
 Hello, I have some issues with align() attribute.
 http://pastebin.com/1uCRwDfS
 Assert fails if I uncomment somefun(buf) line but works 
 otherwise.
 win64 msvc build
 ldc2 main.d -w -g -unittest -m64 -oq
Issue #1154 (https://github.com/ldc-developers/ldc/issues/1154)
Oct 11 2015
prev sibling next sibling parent anonymous <a b.cd> writes:
On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Please be sure to report any bugs at 
 https://github.com/ldc-developers/ldc/issues, and feel free to 
 drop by at the digitalmars.D.ldc forums 
 (http://forum.dlang.org/group/digitalmars.D.ldc) for any 
 questions or comments.
I have a vibe.d project linking to some C++ code and dub build --compiler=/tmp/ldc2-0.16.0-beta2-linux-x86_64/bin/ldc2 --force prints warning: Linking two modules of different data layouts: '<string>' is '' whereas 'source/myfile.d' is 'e-m:e-i64:64-f80:128-n8:16:32:64-S128' C++ compiler is g++ (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 Any guess where this comes from? A hint would help create a reduced test case / find my mistake. A similar (but smaller project) compiles fine... dub clean does not help. The produced binary seems to work.
Oct 11 2015
prev sibling next sibling parent John Colvin <john.loughran.colvin gmail.com> writes:
On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Hi everyone!

 On behalf of the LDC team I am proud to announce the LDC 0.16.0 
 beta2 release!
 It is based on the 2.067.1 front-end and LLVM 3.1-3.7 (OS X: no 
 support for 3.3).

 If no more severe errors are reported then the next version 
 will be the final release. The LDC team already considers this 
 the best LDC release of all times!

 Big news is that the Win64 version of the compiler reaches 
 production quality, thanks to the hard work from kinke!

 This release has been checked to work on Linux/PPC64 and 
 OpenSolaris (x86), too. There is still a major issue on FreeBSD 
 (x86_64) (issue #1119).
 Due to a library build problem with druntime/Phobos there is no 
 MinGW32 version (issue #1121). This is currently under 
 investigation but we are also looking for volunteers. If you 
 need this platform please consider helping us!!!

 Big thanks to everyone who provided feedback on the last beta 
 version! Without your feedback it would not be possible to 
 eliminate the bugs so fast!

 Most important changes are:

 - Frontend is now at 2.067.1
 - LLVM 3.7 is supported
 - DMD-style coverage analysis is added
 - ABI changes which fixes a lot of bugs in the Win64 compiler
 - The ldc2 driver now only use slow -debuglib libraries if 
 explicitly asked to

 Be sure to read the change log at the GitHub release page which 
 also has the package download links:
 https://github.com/ldc-developers/ldc/releases/tag/v0.16.0-beta2

 MD5 checksums for the release packages:

 cdba4f2e043ed55409a7ba27d35f1fc9 ldc-0.16.0-beta2-src.tar.gz
 9ba23d30393ad3af6bcad76c6ac347f4 
 ldc2-0.16.0-beta2-linux-x86.tar.gz
 cbd6418b6eab0eedbe999b727dc18a61 
 ldc2-0.16.0-beta2-linux-x86.tar.xz
 eb6a89f95446a909739ae5748335bc97 
 ldc2-0.16.0-beta2-linux-x86_64.tar.gz
 a07a1f622eddba7419b94325d913082e 
 ldc2-0.16.0-beta2-linux-x86_64.tar.xz
 e316f5fb2e2b1df764b76b114fc0db98 
 ldc2-0.16.0-beta2-osx-x86_64.tar.gz
 3fc6a2276b263a97398cfd28cc98641c 
 ldc2-0.16.0-beta2-osx-x86_64.tar.xz
 9f9e0d23b5a8a449159b47b715c0963d 
 ldc2-0.16.0-beta2-win64-msvc.zip

 Regarding the binaries:
 The Linux binaries are built on Ubuntu 12.04 LTS with gcc 4.8.x 
 and LLVM 3.7.0. They work on Ubuntu 12.04 LTS (or later) 
 without installing additional software.

 The OS X binaries are built with LLVM 3.6.2 on OS X 10.10.

 The Win64 MSVC version is built with VS2015 using LLVM 3.7 in 
 release mode. The distribution now contains a precompiled 
 libcurl 7.40.0 from http://d.darktech.org/libcurl.html. For any 
 other VisualStudio version you need to rebuild the library.
 You find the build script here: 
 https://github.com/ldc-developers/ldc-scripts/blob/master/ldc2-win64/RELEASE.proj

 Please be sure to report any bugs at 
 https://github.com/ldc-developers/ldc/issues, and feel free to 
 drop by at the digitalmars.D.ldc forums 
 (http://forum.dlang.org/group/digitalmars.D.ldc) for any 
 questions or comments.

 Thanks to everybody involved in making this happen!

 Regards,
 Kai
brew reinstall ldc --devel :) Thanks for all the great work
Oct 11 2015
prev sibling next sibling parent reply Ivan Butygin <ivan.butygin gmail.com> writes:
On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Hi everyone!

 On behalf of the LDC team I am proud to announce the LDC 0.16.0 
 beta2 release!
 It is based on the 2.067.1 front-end and LLVM 3.1-3.7 (OS X: no 
 support for 3.3).

 [...]
Hello again, I found another issue :) http://pastebin.com/wD9JVX8N Prints 0
Oct 12 2015
parent reply Marco Leise <Marco.Leise gmx.de> writes:
Am Mon, 12 Oct 2015 18:04:26 +0000
schrieb Ivan Butygin <ivan.butygin gmail.com>:

 On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 Hi everyone!

 On behalf of the LDC team I am proud to announce the LDC 0.16.0 
 beta2 release!
 It is based on the 2.067.1 front-end and LLVM 3.1-3.7 (OS X: no 
 support for 3.3).

 [...]
Hello again, I found another issue :) http://pastebin.com/wD9JVX8N Prints 0
I was of the impression that you need to put the initialized field of a union first, but maybe I'm wrong. There is at least this in the documentation on struct literals: "If there are anonymous unions in the struct, only the first member of the anonymous union can be initialized with a struct literal, and all subsequent non-overlapping fields are default initialized." It may or may not apply here. -- Marco
Oct 13 2015
parent Mike Parker <aldacron gmail.com> writes:
On Tuesday, 13 October 2015 at 11:22:54 UTC, Marco Leise wrote:

 I was of the impression that you need to put the initialized 
 field of a union first, but maybe I'm wrong. There is at least 
 this in the documentation on struct literals: "If there are 
 anonymous unions in the struct, only the first member of the 
 anonymous union can be initialized with a struct literal, and 
 all subsequent non-overlapping fields are default initialized."
You're correct in that only the first member of a union can be initialized. DMD will give you an error about "overlapping initialization" if you attempt to initialize a different member. However, it will allow you to do so if turn off default initialization for preceding members as in the Pastebin example. union Foo { uint ui; float f = 2.0f; // Error: overlapping initialization for field f and ui double d; } union Bar { uint ui = void; // This makes it OK float f = 2.0f; double d; } The pastebin example compiles, prints 256, and passes the assert with DMD 2.068.2. But I can't find any documentation on it anywhere.
Oct 14 2015
prev sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
Kai Nacke:

On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 On behalf of the LDC team I am proud to announce the LDC 0.16.0 
 beta2 release!
I have tried this one:
 ldc2-0.16.0-beta2-win64-msvc.zip
A default 64 bit Windows installation lacks the vcruntime140.dll and msvcp140.dll. If you have those dlls in 64 bit versions and you compile, it says some syntax is wrong and stops with: Error: ...\ldc2\bin\amd64.bat failed with status: 1 Bye, bearophile
Oct 16 2015
next sibling parent reply kinke <noone nowhere.com> writes:
On Friday, 16 October 2015 at 09:50:08 UTC, bearophile wrote:
 A default 64 bit Windows installation lacks the 
 vcruntime140.dll and msvcp140.dll.
LDC is linked dynamically against the MS C runtime, so you need the VS 2015 runtime. You'll actually need VS 2015 (not just the runtime) later for linking anyway; VS 2013 is only supported when building LDC yourself. This is mentioned in http://wiki.dlang.org/Latest_pre-built_LDC_for_Win64.
 If you have those dlls in 64 bit versions and you compile, it 
 says some syntax is wrong and stops with:

 Error: ...\ldc2\bin\amd64.bat failed with status: 1
This is LDC issue #1152 (https://github.com/ldc-developers/ldc/issues/1152), which is fixed in master. You may just go ahead and download the latest CI build from https://github.com/ldc-developers/ldc/releases/tag/LDC-Win64-master.
Oct 16 2015
next sibling parent reply Kagamin <spam here.lot> writes:
On Friday, 16 October 2015 at 13:55:54 UTC, kinke wrote:
 On Friday, 16 October 2015 at 09:50:08 UTC, bearophile wrote:
 A default 64 bit Windows installation lacks the 
 vcruntime140.dll and msvcp140.dll.
LDC is linked dynamically against the MS C runtime, so you need the VS 2015 runtime.
Wasn't it changed to universal runtime?
Oct 16 2015
parent kinke <noone nowhere.com> writes:
On Friday, 16 October 2015 at 15:15:16 UTC, Kagamin wrote:
 On Friday, 16 October 2015 at 13:55:54 UTC, kinke wrote:
 On Friday, 16 October 2015 at 09:50:08 UTC, bearophile wrote:
 A default 64 bit Windows installation lacks the 
 vcruntime140.dll and msvcp140.dll.
LDC is linked dynamically against the MS C runtime, so you need the VS 2015 runtime.
Wasn't it changed to universal runtime?
Afaik, they split it into a universal runtime (part of th e OS) and a Visual C(++) runtime.
Oct 16 2015
prev sibling parent reply bearophile <bearophileHUGS lycos.com> writes:
kinke:

 so you need the VS 2015 runtime. You'll actually need VS 2015 
 (not just the runtime) later for linking anyway;
Is the "community" (free) version enough? Bye, bearophile
Oct 16 2015
parent ZombineDev <valid_email he.re> writes:
On Friday, 16 October 2015 at 19:01:12 UTC, bearophile wrote:
 kinke:

 so you need the VS 2015 runtime. You'll actually need VS 2015 
 (not just the runtime) later for linking anyway;
Is the "community" (free) version enough? Bye, bearophile
Yes VS 2015 Community has more or less the feature set of VS 2010-2013 Professional from previous years, but without some of the more advanced testing, architecture modeling tools and debugging. For example there is no longer the limitation about installing plugins and extensions like the Express version had. It should have all the necessary libraries for linking under C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\ (for 32-bit) and C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\amd64\lib (for 64-bit) or something like that. For example if you want to link a D static library to a C++ program you can use the new support for VS 2015 CRT in DMD v2.069.0 beta like this: [under VS2015 x86 Native Tools Command Prompt] dmd -lib -m32mscoff my_d_library.d cl /nologo my_cpp_program.cpp my_d_library.lib C:\D\dmd2\windows\lib32mscoff\phobos32mscoff.lib "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\lib\legacy_stdio_definitions.lib" I think it should work in a similar way for LDC.
Oct 16 2015
prev sibling parent Paolo Invernizzi <paolo.invernizzi no.address> writes:
On Friday, 16 October 2015 at 09:50:08 UTC, bearophile wrote:
 Kai Nacke:

 On Saturday, 10 October 2015 at 15:28:02 UTC, Kai Nacke wrote:
 On behalf of the LDC team I am proud to announce the LDC 
 0.16.0 beta2 release!
I have tried this one:
 ldc2-0.16.0-beta2-win64-msvc.zip
A default 64 bit Windows installation lacks the vcruntime140.dll and msvcp140.dll. If you have those dlls in 64 bit versions and you compile, it says some syntax is wrong and stops with: Error: ...\ldc2\bin\amd64.bat failed with status: 1 Bye, bearophile
BTW, Welcome back.... bearophile! ;-P --- Paolo
Oct 17 2015