On 2017-10-05 18:06+0200 Alaric Senat wrote: [...]
Today I also had another issue while attempting to specify an Osx version of clang to cmake, it failed to compile a test C program whith the osx clang version whereas I can compile mannually my own C files with it. You can find the CmakeError.log in attachment. It seems that the ar comand fail but I don't really get why and all the files in CmakeTmp are destroyed after the execution of Cmake. So have you an idea about where I can find this compilation test to try it manually to find out what's wrong ?
Hi Alaric: I have changed the subject line to something more appropriate for this topic. Also, I don't mind answering occasional general cmake questions like this one on the plplot-general mailing list for the benefit of PLplot users, but a better place to ask such general CMake questions is the cmake mailing list which is typically quite helpful and which naturally brings to the attention of the CMake developers any CMake bug you might have found. To track down such trycompile issues like you have described I suggest you use the latest CMake version (which is 3.9.4) (in case the trycompile issue you have discovered is due to a CMake bug that has been fixed in that latest version). Also, you should use the simplest possible CMake project which illustrates the trycompile issue, e.g., a source directory containing just the following CMakeLists.txt file: cmake_minimum_required(VERSION 3.9.4 FATAL_ERROR) project(test_c_compiler C) I haven't tried that simple project myself, but this project should attempt a trycompile for your C compiler and that is about all. You should be able to test that the above two-lines of CMake logic works in general by simply trying the gcc compiler. And if that test succeeds. then trying it with the clang compiler will likely fail according to the information you have supplied above. Once, you have gone through all of that (gcc success + clang failure for such a simple project), then you can debug that clang failure by using, e.g., the cmake option --debug-trycompile. That option is only useful for one trycompile at a time, but that is exactly what is done in the above simple project. Assuming this advice lets you see the exact issue, I cannot help you further with that exact issue (I have no experience with clang or Mac OS X), but those on the cmake mailing list probably can help especially when you are presenting them with such a simple test case that demonstrates the issue. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general