www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Failed installation of LDC

reply LDC_Installer <c3802625 trbvn.com> writes:
Hi there, I've followed exactly the "how to install LDC" guide on 
the dlang.org download page. LLVM 3.7.1 is installed with target 
being x64. Then I've downloaded ldc and updated the submodules. 
Next step was the call to "cmake -DLIB_SUFFIX=64 .." in the build 
directory, followed by "make". This is the error message I get:

/home/username/Downloads/ldc/driver/linker.cpp: At global scope:
/home/username/Downloads/ldc/driver/linker.cpp:35:13: warning: 
‘bool endsWith(const string&, const string&)’ defined but not 
used [-Wunused-function]
  static bool endsWith(const std::string &str, const std::string 
&end) {
              ^
make[2]: *** [CMakeFiles/LDCShared.dir/driver/linker.cpp.o] 
Fehler 1
make[1]: *** [CMakeFiles/LDCShared.dir/all] Fehler 2
make: *** [all] Fehler 2

Also, I've got DMD v2.071.0 installed.
Any suggestions how to resolve this?
Jun 09 2016
parent reply LDC_Installer <c3802625 trbvn.com> writes:
On Thursday, 9 June 2016 at 23:04:07 UTC, LDC_Installer wrote:
 Hi there, I've followed exactly the "how to install LDC" guide 
 on the dlang.org download page. LLVM 3.7.1 is installed with 
 target being x64. Then I've downloaded ldc and updated the 
 submodules. Next step was the call to "cmake -DLIB_SUFFIX=64 
 .." in the build directory, followed by "make". This is the 
 error message I get:

 /home/username/Downloads/ldc/driver/linker.cpp: At global scope:
 /home/username/Downloads/ldc/driver/linker.cpp:35:13: warning: 
 ‘bool endsWith(const string&, const string&)’ defined but not 
 used [-Wunused-function]
  static bool endsWith(const std::string &str, const std::string 
 &end) {
              ^
 make[2]: *** [CMakeFiles/LDCShared.dir/driver/linker.cpp.o] 
 Fehler 1
 make[1]: *** [CMakeFiles/LDCShared.dir/all] Fehler 2
 make: *** [all] Fehler 2

 Also, I've got DMD v2.071.0 installed.
 Any suggestions how to resolve this?
Here's what I get when running make: /home/username/Downloads/ldc/driver/linker.cpp: In function ‘void {anonymous}::insertBitcodeIntoModule(const char*, llvm::Module&, llvm::LLVMContext&)’: /home/username/Downloads/ldc/driver/linker.cpp:124:17: error: no matching function for call to ‘llvm::Linker::Linker(llvm::Module&)’ llvm::Linker(M).linkInModule(std::move(loadedModule)); ^ /home/username/Downloads/ldc/driver/linker.cpp:124:17: note: candidates are: In file included from /home/username/Downloads/ldc/driver/linker.cpp:23:0: /usr/local/include/llvm/Linker/Linker.h:64:3: note: llvm::Linker::Linker(llvm::Module*) Linker(Module *M); ^ /usr/local/include/llvm/Linker/Linker.h:64:3: note: no known conversion for argument 1 from ‘llvm::Module’ to ‘llvm::Module*’ /usr/local/include/llvm/Linker/Linker.h:63:3: note: llvm::Linker::Linker(llvm::Module*, llvm::DiagnosticHandlerFunction) Linker(Module *M, DiagnosticHandlerFunction DiagnosticHandler); ^ /usr/local/include/llvm/Linker/Linker.h:63:3: note: candidate expects 2 arguments, 1 provided /usr/local/include/llvm/Linker/Linker.h:27:7: note: llvm::Linker::Linker(const llvm::Linker&) class Linker { ^ /usr/local/include/llvm/Linker/Linker.h:27:7: note: no known conversion for argument 1 from ‘llvm::Module’ to ‘const llvm::Linker&’ /home/username/Downloads/ldc/driver/linker.cpp: In function ‘void deleteExecutable()’: /home/username/Downloads/ldc/driver/linker.cpp:725:10: warning: unused variable ‘is_directory’ [-Wunused-variable] bool is_directory; ^ /home/username/Downloads/ldc/driver/linker.cpp: At global scope: /home/username/Downloads/ldc/driver/linker.cpp:35:13: warning: ‘bool endsWith(const string&, const string&)’ defined but not used [-Wunused-function] static bool endsWith(const std::string &str, const std::string &end) { ^ make[2]: *** [CMakeFiles/LDCShared.dir/driver/linker.cpp.o] Fehler 1 make[1]: *** [CMakeFiles/LDCShared.dir/all] Fehler 2 make: *** [all] Fehler 2
Jun 09 2016
parent reply Johan Engelen <j j.nl> writes:
On Thursday, 9 June 2016 at 23:08:44 UTC, LDC_Installer wrote:
 Here's what I get when running make:

 /home/username/Downloads/ldc/driver/linker.cpp: In function 
 ‘void {anonymous}::insertBitcodeIntoModule(const char*, 
 llvm::Module&, llvm::LLVMContext&)’:
 /home/username/Downloads/ldc/driver/linker.cpp:124:17: error: 
 no matching function for call to 
 ‘llvm::Linker::Linker(llvm::Module&)’
    llvm::Linker(M).linkInModule(std::move(loadedModule));
                  ^
This is my fault I think. Looks like building master is broken for LLVM < 3.8. Working on a fix. Thanks a lot for reporting! -Johan
Jun 10 2016
parent reply LDC_Installer <installer ldc.org> writes:
On Friday, 10 June 2016 at 09:18:53 UTC, Johan Engelen wrote:
 On Thursday, 9 June 2016 at 23:08:44 UTC, LDC_Installer wrote:
 Here's what I get when running make:

 /home/username/Downloads/ldc/driver/linker.cpp: In function 
 ‘void {anonymous}::insertBitcodeIntoModule(const char*, 
 llvm::Module&, llvm::LLVMContext&)’:
 /home/username/Downloads/ldc/driver/linker.cpp:124:17: error: 
 no matching function for call to 
 ‘llvm::Linker::Linker(llvm::Module&)’
    llvm::Linker(M).linkInModule(std::move(loadedModule));
                  ^
This is my fault I think. Looks like building master is broken for LLVM < 3.8. Working on a fix. Thanks a lot for reporting! -Johan
"LLVM < 3.8" Does that mean LLVM 3.8 should work properly?
Jun 10 2016
parent reply Johan Engelen <j j.nl> writes:
On Friday, 10 June 2016 at 10:06:28 UTC, LDC_Installer wrote:
 On Friday, 10 June 2016 at 09:18:53 UTC, Johan Engelen wrote:
 On Thursday, 9 June 2016 at 23:08:44 UTC, LDC_Installer wrote:
 Here's what I get when running make:

 /home/username/Downloads/ldc/driver/linker.cpp: In function 
 ‘void {anonymous}::insertBitcodeIntoModule(const char*, 
 llvm::Module&, llvm::LLVMContext&)’:
 /home/username/Downloads/ldc/driver/linker.cpp:124:17: error: 
 no matching function for call to 
 ‘llvm::Linker::Linker(llvm::Module&)’
    llvm::Linker(M).linkInModule(std::move(loadedModule));
                  ^
This is my fault I think. Looks like building master is broken for LLVM < 3.8. Working on a fix. Thanks a lot for reporting! -Johan
"LLVM < 3.8" Does that mean LLVM 3.8 should work properly?
Definitely.
Jun 10 2016
next sibling parent LDC_Installer <installer ldc.org> writes:
 Definitely.
Thanks! I'll give it a shot
Jun 10 2016
prev sibling parent reply LDC_Installer <installer ldc.org> writes:
 "LLVM < 3.8" Does that mean LLVM 3.8 should work properly?
Definitely.
It does work. I still have to reconfigure and re-run since Mint can't seem to find the ldc executable after sudo installing llvm 3.8 (according to http://llvm.org/docs/CMake.html) and sudo installing ldc (according to http://wiki.dlang.org/Building_LDC_from_source)
Jun 10 2016
parent reply Johan Engelen <j j.nl> writes:
On Friday, 10 June 2016 at 15:54:05 UTC, LDC_Installer wrote:
 "LLVM < 3.8" Does that mean LLVM 3.8 should work properly?
Definitely.
It does work. I still have to reconfigure and re-run since Mint can't seem to find the ldc executable after sudo installing llvm 3.8 (according to http://llvm.org/docs/CMake.html) and sudo installing ldc (according to http://wiki.dlang.org/Building_LDC_from_source)
I also fixed master for LLVM 3.7.
Jun 10 2016
parent reply LDC_Installer <c3848355 trbvn.com> writes:
On Friday, 10 June 2016 at 17:34:17 UTC, Johan Engelen wrote:
 On Friday, 10 June 2016 at 15:54:05 UTC, LDC_Installer wrote:
 "LLVM < 3.8" Does that mean LLVM 3.8 should work properly?
Definitely.
It does work. I still have to reconfigure and re-run since Mint can't seem to find the ldc executable after sudo installing llvm 3.8 (according to http://llvm.org/docs/CMake.html) and sudo installing ldc (according to http://wiki.dlang.org/Building_LDC_from_source)
I also fixed master for LLVM 3.7.
Good to know, but too late :D Anyway, you might want to pardon this probably silly question: How do I invoke LDC? As I mentioned before I'd installed both LLVM and LDC via sudo make install. But no command I can think of and run will trigger LDC. ldc, lldc, lld, llvm-ldc or whatever won't work.
Jun 10 2016
parent reply David Nadlinger via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On 10 Jun 2016, at 18:53, LDC_Installer via digitalmars-d-ldc wrote:
 Good to know, but too late :D
Sorry for the hassle – just in case anybody is wondering, this could only happen because our CI system is currently hamstrung by the LLVM APT repositories being temporarily offline.
 ldc, lldc, lld, llvm-ldc or whatever won't work.
The binary names are ldc2 for the "native" driver and ldmd2 for the DMD compatibility wrapper. — David
Jun 10 2016
parent LDC_Installer <c3856403 trbvn.com> writes:
On Friday, 10 June 2016 at 19:11:12 UTC, David Nadlinger wrote:
 On 10 Jun 2016, at 18:53, LDC_Installer via digitalmars-d-ldc 
 wrote:
 Good to know, but too late :D
Sorry for the hassle – just in case anybody is wondering, this could only happen because our CI system is currently hamstrung by the LLVM APT repositories being temporarily offline.
 ldc, lldc, lld, llvm-ldc or whatever won't work.
The binary names are ldc2 for the "native" driver and ldmd2 for the DMD compatibility wrapper. — David
No sweat! I got things working with LLVM 3.8.0. ldc2 and ldmd2 work like a charm and under circumstances outperform dmd by factor 5. Thanks again!
Jun 10 2016