www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - dmd: can't build on Arch Linux or latest Ubuntu

reply Atila Neves <atila.neves gmail.com> writes:
I can't build dmd on Arch Linux anymore. I'm told it's because of 
a binutils update. Annoying.

So I went "I know, I'll just use a container". I tried Ubuntu 
Zesty in docker. That doesn't build dmd off the bat either, it 
fails with PIC errors.

I'm using Trusty, and that works. But... it's a matter of time 
before most people are on newer versions of everything and dmd 
won't be buildable on Linux.

Maybe add newer distros on the autotester?

Atila
May 10
next sibling parent reply Seb <seb wilzba.ch> writes:
On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 I can't build dmd on Arch Linux anymore. I'm told it's because 
 of a binutils update. Annoying.
Yep, at least running the tests on Phobos fails due to changes in binutils 2.28, see this bug report for more details: https://issues.dlang.org/show_bug.cgi?id=17375
 So I went "I know, I'll just use a container". I tried Ubuntu 
 Zesty in docker. That doesn't build dmd off the bat either, it 
 fails with PIC errors.
AFAIK this bug should have been fixed. However, IIRC 2.073.2 or 2.074 as host compiler is required.
 I'm using Trusty, and that works. But... it's a matter of time 
 before most people are on newer versions of everything and dmd 
 won't be buildable on Linux.

 Maybe add newer distros on the autotester?
Hehe, that's nearly not possible. Since a couple of months there's an ongoing effort to change the directory layout to src/ddmd, which is been blocked by necessary changes the autotester. Travis doesn't support newer distros easily as well, but e.g. CircleCi 2 does as they have native integration with Docker: https://circleci.com/blog/say-hello-to-circleci-2-0/ https://circleci.com/docs/2.0/ PRs are welcome ;-)
 Atila
May 10
next sibling parent reply ketmar <ketmar ketmar.no-ip.org> writes:
Seb wrote:

 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 I can't build dmd on Arch Linux anymore. I'm told it's because of a 
 binutils update. Annoying.
Yep, at least running the tests on Phobos fails due to changes in binutils 2.28, see this bug report for more details: https://issues.dlang.org/show_bug.cgi?id=17375
yeah, the great thing. i was hit by that bus too, and had to mutilate druntime to make unittests work again. lucky me, i'm using static phobos. don't even want to think about the scale of the disaster for people with libphobos2.so...
May 10
parent reply Marco Leise <Marco.Leise gmx.de> writes:
Am Wed, 10 May 2017 20:59:33 +0300
schrieb ketmar <ketmar ketmar.no-ip.org>:

 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:  
 I can't build dmd on Arch Linux anymore. I'm told it's because of a 
 binutils update. Annoying.  
yeah, the great thing. i was hit by that bus too, and had to mutilate druntime to make unittests work again. lucky me, i'm using static phobos. don't even want to think about the scale of the disaster for people with libphobos2.so...
O.O Like what will happen to us on Gentoo with libphobos2.so when binutils-2.8 moves to stable here? And can it all be solved by compiling with -fPIC, like is required for hardened installations anyways or are there dmd versions that flat out wont work any longer? -- Marco
May 10
next sibling parent Stanislav Blinov <stanislav.blinov gmail.com> writes:
On Wednesday, 10 May 2017 at 21:03:30 UTC, Marco Leise wrote:
 Am Wed, 10 May 2017 20:59:33 +0300
 schrieb ketmar <ketmar ketmar.no-ip.org>:

 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 I can't build dmd on Arch Linux anymore. I'm told it's 
 because of a binutils update. Annoying.
yeah, the great thing. i was hit by that bus too, and had to mutilate druntime to make unittests work again. lucky me, i'm using static phobos. don't even want to think about the scale of the disaster for people with libphobos2.so...
O.O Like what will happen to us on Gentoo with libphobos2.so when binutils-2.8 moves to stable here? And can it all be solved by compiling with -fPIC, like is required for hardened installations anyways or are there dmd versions that flat out wont work any longer?
What, in half a year or more? :) I'd say we're safe.
May 10
prev sibling parent ketmar <ketmar ketmar.no-ip.org> writes:
Marco Leise wrote:

 Am Wed, 10 May 2017 20:59:33 +0300
 schrieb ketmar <ketmar ketmar.no-ip.org>:

 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:  
 I can't build dmd on Arch Linux anymore. I'm told it's because of a 
 binutils update. Annoying.  
yeah, the great thing. i was hit by that bus too, and had to mutilate druntime to make unittests work again. lucky me, i'm using static phobos. don't even want to think about the scale of the disaster for people with libphobos2.so...
O.O Like what will happen to us on Gentoo with libphobos2.so when binutils-2.8 moves to stable here? And can it all be solved by compiling with -fPIC, like is required for hardened installations anyways or are there dmd versions that flat out wont work any longer?
sorry, i don't know about PIC (not using it). otherwise, you won't be able to run anything with shared phobos: druntime conflict scanner will always find a conflict and abort (that is what happening with test_runner). at least 2.074 is affected. i "solved" it by commenting out druntime checker, but this cannot be used as a general solution, of course: the checker should be fixed. yet i don't know enough about elf and .so (and, tbh, i don't even *want* to dive there). bugreport says that PIC is a working solution (i.e. binaries and libraries built with -fPIC should work). i didn't checked it, tho (not a big fan of PIC).
May 10
prev sibling next sibling parent Brad Roberts via Digitalmars-d <digitalmars-d puremagic.com> writes:
On 5/10/2017 9:20 AM, Seb via Digitalmars-d wrote:
 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 Maybe add newer distros on the autotester?
Hehe, that's nearly not possible. Since a couple of months there's an ongoing effort to change the directory layout to src/ddmd, which is been blocked by necessary changes the autotester.
Yup, but not on my side for a change. :) The first pull request was broken in that it unilaterally broke old branches (ie, stable would have been broken since it still had the old layout). Then it turned out that the windows new layout doesn't match the posix new layout, so still broken at the packages to be tested layer. I'm confident that one day the directory layout changes will actually be completed and consistent.
May 10
prev sibling next sibling parent Laeeth Isharc <laeethnospam nospam.laeeth.com> writes:
On Wednesday, 10 May 2017 at 16:20:24 UTC, Seb wrote:
 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 I can't build dmd on Arch Linux anymore. I'm told it's because 
 of a binutils update. Annoying.
Yep, at least running the tests on Phobos fails due to changes in binutils 2.28, see this bug report for more details: https://issues.dlang.org/show_bug.cgi?id=17375
 So I went "I know, I'll just use a container". I tried Ubuntu 
 Zesty in docker. That doesn't build dmd off the bat either, it 
 fails with PIC errors.
AFAIK this bug should have been fixed. However, IIRC 2.073.2 or 2.074 as host compiler is required.
 I'm using Trusty, and that works. But... it's a matter of time 
 before most people are on newer versions of everything and dmd 
 won't be buildable on Linux.

 Maybe add newer distros on the autotester?
Hehe, that's nearly not possible. Since a couple of months there's an ongoing effort to change the directory layout to src/ddmd, which is been blocked by necessary changes the autotester. Travis doesn't support newer distros easily as well, but e.g. CircleCi 2 does as they have native integration with Docker: https://circleci.com/blog/say-hello-to-circleci-2-0/ https://circleci.com/docs/2.0/ PRs are welcome ;-)
 Atila
Hi Seb. Travis CI commercial does work with Docker - I think we used it before and Atila would know about that. We build the builder binary image using Arch pacstrap and then run that binary container using Docker. I don't know if Travis open source allows Docker, but if not it's probably a matter of time. Laeeth.
May 10
prev sibling parent reply Laeeth Isharc <laeethnospam nospam.laeeth.com> writes:
On Wednesday, 10 May 2017 at 16:20:24 UTC, Seb wrote:
 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 I'm using Trusty, and that works. But... it's a matter of time 
 before most people are on newer versions of everything and dmd 
 won't be buildable on Linux.

 Maybe add newer distros on the autotester?
Hehe, that's nearly not possible. Since a couple of months there's an ongoing effort to change the directory layout to src/ddmd, which is been blocked by necessary changes the autotester. Travis doesn't support newer distros easily as well, but e.g. CircleCi 2 does as they have native integration with Docker:
https://docs.travis-ci.com/user/docker/ Atila can give you our Arch builder builder script if it's helpful.
May 10
parent Seb <seb wilzba.ch> writes:
On Wednesday, 10 May 2017 at 21:29:24 UTC, Laeeth Isharc wrote:
 On Wednesday, 10 May 2017 at 16:20:24 UTC, Seb wrote:
 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 I'm using Trusty, and that works. But... it's a matter of 
 time before most people are on newer versions of everything 
 and dmd won't be buildable on Linux.

 Maybe add newer distros on the autotester?
Hehe, that's nearly not possible. Since a couple of months there's an ongoing effort to change the directory layout to src/ddmd, which is been blocked by necessary changes the autotester. Travis doesn't support newer distros easily as well, but e.g. CircleCi 2 does as they have native integration with Docker:
https://docs.travis-ci.com/user/docker/ Atila can give you our Arch builder builder script if it's helpful.
Thanks a lot for the info, but unfortunately the DMD repo already overuses Travis's free contingent of five parallel jobs per organization - that's why during DConf the slides sometimes weren't deployed immediately (dconf.org belongs to the dlang organization and thus is affected by this limit). Moreover, there are already several tricks in place to reduce the time of the test suite to avoid running for more than 60 minutes and thus into termination. Sadly, this still happens from time to time for macOS. Lastly, the Dlang-Bot has to actively cancel previous builds on new pushes to keep the build queue slim. Hence, such experiments, which are very welcome, are probably better done on a different CI provider ;-)
May 10
prev sibling parent reply Joseph Rushton Wakeling <joseph.wakeling webdrake.net> writes:
On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 So I went "I know, I'll just use a container". I tried Ubuntu 
 Zesty in docker. That doesn't build dmd off the bat either, it 
 fails with PIC errors.
Have you tried adding `PIC=-fPIC` when you invoke `make`?
May 11
next sibling parent Jonathan M Davis via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Thursday, May 11, 2017 22:16:22 Joseph Rushton Wakeling via Digitalmars-d 
wrote:
 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 So I went "I know, I'll just use a container". I tried Ubuntu
 Zesty in docker. That doesn't build dmd off the bat either, it
 fails with PIC errors.
Have you tried adding `PIC=-fPIC` when you invoke `make`?
As I understand it, it's PIC=1 that you need. - Jonathan M Davis
May 11
prev sibling parent reply Atila Neves <atila.neves gmail.com> writes:
On Thursday, 11 May 2017 at 22:16:22 UTC, Joseph Rushton Wakeling 
wrote:
 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 So I went "I know, I'll just use a container". I tried Ubuntu 
 Zesty in docker. That doesn't build dmd off the bat either, it 
 fails with PIC errors.
Have you tried adding `PIC=-fPIC` when you invoke `make`?
No, I was just went "ain't nobody got time for that" and moved on.
May 12
parent Jonathan M Davis via Digitalmars-d <digitalmars-d puremagic.com> writes:
On Friday, May 12, 2017 08:49:10 Atila Neves via Digitalmars-d wrote:
 On Thursday, 11 May 2017 at 22:16:22 UTC, Joseph Rushton Wakeling

 wrote:
 On Wednesday, 10 May 2017 at 11:51:03 UTC, Atila Neves wrote:
 So I went "I know, I'll just use a container". I tried Ubuntu
 Zesty in docker. That doesn't build dmd off the bat either, it
 fails with PIC errors.
Have you tried adding `PIC=-fPIC` when you invoke `make`?
No, I was just went "ain't nobody got time for that" and moved on.
Maybe PIC is good overall thanks to the security benefits it supposedly provides (I don't know), but man has the swtich to PIC on debian-based systems been annoying. I've wasted far too much of my time dealing with it instead of just getting work done. - Jonathan M Davis
May 12