digitalmars.D.learn - Homebuilt dmd fails to link my dub application
- =?UTF-8?B?Tm9yZGzDtnc=?= (5/5) Mar 25 2018 If my homebuilt dmd fails to build my dub project with message
- rikki cattermole (2/13) Mar 25 2018 -fPIC needs to go into dmd's configuration file.
- Seb (4/9) Mar 25 2018 Are you on a 32-bit system?
- =?UTF-8?B?Tm9yZGzDtnc=?= (3/6) Mar 25 2018 No, I have my own build script for dmd, though because I can't
- Seb (18/24) Mar 25 2018 What error do you get with Digger?
- =?UTF-8?B?Tm9yZGzDtnc=?= (7/15) Mar 26 2018 How do I build a release-inline-nobounds build with ldc? I want
- Seb (17/34) Mar 26 2018 1) With LDC
- =?UTF-8?B?Tm9yZGzDtnc=?= (2/11) Mar 26 2018 Thanks!
If my homebuilt dmd fails to build my dub project with message /usr/bin/ld: error: .dub/build/application-unittest-linux.posix-x86_64-dmd_2079-C9019ECA621321CC168B385F5 D82831/knetquery.o: requires dynamic R_X86_64_32 reloc against '_D6object9Throwable7__ClassZ' which may overflow at runtime; recompile with -fPIC what have I done wrong? Where should I add the -fPIC switch?
Mar 25 2018
On 26/03/2018 1:05 AM, Nordlöw wrote:If my homebuilt dmd fails to build my dub project with message /usr/bin/ld: error: .dub/build/application-unittest-linux.posix-x86_64-dmd_2079-C9019ECA621321CC168B385F5 D82831/knetquery.o: requires dynamic R_X86_64_32 reloc against '_D6object9Throwable7__ClassZ' which may overflow at runtime; recompile with -fPIC what have I done wrong? Where should I add the -fPIC switch?-fPIC needs to go into dmd's configuration file.
Mar 25 2018
On Sunday, 25 March 2018 at 12:05:32 UTC, Nordlöw wrote:If my homebuilt dmd fails to build my dub project with message /usr/bin/ld: error: .dub/build/application-unittest-linux.posix-x86_64-dmd_2079-C9019ECA621321CC168B385F5 D82831/knetquery.o: requires dynamic R_X86_64_32 reloc against '_D6object9Throwable7__ClassZ' which may overflow at runtime; recompile with -fPIC what have I done wrong? Where should I add the -fPIC switch?Are you on a 32-bit system? (For 64-bit -fPIC is the default since 2.072.2 - though DMD's build scripts were only updated a few releases later)
Mar 25 2018
On Sunday, 25 March 2018 at 18:43:09 UTC, Seb wrote:Are you on a 32-bit system? (For 64-bit -fPIC is the default since 2.072.2 - though DMD's build scripts were only updated a few releases later)No, I have my own build script for dmd, though because I can't get Digger to work either.
Mar 25 2018
On Sunday, 25 March 2018 at 20:26:22 UTC, Nordlöw wrote:On Sunday, 25 March 2018 at 18:43:09 UTC, Seb wrote:What error do you get with Digger? Note that you the version on Dub just has been updated today: https://github.com/dlang-bots/dlang-bot/pull/194#issuecomment-375993106 For building everything locally, it should be as easy as: --- git clone https://github.com/dlang/dmd git clone https://github.com/dlang/druntime git clone https://github.com/dlang/phobos cd phobos && make -f posix.mak -j10 --- (dmd + druntime are built automatically from Phobos) I advise against rolling your own built script and reporting your issues either here, Slack or IRC. If we can reproduce your issue, chances are that someone else will run into them too ;-) BTW there's also this setup script: https://github.com/dlang/tools/blob/master/setup.shAre you on a 32-bit system? (For 64-bit -fPIC is the default since 2.072.2 - though DMD's build scripts were only updated a few releases later)No, I have my own build script for dmd, though because I can't get Digger to work either.
Mar 25 2018
On Sunday, 25 March 2018 at 20:35:01 UTC, Seb wrote:For building everything locally, it should be as easy as: --- git clone https://github.com/dlang/dmd git clone https://github.com/dlang/druntime git clone https://github.com/dlang/phobos cd phobos && make -f posix.mak -j10How do I build a release-inline-nobounds build with ldc? I want to set - DC=ldmd2, - ENABLE_RELEASE=1 when building dmd.BTW there's also this setup script: https://github.com/dlang/tools/blob/master/setup.shThanks.
Mar 26 2018
On Monday, 26 March 2018 at 10:01:38 UTC, Nordlöw wrote:On Sunday, 25 March 2018 at 20:35:01 UTC, Seb wrote:1) With LDC ------------ make -f posix.mak HOST_DMD=ldmd (or ldmd2 - depending on your distro) 2) Release mode params ----------------------- It's defined here: https://github.com/dlang/dmd/blob/master/src/posix.mak#L242 It doesn't add -noboundscheck by default. Typically the Makefiles allow passing an initial DFLAG variable, but that one doesn't seem to allow it, so I just submitted a PR to do so (https://github.com/dlang/dmd/pull/8089). With this PR you can do: make -f posix.mak HOST_DMD=ldmd ENABLE_RELEASE=1 DFLAGS="-noboundscheck" You might want to give ENABLE_LTO a try too.For building everything locally, it should be as easy as: --- git clone https://github.com/dlang/dmd git clone https://github.com/dlang/druntime git clone https://github.com/dlang/phobos cd phobos && make -f posix.mak -j10How do I build a release-inline-nobounds build with ldc? I want to set - DC=ldmd2, - ENABLE_RELEASE=1 when building dmd.BTW there's also this setup script: https://github.com/dlang/tools/blob/master/setup.shThanks.
Mar 26 2018
On Monday, 26 March 2018 at 10:57:28 UTC, Seb wrote:It doesn't add -noboundscheck by default. Typically the Makefiles allow passing an initial DFLAG variable, but that one doesn't seem to allow it, so I just submitted a PR to do so (https://github.com/dlang/dmd/pull/8089). With this PR you can do: make -f posix.mak HOST_DMD=ldmd ENABLE_RELEASE=1 DFLAGS="-noboundscheck" You might want to give ENABLE_LTO a try too.Thanks!
Mar 26 2018