Closed hmenke closed 6 years ago
Thanks for your interest in sol2.
Unless you plan on making a PR to have Intel's compiler automatically Continuous-Integration tested (which I don't think is possible because it costs money at the end of the day???), there's actually no reason to use CMake.
sol2 is a header-only library. There's nothing to compile to make it work (other than having Lua available to your application for it to build and link against).
The compiler error you're showing me here is an Internal Compiler Error: in short, this isn't just some screw up of sol2, but Intel's own code. I can't fix that, other than just randomly permutating the code until Intel's compiler decides it wants to play ball.
The last time I did this was for Microsoft's Visual C++. And the only reason I got away with fixing so many of them is because I knew Visual C++'s problems and how to fix them, plus I sent quite a hefty chunk of e-mails to STL who gave me tips, advice, and pointers to fix the code as well as general knowledge.
While I learned a lot, it was an absolutely terrible experience that I never want to do again: you should be filing a bug report with Intel's Compiler Team and telling them what they need to know so they can bugfix their compiler to handle compliant, standard C++ code. If Intel has a person even half as nice as Stephen T. Lavavej, you'll likely get a very quick turnaround on figuring out what you need to do or how long it'll take them to fix the bug.
There's no way I can guarantee good, working code because I cannot have 24/7 access to the compiler, and neither can the build bots: this project is open-source and MIT-licensed. I don't make money on it and I am not about to accept a bill for the Intel Compiler's internal deficiencies when in the end I'll just be paying Intel money so I can use their compiler and then send them bug reports about it to help them fix it.
Thanks to some help from people and in doing Due Diligence, I have the Intel Compiler on my machine and I did a quick complication.
I got rid of the error you see, but that's only the beginning. You see, when Intel (and most other compilers) encounter an ICE, they stop spitting them out. 'Fixing' that error only revealed a plethora more... and many of them have not a single peep on how to fix them.
With things looking like they are, I don't think I can support Intel. That is, I don't think I myself can commit to it: if you know someone more skilled with Intel's strangeness and can point them my way for help, or know who I should start talking to so I can make any sort of progress, I would love some pointers.
Otherwise, I don't really have life to waste on a poorly documented compiler that's so proprietary I can't even get good StackOverflow question/answers on their esoteric behavior.
The best part is, that says its supposed to be just a diagnostic warning... I turned down the warning level as far as I could, and it won't let me just ignore it. I don't know how to get around such things. This could be my inexperience or something else, but again I'm not sure how to help.
Thank you very much for investing your time in this issue. It is quite disappointing to hear that the Intel compiler is such a pain in the neck with modern template code. I totally agree with you that it is not worth the effort to support a compiler with so many problems. In raising this issue I had some hope that this would be a simple parser error and could be resolved by rewriting this one affected line.
Just in case you are interested, there is a script to help with installing ICC in Travis CI and perhaps you don't even need a license because the script has some sort of trial mode. https://github.com/nemequ/icc-travis
It seems that support for the Intel compiler is organized through their forums. Unfortunately I don't know of an STL equivalent at Intel. https://software.intel.com/en-us/forums/intel-c-compiler
Hi all,
for information it is quite easy to combine object files compiled with g++ to others compiled with icpc ; in my case I compiled luajit and most of my code with the intel compilers, and then compiled the only one c++ file using sol2 with g++. The I used icpc for linking all the *.o and create the executable.
I was using a hand written Makefile as it was a small project, so combining both compilers was not so painful, however I have no idea how to do this for a large project using cmake.
I hope this will be useful, and thanks for this amazing sol2 project by the way !
I would like to request support for the Intel compiler collection.
I have managed to make CMake run after commenting the line https://github.com/ThePhD/sol2/blob/6803b989d094b948aa7e4d54feffe82ca54ef476/CMakeLists.txt#L71 because CMake does not yet support Intel ICC 18.0.0. Thus I just set
-std=c++14
manually when running CMake. Because ICC fetches the default GCC standard library which is 5.4.1 on my Ubuntu 16.04 which does not fully implement C++14, I manually request GCC 7.Then I can run
make
which triggers, what I believe is a compiler bug because Google return zero results. The output ofmake VERBOSE=1
is:It would be amazing if this could be fixed.
The ICC compiler is available on https://godbolt.org/ to compile snippets or can be downloaded for students for free on https://software.intel.com/en-us/qualify-for-free-software/student