On 5/5/13 3:44 AM, Sönke Ludwig wrote:

On Sat, 04 May 2013 22:47:42 -0400, Andrew Edwards wrote:

According to the GitHub/rejectedsoftware/dub there is "Support for DMD,
GDC and LDC (common DMD flags are translated automatically)." Please
elaborate because I don't exactly understand what that means. I've to to
install LDC and use it instead of DMD but this doesn't seem to help
because after changing the second to last line of dub/build.sh to:

ldc2 -ofbin/dub -g -d-debug -w -property -Isource $* $LIBS source/app.d

I get a slew of linker errors:

(...)

My guess is this is due to ldc2 lacking automatic dependency
resolution that rdmd has.

Please confirm that this is the case or point me in the right direction
if I have missed something important regarding configuring dub to use
with LDC.

Thanks,
Andrew

Currently the support is only for building projects (using "dub --compiler=ldc2"). The dub build script is supposed to be redone to work without rdmd, though, and at that occation I'll also add support for other compilers. For now, if you have rdmd installed (AFAIK it's just a single D file that needs to be compiled), this should work:

 rdmd --compiler=ldmd --build-only -ofbin/dub -g -debug -w -property -Isource $* $LIBS source/app.d

So if I understand you correctly, I need to compile and install rdmd.
This, along with the currently installed LDC2 compiler will do the trick
once I modify dub/build.sh match above line of code.

(or maybe that's "ldmd2", not sure)

I use the command "ldc2" to invoke the LDC compiler.

I've tried this suggestion but still encountered some issues. There are
far less errors though, and these errors seem specifically related to curl:

/usr/lib/x8664-linux-gnu/libphobos2.a(curl.o): In function
`
D3std3net4curl4Curl19sharedStaticCtor28FZv':
std/net/curl.d:(.text.
D3std3net4curl4Curl19sharedStaticCtor28FZv+0xf):
undefined reference to `curl
globalinit'
/usr/lib/x86
64-linux-gnu/libphobos2.a(curl.o): In function
_D3std3net4curl4Curl19_sharedStaticDtor29FZv':<br>std/net/curl.d:(.text._D3std3net4curl4Curl19_sharedStaticDtor29FZv+0x5): <br>undefined reference to curlglobalcleanup'
/usr/lib/x8664-linux-gnu/libphobos2.a(curl1535140.o): In function
`
D3std3net4curl4HTTP4Impl6dtorMFZv':
std/net/curl.d:(.text._D3std3net4curl4HTTP4Impl6
dtorMFZv+0x19):
undefined reference to curl_slist_free_all'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1535_140.o): In function <br>D3std3net4curl4HTTP3dupMFZS3std3net4curl4HTTP':
std/net/curl.d:(.text.
D3std3net4curl4HTTP3dupMFZS3std3net4curl4HTTP+0x72):
undefined reference to curl_slist_append'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1535_140.o): In function <br>D3std3net4curl4HTTP19clearRequestHeadersMFZv':
std/net/curl.d:(.text.
D3std3net4curl4HTTP19clearRequestHeadersMFZv+0x25):
undefined reference to curl_slist_free_all'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1535_140.o): In function <br>D3std3net4curl4HTTP16addRequestHeaderMFAxaAxaZv':
std/net/curl.d:(.text.
D3std3net4curl4HTTP16addRequestHeaderMFAxaAxaZv+0x76):
undefined reference to curl_slist_append'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_153b_432.o): In function <br>D3std3net4curl4Curl10initializeMFZv':
std/net/curl.d:(.text.
D3std3net4curl4Curl10initializeMFZv+0x47):
undefined reference to curl_easy_init'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_153c_149.o): In function <br>D3std3net4curl4Curl3dupMFZS3std3net4curl4Curl':
std/net/curl.d:(.text.
D3std3net4curl4Curl3dupMFZS3std3net4curl4Curl+0x2b):
undefined reference to curl_easy_duphandle'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1540_37c.o): In function <br>D3std3net4curl4Curl8shutdownMFZv':
std/net/curl.d:(.text.
D3std3net4curl4Curl8shutdownMFZv+0x1a): undefined
reference to curl_easy_cleanup'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1542_14c.o): In function <br>D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionAxaZv':
std/net/curl.d:(.text.
D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionAxaZv+0x3d):
undefined reference to curl_easy_setopt'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1543_14c.o): In function <br>D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionlZv':
std/net/curl.d:(.text.
D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionlZv+0x2a):
undefined reference to curl_easy_setopt'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1544_14c.o): In function <br>D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionPvZv':
std/net/curl.d:(.text.
D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionPvZv+0x2a):
undefined reference to curl_easy_setopt'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1545_207.o): In function <br>D3std3net4curl4Curl5clearMFE3etc1c4curl10CurlOptionZv':
std/net/curl.d:(.text.
D3std3net4curl4Curl5clearMFE3etc1c4curl10CurlOptionZv+0x25):
undefined reference to curl_easy_setopt'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_1546_2fb.o): In function <br>D3std3net4curl4Curl7performMFbZi':
std/net/curl.d:(.text.
D3std3net4curl4Curl7performMFbZi+0x1f): undefined
reference to curl_easy_perform'<br>/usr/lib/x86_64-linux-gnu/libphobos2.a(curl_153e_4a1.o): In function <br>D3std3net4curl4Curl11errorStringMFiZAya':
std/net/curl.d:(.text.
D3std3net4curl4Curl11errorStringMFiZAya+0x11):
undefined reference to `curleasystrerror'

Thanks,
Andrew