pavelliavonau / cmakeconverter

This project aims to facilitate the conversion of Visual Studio to CMake projects.
GNU Affero General Public License v3.0
858 stars 109 forks source link

Different crashes at custom(manually edited) vcxproj files. #115

Open Randrianasulu opened 4 years ago

Randrianasulu commented 4 years ago

I was trying to convert project from https://github.com/subelf/Spp2Pgs, but cmake-converter failed

To Reproduce Installed newest version of cmake-converter: root@slax:/home/guest/botva/src/src/cmakeconverter# pip3 install . Processing /home/guest/botva/src/src/cmakeconverter Requirement already satisfied: lxml in /usr/lib/python3.7/site-packages (from cmake-converter==2.0.1) (4.5.2) Requirement already satisfied: colorama in /usr/lib/python3.7/site-packages (from cmake-converter==2.0.1) (0.4.3) Could not build wheels for cmake-converter, since package 'wheel' is not installed. Could not build wheels for lxml, since package 'wheel' is not installed. Could not build wheels for colorama, since package 'wheel' is not installed. Installing collected packages: cmake-converter Attempting uninstall: cmake-converter Found existing installation: cmake-converter 2.0.1 Uninstalling cmake-converter-2.0.1: Successfully uninstalled cmake-converter-2.0.1 Running setup.py install for cmake-converter ... done Successfully installed cmake-converter-2.0.1

[it still says 2.0.1, even if default branch after git clone was 'develop']

After this I tried to run converter on cloned Spp2Pgs project: LANG=C cmake-converter -ias -s Spp2Pgs.sln 0.000051 processes count = 4 0.000108 warnings level = 2 0.000119 absent source files will be ignored 0.021095 1> Conversion started: Project libspp2pgs 0.022370 2> Conversion started: Project Spp2Pgs 0.022459 3> Conversion started: Project Spp2PgsNet 0.028231 4> Conversion started: Project xy-VSSppf multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, *kwds)) File "/usr/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 269, in run_conversion target_data['subdirectory'], File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 235, in convert_project self.collect_data(context) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 53, in collect_data context.parser.parse(context) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 145, in parse self._parse_nodes(context, root) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 82, in _parse_nodes self._parse_attributes(context, child_node) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 109, in _parse_attributes attributes_handlers[attr](context, attr, node.get(attr), node) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 291, in __parse_condition cmake_setting = make_cmake_configuration(context, found.group(1)) File "/usr/lib/python3.7/site-packages/cmake_converter/utils.py", line 501, in make_cmake_configuration return "{}|{}".format(*sln_conf_arch) IndexError: tuple index out of range """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/bin/cmake-converter", line 11, in load_entry_point('cmake-converter==2.0.1', 'console_scripts', 'cmake-converter')() File "/usr/lib/python3.7/site-packages/cmake_converter/main.py", line 144, in main converter.convert_solution(project_context, os.path.abspath(args.solution)) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/solution.py", line 331, in convert_solution results = self.do_conversion(project_context, input_data_for_converter) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 298, in do_conversion results = pool.map(self.run_conversion, input_converter_data_list) File "/usr/lib/python3.7/multiprocessing/pool.py", line 268, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/usr/lib/python3.7/multiprocessing/pool.py", line 657, in get raise self._value IndexError: tuple index out of range

Expected behavior Successfull conversion, so I can hack on Cmakefiles :}

Additional context I'm on Slackware Linux, x86-32

pavelliavonau commented 4 years ago

Hi @Randrianasulu , what about verbose output?

Randrianasulu commented 4 years ago

Triple sorry!

LANG=C cmake-converter -v -ias -s Spp2Pgs.sln 0.000061 Converter runs in verbose mode 0.000128 processes count = 4 0.000150 warnings level = 2 0.000164 absent source files will be ignored 0.000213 INFO : ------- Started parsing solution /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln ------- 0.000814 INFO : Version of solution is 12.00 0.000837 INFO : Start parsing projects info (Project .. EndProject) 0.001849 INFO : Found project "libspp2pgs/libspp2pgs.vcxproj" with {821D4850-3AA7-4D9C-50EB-5E7CB22A3A3E} 0.001897 INFO : Found project "Spp2Pgs/Spp2Pgs.vcxproj" with {E2B13697-7E59-4689-B773-95EB4C5A7915} 0.002805 INFO : Found project "Spp2PgsNet/Spp2PgsNet.vcxproj" with {ED161A43-6432-4F8D-9D2B-C4AC8AA8CC49} 0.002872 INFO : Found project "misc/xy-VSFilter/xy-VSSppf/xy-VSSppf.vcxproj" with {ACFCDF3E-2B0F-43C8-AB12-1E1A68EA3D99} 0.002911 INFO : Start parsing GlobalSection(SolutionConfigurationPlatforms) = preSolution 0.004121 INFO : Found sln setting "Debug|Win32" 0.004155 INFO : Found sln setting "Debug|x64" 0.004185 INFO : Found sln setting "Release|Win32" 0.004212 INFO : Found sln setting "Release|x64" 0.004242 INFO : Found sln setting "ReleaseClr|Win32" 0.004267 INFO : Found sln setting "ReleaseClr|x64" 0.004284 INFO : Start parsing GlobalSection(ProjectConfigurationPlatforms) = postSolution (Mapping sln-setting -> project-settong) 0.005936 INFO : "Debug|Win32" -> "Debug|Win32" for libspp2pgs 0.005981 INFO : "Debug|x64" -> "Debug|x64" for libspp2pgs 0.006018 INFO : "Release|Win32" -> "Release|Win32" for libspp2pgs 0.006053 INFO : "Release|x64" -> "Release|x64" for libspp2pgs 0.006093 INFO : "ReleaseClr|Win32" -> "ReleaseClr|Win32" for libspp2pgs 0.006132 INFO : "ReleaseClr|x64" -> "ReleaseClr|x64" for libspp2pgs 0.006169 INFO : "Debug|Win32" -> "Debug|Win32" for Spp2Pgs 0.006204 INFO : "Debug|x64" -> "Debug|x64" for Spp2Pgs 0.006240 INFO : "Release|Win32" -> "Release|Win32" for Spp2Pgs 0.006278 INFO : "Release|x64" -> "Release|x64" for Spp2Pgs 0.006316 INFO : "ReleaseClr|Win32" -> "Release|Win32" for Spp2Pgs 0.006351 INFO : "ReleaseClr|x64" -> "Release|x64" for Spp2Pgs 0.006389 INFO : "Debug|Win32" -> "Debug|Win32" for Spp2PgsNet 0.006440 INFO : "Debug|x64" -> "Debug|x64" for Spp2PgsNet 0.006489 INFO : "Release|Win32" -> "ReleaseClr|Win32" for Spp2PgsNet 0.006534 INFO : "Release|x64" -> "ReleaseClr|x64" for Spp2PgsNet 0.006580 INFO : "ReleaseClr|Win32" -> "ReleaseClr|Win32" for Spp2PgsNet 0.006632 INFO : "ReleaseClr|x64" -> "ReleaseClr|x64" for Spp2PgsNet 0.006687 INFO : "Debug|Win32" -> "Debug|Win32" for xy-VSSppf 0.006748 INFO : "Debug|x64" -> "Debug|x64" for xy-VSSppf 0.006806 INFO : "Release|Win32" -> "Release|Win32" for xy-VSSppf 0.006857 INFO : "Release|x64" -> "Release|x64" for xy-VSSppf 0.006907 INFO : "ReleaseClr|Win32" -> "Release|Win32" for xy-VSSppf 0.006954 INFO : "ReleaseClr|x64" -> "Release|x64" for xy-VSSppf 0.007843 INFO : ------ Finished parsing solution /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln ------- 0.021668 1> INFO : ------ Starting 1 ------- 0.021778 1> INFO : Initialization data for conversion of project /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln 0.022207 1> INFO : == start making default flags == 0.022410 1> INFO : == end making default flags == 0.022432 1> Conversion started: Project libspp2pgs 0.022456 1> INFO : Collecting data for project /home/guest/botva/src/src/Spp2Pgs/libspp2pgs/libspp2pgs.vcxproj 0.024834 2> INFO : ------ Starting 2 ------- 0.024937 2> INFO : Initialization data for conversion of project /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln 0.025443 2> INFO : == start making default flags == 0.025665 2> INFO : == end making default flags == 0.025683 2> Conversion started: Project Spp2Pgs 0.025711 2> INFO : Collecting data for project /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs/Spp2Pgs.vcxproj 0.046370 3> INFO : ------ Starting 3 ------- 0.047756 3> INFO : Initialization data for conversion of project /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln 0.047547 4> INFO : ------ Starting 4 ------- 0.048532 4> INFO : Initialization data for conversion of project /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln 0.049035 4> INFO : == start making default flags == 0.049351 4> INFO : == end making default flags == 0.049474 4> Conversion started: Project xy-VSSppf 0.049614 4> INFO : Collecting data for project /home/guest/botva/src/src/Spp2Pgs/misc/xy-VSFilter/xy-VSSppf/xy-VSSppf.vcxproj 0.052156 3> INFO : == start making default flags == 0.052573 3> INFO : == end making default flags == 0.052734 3> Conversion started: Project Spp2PgsNet 0.052862 3> INFO : Collecting data for project /home/guest/botva/src/src/Spp2Pgs/Spp2PgsNet/Spp2PgsNet.vcxproj 0.179568 3> INFO : cmake from property sheet: ../misc/PreToolset.cmake 0.180157 3> INFO : Unicode Definitions : ['UNICODE', '_UNICODE'] 0.187680 4> INFO : Project name is "xy-VSSppf" 0.232131 4> INFO : cmake from property sheet: ../../PreToolset.cmake 0.234042 4> INFO : Unicode Definitions : ['UNICODE', '_UNICODE'] 0.338688 2> INFO : Added reference : libspp2pgs 0.354462 2> INFO : cmake from property sheet: ../misc/PreToolset.cmake 0.354853 2> INFO : Unicode Definitions : ['UNICODE', '_UNICODE'] multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, *kwds)) File "/usr/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 269, in run_conversion target_data['subdirectory'], File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 235, in convert_project self.collect_data(context) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 53, in collect_data context.parser.parse(context) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 145, in parse self._parse_nodes(context, root) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 82, in _parse_nodes self._parse_attributes(context, child_node) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 109, in _parse_attributes attributes_handlers[attr](context, attr, node.get(attr), node) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 291, in __parse_condition cmake_setting = make_cmake_configuration(context, found.group(1)) File "/usr/lib/python3.7/site-packages/cmake_converter/utils.py", line 501, in make_cmake_configuration return "{}|{}".format(*sln_conf_arch) IndexError: tuple index out of range """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/bin/cmake-converter", line 11, in load_entry_point('cmake-converter==2.0.1', 'console_scripts', 'cmake-converter')() File "/usr/lib/python3.7/site-packages/cmake_converter/main.py", line 144, in main converter.convert_solution(project_context, os.path.abspath(args.solution)) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/solution.py", line 331, in convert_solution results = self.do_conversion(project_context, input_data_for_converter) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 298, in do_conversion results = pool.map(self.run_conversion, input_converter_data_list) File "/usr/lib/python3.7/multiprocessing/pool.py", line 268, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/usr/lib/python3.7/multiprocessing/pool.py", line 657, in get raise self._value IndexError: tuple index out of range

is this enough?

pavelliavonau commented 4 years ago

could you, please, run with single thread(-j 1) and post the log again?

Randrianasulu commented 4 years ago

guest@slax:~/botva/src/src/Spp2Pgs$ LANG=C cmake-converter -j 1 -v -ias -s Spp2Pgs.sln 0.000049 Converter runs in verbose mode 0.000102 processes count = 1 0.000118 warnings level = 2 0.000132 absent source files will be ignored 0.000170 INFO : ------- Started parsing solution /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln ------- 0.000605 INFO : Version of solution is 12.00 0.000623 INFO : Start parsing projects info (Project .. EndProject) 0.001373 INFO : Found project "libspp2pgs/libspp2pgs.vcxproj" with {821D4850-3AA7-4D9C-50EB-5E7CB22A3A3E} 0.001412 INFO : Found project "Spp2Pgs/Spp2Pgs.vcxproj" with {E2B13697-7E59-4689-B773-95EB4C5A7915} 0.002108 INFO : Found project "Spp2PgsNet/Spp2PgsNet.vcxproj" with {ED161A43-6432-4F8D-9D2B-C4AC8AA8CC49} 0.002162 INFO : Found project "misc/xy-VSFilter/xy-VSSppf/xy-VSSppf.vcxproj" with {ACFCDF3E-2B0F-43C8-AB12-1E1A68EA3D99} 0.002189 INFO : Start parsing GlobalSection(SolutionConfigurationPlatforms) = preSolution 0.003100 INFO : Found sln setting "Debug|Win32" 0.003137 INFO : Found sln setting "Debug|x64" 0.003156 INFO : Found sln setting "Release|Win32" 0.003183 INFO : Found sln setting "Release|x64" 0.003219 INFO : Found sln setting "ReleaseClr|Win32" 0.003242 INFO : Found sln setting "ReleaseClr|x64" 0.003258 INFO : Start parsing GlobalSection(ProjectConfigurationPlatforms) = postSolution (Mapping sln-setting -> project-settong) 0.004553 INFO : "Debug|Win32" -> "Debug|Win32" for libspp2pgs 0.004597 INFO : "Debug|x64" -> "Debug|x64" for libspp2pgs 0.004632 INFO : "Release|Win32" -> "Release|Win32" for libspp2pgs 0.004664 INFO : "Release|x64" -> "Release|x64" for libspp2pgs 0.004695 INFO : "ReleaseClr|Win32" -> "ReleaseClr|Win32" for libspp2pgs 0.004724 INFO : "ReleaseClr|x64" -> "ReleaseClr|x64" for libspp2pgs 0.004753 INFO : "Debug|Win32" -> "Debug|Win32" for Spp2Pgs 0.004780 INFO : "Debug|x64" -> "Debug|x64" for Spp2Pgs 0.004808 INFO : "Release|Win32" -> "Release|Win32" for Spp2Pgs 0.004835 INFO : "Release|x64" -> "Release|x64" for Spp2Pgs 0.004863 INFO : "ReleaseClr|Win32" -> "Release|Win32" for Spp2Pgs 0.004890 INFO : "ReleaseClr|x64" -> "Release|x64" for Spp2Pgs 0.004924 INFO : "Debug|Win32" -> "Debug|Win32" for Spp2PgsNet 0.004953 INFO : "Debug|x64" -> "Debug|x64" for Spp2PgsNet 0.004982 INFO : "Release|Win32" -> "ReleaseClr|Win32" for Spp2PgsNet 0.005010 INFO : "Release|x64" -> "ReleaseClr|x64" for Spp2PgsNet 0.005038 INFO : "ReleaseClr|Win32" -> "ReleaseClr|Win32" for Spp2PgsNet 0.005065 INFO : "ReleaseClr|x64" -> "ReleaseClr|x64" for Spp2PgsNet 0.005093 INFO : "Debug|Win32" -> "Debug|Win32" for xy-VSSppf 0.005120 INFO : "Debug|x64" -> "Debug|x64" for xy-VSSppf 0.005149 INFO : "Release|Win32" -> "Release|Win32" for xy-VSSppf 0.005177 INFO : "Release|x64" -> "Release|x64" for xy-VSSppf 0.005205 INFO : "ReleaseClr|Win32" -> "Release|Win32" for xy-VSSppf 0.005233 INFO : "ReleaseClr|x64" -> "Release|x64" for xy-VSSppf 0.005886 INFO : ------ Finished parsing solution /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln ------- 0.007076 1> INFO : ------ Starting 1 ------- 0.007099 1> INFO : Initialization data for conversion of project /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln 0.007301 1> INFO : == start making default flags == 0.007444 1> INFO : == end making default flags == 0.007464 1> Conversion started: Project libspp2pgs 0.007480 1> INFO : Collecting data for project /home/guest/botva/src/src/Spp2Pgs/libspp2pgs/libspp2pgs.vcxproj Traceback (most recent call last): File "/usr/bin/cmake-converter", line 11, in load_entry_point('cmake-converter==2.0.1', 'console_scripts', 'cmake-converter')() File "/usr/lib/python3.7/site-packages/cmake_converter/main.py", line 144, in main converter.convert_solution(project_context, os.path.abspath(args.solution)) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/solution.py", line 331, in convert_solution results = self.do_conversion(project_context, input_data_for_converter) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 301, in do_conversion results.append(self.run_conversion(data_for_converter)) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 269, in run_conversion target_data['subdirectory'], File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 235, in convert_project self.collect_data(context) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 53, in collect_data context.parser.parse(context) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 145, in parse self._parse_nodes(context, root) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 91, in _parse_nodes node_handlers[child_node_tag](context, child_node) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 154, in parse_item_group self._parse_nodes(context, node) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 82, in _parse_nodes self._parse_attributes(context, child_node) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 107, in _parse_attributes attributes_handlers[node_key](context, node_key, node.get(attr), node) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 213, in parse_cl_compile_include_attr self.__parse_file_nodes(context, context.sources, cl_node, 'Sources') File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 241, in parse_file_nodes self._parse_nodes(file_context, file_node) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 82, in _parse_nodes self._parse_attributes(context, child_node) File "/usr/lib/python3.7/site-packages/cmake_converter/parser.py", line 109, in _parse_attributes attributes_handlers[attr](context, attr, node.get(attr), node) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 291, in parse_condition cmake_setting = make_cmake_configuration(context, found.group(1)) File "/usr/lib/python3.7/site-packages/cmake_converter/utils.py", line 501, in make_cmake_configuration return "{}|{}".format(*sln_conf_arch) IndexError: tuple index out of range

pavelliavonau commented 4 years ago

Your libspp2pgs.vcxproj Contains Condition="'$(Configuration)'=='Release'" This doesn't supported with converter. Only pairs configuration|platform could be parsed fine.

And your vcxproj look too custom. Have you created it only with vs UI? If haven't I can't help you because I'm not going to support full msbuild syntax. You should investigate and change your vcxproj files by yourself in this case.

Randrianasulu commented 4 years ago

Well, this is not my project, I just tried to see if there was 'easy' way to build it on Linux. But thanks anyway ..

Randrianasulu commented 4 years ago

So, I deleted few lines in vcproj file:

diff --git a/libspp2pgs/libspp2pgs.vcxproj b/libspp2pgs/libspp2pgs.vcxproj index 1b8c4d7..f8648e3 100644 --- a/libspp2pgs/libspp2pgs.vcxproj +++ b/libspp2pgs/libspp2pgs.vcxproj @@ -90,10 +90,6 @@ п»ї<?xml version="1.0" encoding="utf-8"?>

 <ClCompile Include="ext\palletize.c">
   <PrecompiledHeader>NotUsing</PrecompiledHeader>
  • Disabled
  • Disabled
  • NotSet
  • NotSet

    @@ -120,13 +116,6 @@ п»ї<?xml version="1.0" encoding="utf-8"?>

    StaticLibrary Unicode

  • true
  • false
  • UseLinkTimeCodeGeneration
  • @@ -146,11 +135,6 @@ п»ї vfw32.lib;%(AdditionalDependencies)
  • ARCH_X86_64=0;%(Defines)
  • ARCH_X86_64=1;%(Defines)
  • _


it fails differently now (I think mainline 2.0.1 release failed in similar way):

LANG=C cmake-converter -j 1 -v -ias -s Spp2Pgs.sln 0.000047 Converter runs in verbose mode 0.000129 processes count = 1 0.000152 warnings level = 2 0.000169 absent source files will be ignored 0.000209 INFO : ------- Started parsing solution /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln ------- 0.000695 INFO : Version of solution is 12.00 0.000713 INFO : Start parsing projects info (Project .. EndProject) 0.001484 INFO : Found project "libspp2pgs/libspp2pgs.vcxproj" with {821D4850-3AA7-4D9C-50EB-5E7CB22A3A3E} 0.001526 INFO : Found project "Spp2Pgs/Spp2Pgs.vcxproj" with {E2B13697-7E59-4689-B773-95EB4C5A7915} 0.002236 INFO : Found project "Spp2PgsNet/Spp2PgsNet.vcxproj" with {ED161A43-6432-4F8D-9D2B-C4AC8AA8CC49} 0.002306 INFO : Found project "misc/xy-VSFilter/xy-VSSppf/xy-VSSppf.vcxproj" with {ACFCDF3E-2B0F-43C8-AB12-1E1A68EA3D99} 0.002406 INFO : Start parsing GlobalSection(SolutionConfigurationPlatforms) = preSolution 0.003349 INFO : Found sln setting "Debug|Win32" 0.003377 INFO : Found sln setting "Debug|x64" 0.003397 INFO : Found sln setting "Release|Win32" 0.003423 INFO : Found sln setting "Release|x64" 0.003453 INFO : Found sln setting "ReleaseClr|Win32" 0.003484 INFO : Found sln setting "ReleaseClr|x64" 0.003504 INFO : Start parsing GlobalSection(ProjectConfigurationPlatforms) = postSolution (Mapping sln-setting -> project-settong) 0.004881 INFO : "Debug|Win32" -> "Debug|Win32" for libspp2pgs 0.004927 INFO : "Debug|x64" -> "Debug|x64" for libspp2pgs 0.004955 INFO : "Release|Win32" -> "Release|Win32" for libspp2pgs 0.004991 INFO : "Release|x64" -> "Release|x64" for libspp2pgs 0.005035 INFO : "ReleaseClr|Win32" -> "ReleaseClr|Win32" for libspp2pgs 0.005076 INFO : "ReleaseClr|x64" -> "ReleaseClr|x64" for libspp2pgs 0.005121 INFO : "Debug|Win32" -> "Debug|Win32" for Spp2Pgs 0.005164 INFO : "Debug|x64" -> "Debug|x64" for Spp2Pgs 0.005206 INFO : "Release|Win32" -> "Release|Win32" for Spp2Pgs 0.005248 INFO : "Release|x64" -> "Release|x64" for Spp2Pgs 0.005291 INFO : "ReleaseClr|Win32" -> "Release|Win32" for Spp2Pgs 0.005333 INFO : "ReleaseClr|x64" -> "Release|x64" for Spp2Pgs 0.005374 INFO : "Debug|Win32" -> "Debug|Win32" for Spp2PgsNet 0.005415 INFO : "Debug|x64" -> "Debug|x64" for Spp2PgsNet 0.005456 INFO : "Release|Win32" -> "ReleaseClr|Win32" for Spp2PgsNet 0.005498 INFO : "Release|x64" -> "ReleaseClr|x64" for Spp2PgsNet 0.005541 INFO : "ReleaseClr|Win32" -> "ReleaseClr|Win32" for Spp2PgsNet 0.005591 INFO : "ReleaseClr|x64" -> "ReleaseClr|x64" for Spp2PgsNet 0.005637 INFO : "Debug|Win32" -> "Debug|Win32" for xy-VSSppf 0.005681 INFO : "Debug|x64" -> "Debug|x64" for xy-VSSppf 0.005726 INFO : "Release|Win32" -> "Release|Win32" for xy-VSSppf 0.005770 INFO : "Release|x64" -> "Release|x64" for xy-VSSppf 0.005811 INFO : "ReleaseClr|Win32" -> "Release|Win32" for xy-VSSppf 0.005853 INFO : "ReleaseClr|x64" -> "Release|x64" for xy-VSSppf 0.006562 INFO : ------ Finished parsing solution /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln ------- 0.007699 1> INFO : ------ Starting 1 ------- 0.007728 1> INFO : Initialization data for conversion of project /home/guest/botva/src/src/Spp2Pgs/Spp2Pgs.sln 0.007948 1> INFO : == start making default flags == 0.008120 1> INFO : == end making default flags == 0.008140 1> Conversion started: Project libspp2pgs 0.008159 1> INFO : Collecting data for project /home/guest/botva/src/src/Spp2Pgs/libspp2pgs/libspp2pgs.vcxproj 0.794041 1> INFO : Project name is "libspp2pgs" 0.806706 1> INFO : cmake from property sheet: ../misc/PreToolset.cmake 0.806990 1> INFO : Unicode Definitions : ['UNICODE', '_UNICODE'] 0.819529 1> INFO : cmake from property sheet: ../misc/SolutionBuild.cmake 0.832362 1> INFO : cmake from property sheet: ../misc/vsyasm/vsyasm.cmake 0.855946 1> WARN : /home/guest/botva/src/src/Spp2Pgs/libspp2pgs/libspp2pgs.vcxproj(131): file or path "/home/guest/botva/src/src/Spp2Pgs/misc/xy-VSFilter/src/src/sppfactory" not found. 0.855999 1> WARN : /home/guest/botva/src/src/Spp2Pgs/libspp2pgs/libspp2pgs.vcxproj(131): getting actual filesystem name failed : "/home/guest/botva/src/src/Spp2Pgs/misc/xy-VSFilter/src/src/sppfactory" 0.856095 1> INFO : Include Directories : ['${CMAKE_CURRENT_SOURCE_DIR}/inc', '${CMAKE_CURRENT_SOURCE_DIR}/../misc/xy-VSFilter/src/src/sppfactory'] 0.856448 1> INFO : Additional Dependencies : ['vfw32'] Traceback (most recent call last): File "/usr/bin/cmake-converter", line 11, in load_entry_point('cmake-converter==2.0.1', 'console_scripts', 'cmake-converter')() File "/usr/lib/python3.7/site-packages/cmake_converter/main.py", line 144, in main converter.convert_solution(project_context, os.path.abspath(args.solution)) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/solution.py", line 331, in convert_solution results = self.do_conversion(project_context, input_data_for_converter) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 301, in do_conversion results.append(self.run_conversion(data_for_converter)) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 269, in run_conversion target_data['subdirectory'], File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 235, in convert_project self.collect_data(context) File "/usr/lib/python3.7/site-packages/cmake_converter/data_converter.py", line 53, in collect_data context.parser.parse(context) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/parser.py", line 147, in parse context.flags.apply_flags_to_context(context) File "/usr/lib/python3.7/site-packages/cmake_converter/visual_studio/vcxproj/flags.py", line 324, in apply_flags_to_context if context_flags_data_key in self.flags[setting][flag_name]: KeyError: ('Debug', 'Win32')

pavelliavonau commented 4 years ago

So why don't you fork and provide me a link to your modifications? It would be easy to reproduce the issue then.

Randrianasulu commented 4 years ago

Mostly because 'modifications' right now just few deletions, and I'm not even sure if this project will be compile-able on Linux? (sorry, I forgot about this Markdown formatting, trying to attach my diff file now ... cries about github not supporting diffs .... ) remove_vcproj_conditionals.diff.log

Anyway, may be those unsupported lines can be skipped (with warning/suggestion to user)?

pavelliavonau commented 4 years ago

Fixed your last fail with 0117a159d6342f9c2d398a36bb8161d7eba95f62. Now that project could be parsed fine. It is hard to add warnings/suggestion because there are too many cases for failing at custom xml files. I added parsing context to verbose output. So you can easily find and investigate the place where it's crashes.