Re: [cmake-developers] Weird build error against libc++ on OS X 10.7 (cutting at 1024 characters)
On Tue, Jun 24, 2014 at 15:23:32 -0400, Brad King wrote: > If that actually worked on all old stream libraries then we would > not need GetLineFromStream. Also GetLineFromStream has a separate > output argument for indicating whether the line ended in a newline. The newline parameter isn't hard to reproduce (just use istr.eof() right after the getline() succeeds), but the sizeLimit parameter is harder :( . We could hack it up with a custom max_size() method on a custom std::basic_string subclass, but that sounds awful. > Yes, please try this. Mojca, how did you bootstrap cmake to use libc++ and clang? CXX="clang++ -stdlib=libc++"? I probably won't get to it until Thursday though. --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Weird build error against libc++ on OS X 10.7 (cutting at 1024 characters)
On 06/24/2014 03:09 PM, Ben Boeckel wrote: > The proper way to read lines from a file using iostream is: > > std::string line; > while (std::getline(istr, line)) { > // use line > } If that actually worked on all old stream libraries then we would not need GetLineFromStream. Also GetLineFromStream has a separate output argument for indicating whether the line ended in a newline. > Unfortunately, it looks like there's unavoidable extra logic in there. > Maybe we could do: > > #ifdef BROKEN_STREAMS > // crutch code > #else > // sanity > #endif Yes, please try this. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Weird build error against libc++ on OS X 10.7 (cutting at 1024 characters)
On Tue, Jun 24, 2014 at 14:21:37 -0400, Brad King wrote: > On 06/24/2014 08:31 AM, Mojca Miklavec wrote: > > /path/to/cmake-3.0.0/Bootstrap.cmk/cmake -E cmake_link_script > > CMakeFiles/CMakeLib.dir/link.txt --verbose=1 > > > > isn't outputting the whole command, but cutting it in the middle instead. > > The lines are read here: > > http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmcmd.cxx;hb=v3.0.0#l988 > > using the GetLineFromStream helper: > > > http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/SystemTools.cxx;hb=v3.0.0#l4157 > > Note the buffer size is 1024. Something must go wrong with the > stream state to make it look like EOL or EOF to this code. The proper way to read lines from a file using iostream is: std::string line; while (std::getline(istr, line)) { // use line } Unfortunately, it looks like there's unavoidable extra logic in there. Maybe we could do: #ifdef BROKEN_STREAMS // crutch code #else // sanity #endif --Ben -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Weird build error against libc++ on OS X 10.7 (cutting at 1024 characters)
On 06/24/2014 08:31 AM, Mojca Miklavec wrote: > /path/to/cmake-3.0.0/Bootstrap.cmk/cmake -E cmake_link_script > CMakeFiles/CMakeLib.dir/link.txt --verbose=1 > > isn't outputting the whole command, but cutting it in the middle instead. The lines are read here: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmcmd.cxx;hb=v3.0.0#l988 using the GetLineFromStream helper: http://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/kwsys/SystemTools.cxx;hb=v3.0.0#l4157 Note the buffer size is 1024. Something must go wrong with the stream state to make it look like EOL or EOF to this code. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] Weird build error against libc++ on OS X 10.7 (cutting at 1024 characters)
Dear CMake developers, I tried to compile CMake against libc++ on OS X 10.7. For a weird reason it fails: Built target cmsysTestsC [ 25%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_scale.c.o [ 25%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/IOStream.cxx.o [ 25%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_sub.c.o [ 25%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_user.c.o [ 26%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/frm_win.c.o [ 26%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_alnum.c.o [ 26%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_alpha.c.o [ 27%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_enum.c.o [ 27%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_int.c.o [ 27%] [ 27%] Building CXX object Source/kwsys/CMakeFiles/cmsys.dir/SystemInformation.cxx.o Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_ipv4.c.o [ 28%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_num.c.o [ 28%] Building C object Source/CursesDialog/form/CMakeFiles/cmForm.dir/fty_regex.c.o Linking C static library libcmForm.a ar: C: No such file or directory make[2]: *** [Source/CursesDialog/form/libcmForm.a] Error 1 make[2]: Leaving directory `/path/to/cmake-3.0.0' make[1]: *** [Source/CursesDialog/form/CMakeFiles/cmForm.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs Linking CXX static library libcmsys.a make[2]: Leaving directory `/path/to/cmake-3.0.0' [ 28%] Built target cmsys make[1]: Leaving directory `/path/to/cmake-3.0.0' make: *** [all] Error 2 When I use "make" again and a single core, it fails with [ 66%] Building CXX object Source/CMakeFiles/CMakeLib.dir/cmNinjaUtilityTargetGenerator.cxx.o cd /path/to/cmake-3.0.0/Source && /usr/bin/clang++ -DCMAKE_BUILD_WITH_CMAKE -pipe -Os -arch x86_64 -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -I/path/to/cmake-3.0.0/Utilities -I/path/to/cmake-3.0.0/Source -I/opt/libcxxlocal/include -I/path/to/cmake-3.0.0/Utilities/cmcompress -I/path/to/cmake-3.0.0/Source/CTest -I/path/to/cmake-3.0.0/Source/CursesDialog/form-o CMakeFiles/CMakeLib.dir/cmNinjaUtilityTargetGenerator.cxx.o -c /path/to/cmake-3.0.0/Source/cmNinjaUtilityTargetGenerator.cxx Linking CXX static library libCMakeLib.a cd /path/to/cmake-3.0.0/Source && /path/to/cmake-3.0.0/Bootstrap.cmk/cmake -P CMakeFiles/CMakeLib.dir/cmake_clean_target.cmake cd /path/to/cmake-3.0.0/Source && /path/to/cmake-3.0.0/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/CMakeLib.dir/link.txt --verbose=1 /usr/bin/ar cr libCMakeLib.a CMakeFiles/CMakeLib.dir/cmStandardIncludes.cxx.o CMakeFiles/CMakeLib.dir/cmArchiveWrite.cxx.o CMakeFiles/CMakeLib.dir/cmBootstrapCommands1.cxx.o CMakeFiles/CMakeLib.dir/cmBootstrapCommands2.cxx.o CMakeFiles/CMakeLib.dir/cmCacheManager.cxx.o CMakeFiles/CMakeLib.dir/cmCommands.cxx.o CMakeFiles/CMakeLib.dir/cmCommandArgumentLexer.cxx.o CMakeFiles/CMakeLib.dir/cmCommandArgumentParser.cxx.o CMakeFiles/CMakeLib.dir/cmCommandArgumentParserHelper.cxx.o CMakeFiles/CMakeLib.dir/cmComputeComponentGraph.cxx.o CMakeFiles/CMakeLib.dir/cmComputeLinkDepends.cxx.o CMakeFiles/CMakeLib.dir/cmComputeLinkInformation.cxx.o CMakeFiles/CMakeLib.dir/cmComputeTargetDepends.cxx.o CMakeFiles/CMakeLib.dir/cmCryptoHash.cxx.o CMakeFiles/CMakeLib.dir/cmCustomCommand.cxx.o CMakeFiles/CMakeLib.dir/cmCustomCommandGenerator.cxx.o CMakeFiles/CMakeLib.dir/cmDefinitions.cxx.o CMakeFiles/CMakeLib.dir/cmDepends.cxx.o CMakeFiles/CMakeLib.dir/cmDependsC.cxx.o CMakeFiles/CMakeLib.dir/cmDependsFortran.cxx.o CMakeFiles/CMak ar: CMakeFiles/CMak: No such file or directory make[2]: *** [Source/libCMakeLib.a] Error 1 make[1]: *** [Source/CMakeFiles/CMakeLib.dir/all] Error 2 make: *** [all] Error 2 The weird part is that part of the command is simply "cut off": CMakeFiles/CMakeLib.dir/cmDependsFortran.cxx.o CMakeFiles/CMak I looked into Source/CMakeFiles/CMakeLib.dir/link.txt. The first line in that file contains 5356 characters, but the line gets cut off at exactly 1024 when printed on the screen and fails with ar: CMakeFiles/CMak: No such file or directory For some reason the command /path/to/cmake-3.0.0/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/CMakeLib.dir/link.txt --verbose=1 isn't outputting the whole command, but cutting it in the middle instead. If I execute that command from link.txt manually, it works ok and the build continues. It then fails again with cd /path/to/cmake-3.0.0/Source && /path/to/cmake-3.0.0/Bootstrap.cmk/cmake -E cmake_link_script CMakeFiles/ccmake.dir/link.txt --verbose=1 /usr/bin/clang++ -pipe -Os -arch x86_64 -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-m