www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LDC2 doesn't work on archlinux.

reply "Robin" <robbepop web.de> writes:
Hiho,

a friend and me were trying to get the LDC2 compiler working on 
archlinux to compare benchmarks of the DMD and the LDC. The DMD 
compiler works, while the LDC2 compiler raises a certain error 
during compilation and stops:

Error: cannot find source code for runtime library file 'object.d'
        ldc2 might not be correctly installed.
        Please check your ldc2.conf configuration file.
        Installation instructions can be found at 
http://wiki.dlang.org/LDC.
import path[0] = /usr/include/dlang/ldc/ldc
import path[1] = /usr/include/dlang/ldc

Of course, we have reinstalled everything again, 
libphobos(-devel), ldc2, etc. and were looking into the conf file 
and also looked into the wiki about LDC, however, we were not 
able to get this working.

The errors pops up after the syntax checking phase and general 
parsing phase is over.

Is this a known bug, is the package broken or are we missing 
something?

Thanks in advance!

Robin
Feb 19 2014
next sibling parent "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Wednesday, 19 February 2014 at 16:59:36 UTC, Robin wrote:
 Hiho,

 a friend and me were trying to get the LDC2 compiler working on 
 archlinux to compare benchmarks of the DMD and the LDC. The DMD 
 compiler works, while the LDC2 compiler raises a certain error 
 during compilation and stops:

 Error: cannot find source code for runtime library file 
 'object.d'
        ldc2 might not be correctly installed.
        Please check your ldc2.conf configuration file.
        Installation instructions can be found at 
 http://wiki.dlang.org/LDC.
 import path[0] = /usr/include/dlang/ldc/ldc
 import path[1] = /usr/include/dlang/ldc

 Of course, we have reinstalled everything again, 
 libphobos(-devel), ldc2, etc. and were looking into the conf 
 file and also looked into the wiki about LDC, however, we were 
 not able to get this working.

 The errors pops up after the syntax checking phase and general 
 parsing phase is over.

 Is this a known bug, is the package broken or are we missing 
 something?

 Thanks in advance!

 Robin
Robin, simply check whether you have druntime/phobos in those import paths.
Feb 19 2014
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Wednesday, 19 February 2014 at 16:59:36 UTC, Robin wrote:
 Hiho,

 a friend and me were trying to get the LDC2 compiler working on 
 archlinux to compare benchmarks of the DMD and the LDC. The DMD 
 compiler works, while the LDC2 compiler raises a certain error 
 during compilation and stops:

 Error: cannot find source code for runtime library file 
 'object.d'
        ldc2 might not be correctly installed.
        Please check your ldc2.conf configuration file.
        Installation instructions can be found at 
 http://wiki.dlang.org/LDC.
 import path[0] = /usr/include/dlang/ldc/ldc
 import path[1] = /usr/include/dlang/ldc

 Of course, we have reinstalled everything again, 
 libphobos(-devel), ldc2, etc. and were looking into the conf 
 file and also looked into the wiki about LDC, however, we were 
 not able to get this working.

 The errors pops up after the syntax checking phase and general 
 parsing phase is over.

 Is this a known bug, is the package broken or are we missing 
 something?

 Thanks in advance!

 Robin
pacman -S liblphobos-devel
Feb 19 2014
prev sibling next sibling parent "Dicebot" <public dicebot.lv> writes:
Please use `pacman -Sy dlang-ldc` to install all necessary 
packages for typical ldc development.
Feb 19 2014
prev sibling parent reply "John Colvin" <john.loughran.colvin gmail.com> writes:
On Wednesday, 19 February 2014 at 16:59:36 UTC, Robin wrote:
 Hiho,

 a friend and me were trying to get the LDC2 compiler working on 
 archlinux to compare benchmarks of the DMD and the LDC. The DMD 
 compiler works, while the LDC2 compiler raises a certain error 
 during compilation and stops:

 Error: cannot find source code for runtime library file 
 'object.d'
        ldc2 might not be correctly installed.
        Please check your ldc2.conf configuration file.
        Installation instructions can be found at 
 http://wiki.dlang.org/LDC.
 import path[0] = /usr/include/dlang/ldc/ldc
 import path[1] = /usr/include/dlang/ldc

 Of course, we have reinstalled everything again, 
 libphobos(-devel), ldc2, etc. and were looking into the conf 
 file and also looked into the wiki about LDC, however, we were 
 not able to get this working.

 The errors pops up after the syntax checking phase and general 
 parsing phase is over.

 Is this a known bug, is the package broken or are we missing 
 something?

 Thanks in advance!

 Robin
You need different standard libraries for each compiler: e.g. liblphobos (ldc), libgphobos (gdc), libphobos (dmd) As Dicebot says (and he should know, seeing as he maintains those packages), dlang-ldc will get you everything you need for ldc
Feb 20 2014
parent "Robin" <robbepop web.de> writes:
Hiho,

thank you all for your answers.
Didn't know about the different libraries as well as the very 
nice dlang-ldc command.

Everything works now! =)

Robbepop
Feb 21 2014