www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Error compiling LDC (again...)

reply "matovitch" <camille.brugel laposte.net> writes:
Hi,

Me again (it's been some time but it's about the same
problem)...I tried to compile LDC with the knew LLVM/clang I just
compile and stumble (not sure of the orthographe here) upon this
make error :

/home/cbrugel/Downloads/ldc/gen/dvalue.cpp:21:13: warning: ‘bool
checkVarValueType(llvm::Type*, bool)’ defined but not used
[-Wunused-function]
    static bool checkVarValueType(LLType* t, bool extraDeref)
                ^
[  9%] Building CXX object
CMakeFiles/LDCShared.dir/gen/warnings.cpp.o
[  9%] Building CXX object
CMakeFiles/LDCShared.dir/gen/typinf.cpp.o
[  9%] Building CXX object
CMakeFiles/LDCShared.dir/gen/abi-win64.cpp.o
[  9%] Building CXX object
CMakeFiles/LDCShared.dir/gen/llvmhelpers.cpp.o
/home/cbrugel/Downloads/ldc/gen/llvmhelpers.cpp: In function
‘DValue* DtoCastPtr(Loc&, DValue*, Type*)’:
/home/cbrugel/Downloads/ldc/gen/llvmhelpers.cpp:582:11: warning:
unused variable ‘fromtype’ [-Wunused-variable]
        Type* fromtype = val->getType()->toBasetype();
              ^
/home/cbrugel/Downloads/ldc/gen/llvmhelpers.cpp: In function
‘llvm::Constant* DtoConstExpInit(Loc&, Type*, Expression*)’:
/home/cbrugel/Downloads/ldc/gen/llvmhelpers.cpp:1368:28: warning:
unused variable ‘source’ [-Wunused-variable]
            llvm::IntegerType* source =
llvm::cast<llvm::IntegerType>(llType);
                               ^
/home/cbrugel/Downloads/ldc/gen/llvmhelpers.cpp: In function
‘DValue* DtoSymbolAddress(Loc&, Type*, Declaration*)’:
/home/cbrugel/Downloads/ldc/gen/llvmhelpers.cpp:1794:33: warning:
unused variable ‘t’ [-Wunused-variable]
                        llvm::Type* t =
llvm::cast<llvm::PointerType>(val->getType())->getElementType();
                                    ^
[  9%] Building CXX object
CMakeFiles/LDCShared.dir/gen/asmstmt.cpp.o
[  9%] Building CXX object
CMakeFiles/LDCShared.dir/gen/binops.cpp.o
[  9%] Building CXX object
CMakeFiles/LDCShared.dir/gen/optimizer.cpp.o
In file included from
/home/cbrugel/Downloads/ldc/gen/optimizer.cpp:12:0:
/home/cbrugel/Downloads/ldc/./gen/cl_helpers.h:32:11: error:
cannot derive from ‘final’ base ‘llvm::cl::parser<bool>’ in
derived type ‘opts::FlagParser’
        class FlagParser : public cl::parser<bool> {
              ^
CMakeFiles/LDCShared.dir/build.make:1883: recipe for target
'CMakeFiles/LDCShared.dir/gen/optimizer.cpp.o' failed
make[2]: *** [CMakeFiles/LDCShared.dir/gen/optimizer.cpp.o] Error
1
CMakeFiles/Makefile2:61: recipe for target
'CMakeFiles/LDCShared.dir/all' failed
make[1]: *** [CMakeFiles/LDCShared.dir/all] Error 2
Makefile:143: recipe for target 'all' failed
make: *** [all] Error 2

Any idea ? Anyway thanks a lot in advance for your help ! :)
Mar 15 2015
parent reply "Kai Nacke" <kai redstar.de> writes:
Hi Matovitch!

On Sunday, 15 March 2015 at 14:10:49 UTC, matovitch wrote:
 Any idea ? Anyway thanks a lot in advance for your help ! :)
You are using LLVM trunk and I have not yet fixed all errors due to refactoring in the framework. Quick fix: Comment out the FlagParser implementation and add this typedef: typedef cl::parser<bool> FlagParser; Regards, Kai
Mar 15 2015
parent reply "matovitch" <camille.brugel laposte.net> writes:
On Sunday, 15 March 2015 at 14:24:05 UTC, Kai Nacke wrote:
 Hi Matovitch!

 On Sunday, 15 March 2015 at 14:10:49 UTC, matovitch wrote:
 Any idea ? Anyway thanks a lot in advance for your help ! :)
You are using LLVM trunk and I have not yet fixed all errors due to refactoring in the framework. Quick fix: Comment out the FlagParser implementation and add this typedef: typedef cl::parser<bool> FlagParser; Regards, Kai
Hi Kai ! Thanks for your help and more generally for your work on LDC. I will probably encounter some other errors then...we'll see (...look back at his terminal...Yes ideed !). I don't know if someone would be interested by a temporary patch if ever I achive to build ldc... Regards, Matovitch
Mar 15 2015
next sibling parent "matovitch" <camille.brugel laposte.net> writes:
On Sunday, 15 March 2015 at 14:37:13 UTC, matovitch wrote:
 On Sunday, 15 March 2015 at 14:24:05 UTC, Kai Nacke wrote:
 Hi Matovitch!

 On Sunday, 15 March 2015 at 14:10:49 UTC, matovitch wrote:
 Any idea ? Anyway thanks a lot in advance for your help ! :)
You are using LLVM trunk and I have not yet fixed all errors due to refactoring in the framework. Quick fix: Comment out the FlagParser implementation and add this typedef: typedef cl::parser<bool> FlagParser; Regards, Kai
Hi Kai ! Thanks for your help and more generally for your work on LDC. I will probably encounter some other errors then...we'll see (...look back at his terminal...Yes ideed !). I don't know if someone would be interested by a temporary patch if ever I achive to build ldc... Regards, Matovitch
5 minutes later...I am clearly not brave enough neither do I know llvm (well enougth) at all. I will use the right tag and try again. As we said in France for you : Bon courage !
Mar 15 2015
prev sibling next sibling parent "Kai Nacke" <kai redstar.de> writes:
Hi Matovitch!

On Sunday, 15 March 2015 at 14:37:13 UTC, matovitch wrote:
 (...look back at his terminal...Yes ideed !). I don't know if 
 someone would be interested by a temporary patch if ever I 
 achive to build ldc...
The LDC team is always interested in pull requests! Regards, Kai
Mar 15 2015
prev sibling parent reply "Kai Nacke" <kai redstar.de> writes:
On Sunday, 15 March 2015 at 14:37:13 UTC, matovitch wrote:
 On Sunday, 15 March 2015 at 14:24:05 UTC, Kai Nacke wrote:
 Hi Matovitch!

 On Sunday, 15 March 2015 at 14:10:49 UTC, matovitch wrote:
 Any idea ? Anyway thanks a lot in advance for your help ! :)
You are using LLVM trunk and I have not yet fixed all errors due to refactoring in the framework. Quick fix: Comment out the FlagParser implementation and add this typedef: typedef cl::parser<bool> FlagParser; Regards, Kai
Hi Kai ! Thanks for your help and more generally for your work on LDC. I will probably encounter some other errors then...we'll see (...look back at his terminal...Yes ideed !). I don't know if someone would be interested by a temporary patch if ever I achive to build ldc... Regards, Matovitch
Hi Matovitch, I have fixed all compile errors with LLVM 3.7 (from Sunday morning :-) ). Maybe you want to give it a try... Regards, Kai
Mar 16 2015
parent reply "matovitch" <camille.brugel laposte.net> writes:
On Monday, 16 March 2015 at 07:00:32 UTC, Kai Nacke wrote:
 On Sunday, 15 March 2015 at 14:37:13 UTC, matovitch wrote:
 On Sunday, 15 March 2015 at 14:24:05 UTC, Kai Nacke wrote:
 Hi Matovitch!

 On Sunday, 15 March 2015 at 14:10:49 UTC, matovitch wrote:
 Any idea ? Anyway thanks a lot in advance for your help ! :)
You are using LLVM trunk and I have not yet fixed all errors due to refactoring in the framework. Quick fix: Comment out the FlagParser implementation and add this typedef: typedef cl::parser<bool> FlagParser; Regards, Kai
Hi Kai ! Thanks for your help and more generally for your work on LDC. I will probably encounter some other errors then...we'll see (...look back at his terminal...Yes ideed !). I don't know if someone would be interested by a temporary patch if ever I achive to build ldc... Regards, Matovitch
Hi Matovitch, I have fixed all compile errors with LLVM 3.7 (from Sunday morning :-) ). Maybe you want to give it a try... Regards, Kai
Hi Kai, Awesome ! I will try this evenning (in about 8 hours) and let you know (I compiled LLVM from the HEAD there is no (3.7) tags on the git mirror so I am not sure of what you mean by 3.7). Thanks for your work ! Regards, Matovitch
Mar 16 2015
parent reply Dan Olson <zans.is.for.cans yahoo.com> writes:
"matovitch" <camille.brugel laposte.net> writes:

 Awesome ! I will try this evenning (in about 8 hours) and let you know
 (I compiled LLVM from the HEAD there is no (3.7) tags on the git
 mirror so I am not sure of what you mean by 3.7). Thanks for your work
Hi matovitch. I think HEAD is called 3.7 until it is released.
Mar 16 2015
parent reply "Kai Nacke" <kai redstar.de> writes:
On Monday, 16 March 2015 at 14:12:53 UTC, Dan Olson wrote:
 "matovitch" <camille.brugel laposte.net> writes:

 Awesome ! I will try this evenning (in about 8 hours) and let 
 you know
 (I compiled LLVM from the HEAD there is no (3.7) tags on the 
 git
 mirror so I am not sure of what you mean by 3.7). Thanks for 
 your work
Hi matovitch. I think HEAD is called 3.7 until it is released.
Yes, that's true. LLVM head is the development stream for version 3.7, which will be released in autumn. The LLVM people always refactor and improve things. That's why you sometimes get compile errors when building ldc. I try to keep up with the LLVM development, but sometimes I need simply more time... I don't know why you are using LLVM head - if you only want to follow LDC development then you can/should use LLVM 3.6. (There is a tag/branch for 3.6). Regards, Kai
Mar 16 2015
next sibling parent "matovitch" <camille.brugel laposte.net> writes:
On Monday, 16 March 2015 at 17:49:45 UTC, Kai Nacke wrote:
 On Monday, 16 March 2015 at 14:12:53 UTC, Dan Olson wrote:
 "matovitch" <camille.brugel laposte.net> writes:

 Awesome ! I will try this evenning (in about 8 hours) and let 
 you know
 (I compiled LLVM from the HEAD there is no (3.7) tags on the 
 git
 mirror so I am not sure of what you mean by 3.7). Thanks for 
 your work
Hi matovitch. I think HEAD is called 3.7 until it is released.
Yes, that's true. LLVM head is the development stream for version 3.7, which will be released in autumn. The LLVM people always refactor and improve things. That's why you sometimes get compile errors when building ldc. I try to keep up with the LLVM development, but sometimes I need simply more time... I don't know why you are using LLVM head - if you only want to follow LDC development then you can/should use LLVM 3.6. (There is a tag/branch for 3.6). Regards, Kai
Hi Kai, It compiles ! Not without a fair amount of warnings though...Well I had no good reasons to use llvm HEAD. I just bought and mount my first PC and wanted to test a large compilation, then with llvm compiled I though why not trying to compile ldc with it. Now ready to code some D ! :D Thanks again for your help, Matovitch
Mar 16 2015
prev sibling next sibling parent reply "matovitch" <camille.brugel laposte.net> writes:
On Monday, 16 March 2015 at 17:49:45 UTC, Kai Nacke wrote:
 (There  is a tag/branch for 3.6).
Nope, there are absolutely no tags (even 3.6) at least on the git mirror I cloned (wich looked like the official one).
Mar 16 2015
parent "Kai Nacke" <kai redstar.de> writes:
On Monday, 16 March 2015 at 18:04:21 UTC, matovitch wrote:
 On Monday, 16 March 2015 at 17:49:45 UTC, Kai Nacke wrote:
 (There  is a tag/branch for 3.6).
Nope, there are absolutely no tags (even 3.6) at least on the git mirror I cloned (wich looked like the official one).
For some legal reason, LLVM development uses SVN. Well, everybody uses the git mirror but the source of truth is SVN. The release-36 branch contains the current LLVM 3.6 release (and maybe already some commits for 3.6.1 which is planned for April/May). Because the branch is used for the major release / dot release, the API is kept stable. You can use this branch - if it breaks something then it is a major bug which should be reported to the LLVM mailing list. (You can also download the source tar. ;-) Regards, Kai
Mar 16 2015
prev sibling parent reply "Johan Engelen" <j j.nl> writes:
On Monday, 16 March 2015 at 17:49:45 UTC, Kai Nacke wrote:
 I don't know why you are using LLVM head - if you only want to 
 follow LDC development then you can/should use LLVM 3.6. (There 
 is a tag/branch for 3.6).
I was using LLVM head too, but switching to 3.6 now. I want to work on LDC's exception handling on Win64, is there a difference between 3.6 and 3.7 in that case?
Mar 16 2015
next sibling parent "Kai Nacke" <kai redstar.de> writes:
On Monday, 16 March 2015 at 21:01:02 UTC, Johan Engelen wrote:
 On Monday, 16 March 2015 at 17:49:45 UTC, Kai Nacke wrote:
 I don't know why you are using LLVM head - if you only want to 
 follow LDC development then you can/should use LLVM 3.6. 
 (There is a tag/branch for 3.6).
I was using LLVM head too, but switching to 3.6 now. I want to work on LDC's exception handling on Win64, is there a difference between 3.6 and 3.7 in that case?
The Google guys work on implementing real Structured Exception Handling for Win64. There are already changes in 3.7 and you can expect that most of the implementation will be in 3.7. (Same is true for clang.) The current EH implementation uses the Windows runtime functions but Dwarf EH info. This is similar to the way gcc works on Win64. Regards, Kai
Mar 16 2015
prev sibling parent "Kai Nacke" <kai redstar.de> writes:
On Monday, 16 March 2015 at 21:01:02 UTC, Johan Engelen wrote:
 On Monday, 16 March 2015 at 17:49:45 UTC, Kai Nacke wrote:
 I don't know why you are using LLVM head - if you only want to 
 follow LDC development then you can/should use LLVM 3.6. 
 (There is a tag/branch for 3.6).
I was using LLVM head too, but switching to 3.6 now. I want to work on LDC's exception handling on Win64, is there a difference between 3.6 and 3.7 in that case?
E.g. see http://reviews.llvm.org/D7865 for a change between 3.6 and 3.7. Regards, Kai
Mar 17 2015