CloudComPy icon indicating copy to clipboard operation
CloudComPy copied to clipboard

Building, installing M3C2 plugin and first tests

Open snowman907 opened this issue 3 years ago • 24 comments

Hello prascle, As you mentioned, the process of enabling the M3C2 plugin is just by enabling the plugin in the JSON file.

So in the source\repos\CloudComPy I modified the JSON file from "False" to "True" in two locations: WRAP_PLUGIN_QM3C2, PLUGIN_STANDARD_QM3C2 In Visual Studios, I tried Build_all but got error messages. So I tried: Delete Cache Generate Cache Build All And still got a similar error: M3C2_build_error

Any advice what I did wrong?

snowman907 avatar Dec 22 '22 20:12 snowman907

I did not add in conda the libraries that M3C2 plugin requires - is that the issue? If so, where can I find a list of the required conda packages?

snowman907 avatar Dec 22 '22 20:12 snowman907

Hello, If you have followed the instructions about conda package for building or using binaries You already have the required packages.

The errors you are seeing may be related to un-updated sources in your clone repository (in CloudCompare's git submodule) but this is strange!

prascle avatar Dec 22 '22 21:12 prascle

I don't know how to properly check the git clone status with Visual Studio's built-in git tools, I personally use git bash for all git commands, but that is another tool to install...

prascle avatar Dec 22 '22 21:12 prascle

You should have the file qM3C2Export.h in the M3C2 plugin sources, like this: image If the file does not exist or is different, your clone is incorrect...

prascle avatar Dec 22 '22 21:12 prascle

I do have the [email protected] M3C2_source

snowman907 avatar Dec 22 '22 21:12 snowman907

Also, I suggest you add a .gitignore for the json, and .bat files. Perhaps there is a more elegant way to do this.

snowman907 avatar Dec 22 '22 21:12 snowman907

I use Github Desktop, and I pulled the most recent source. I deleted the cash, generated the catch, and did Build all. Still, I am getting errors." M3C2_build_error_update

snowman907 avatar Dec 23 '22 09:12 snowman907

I don't understand. It seems that the M3C2 plugin symbols required by CloudComPy are not exported, so I wanted to check if qM3C2Export.h is correct. I just tried GitHub Desktop to check if the submodules are properly handled, which they are.

prascle avatar Dec 23 '22 10:12 prascle

So is there anything you would like me to try?

As I showed earlier, the qM3C2Export.h was in the cloned source.

snowman907 avatar Dec 23 '22 21:12 snowman907

Happy new year, Is there anything I can help with trying to resolve this? Thanks

snowman907 avatar Jan 06 '23 20:01 snowman907

Happy new year!

This is hard to solve remotely, a lot of details can go wrong. The main idea is to find out why the 5 M3C2 symbols required by CloudComPy are missing. Either M3C2 is compiled or not, and if it is compiled, why qM3C2Export.h is not taken into account. The build directory has about the same structure as the source directory. You should find something like this in the build for M3C2: image

If so, could you send me the .lib, the .dll and .exp files?

prascle avatar Jan 06 '23 22:01 prascle

It looks the same to me: image In the zip folder are the three files. qM3C2_l.zip

Thanks!

snowman907 avatar Jan 10 '23 18:01 snowman907

I have successfully used your files in my build process, and the install is correct, with all tests OK. The problem is elsewhere. I can check the log of your build: when you have got the error, can you just do build all (without modifying the cache). The error should reappear. You should then have a log file .ninja_log in CloudComPy/build2019/x64_Release. Could you send this file? The build.ninja file in the same directory is also interesting. Paul

prascle avatar Jan 11 '23 21:01 prascle

Great! I hope we are making progress! I cannot thank you enough for helping me here! Sending you all the ninja files! :) nina_files.zip

snowman907 avatar Jan 11 '23 21:01 snowman907

Hey Paul, I am just checking to see if you got the .ninja_log file in the zip folder from my previous response. Thanks

snowman907 avatar Jan 18 '23 08:01 snowman907

Hello, I found the problem! Thanks to the build.ninja file, I detected that the WRAP_PLUGIN_QM3C2 option should not be used anymore. It is disabled in my CMakeSettings.json. It corresponds to an old version of the Python wrap of the plugin, and has an unpleasant side effect on the build. When I enable the option, I get the same results as yours. So, just set the WRAP_PLUGIN_QM3C2 option to False in CMakeSettings.json as it is by default and it should work.

I've got some cleaning up to do on my files, thanks for your input in finding this bug! Paul

prascle avatar Jan 19 '23 14:01 prascle

Glad we are making progress! So I modified the JSON file in the source folder. Then I cleaned and generated cache followed by Build All and Install CloudComparePorject. This time I only got 4 Warnings and 1 Error.

build_20_01_23 I've attached the ninja build files. build_20_1_23.zip Thanks

snowman907 avatar Jan 20 '23 21:01 snowman907

Hello, Without any information about the error, I can't help you. Build.ninja gives information about the build process, not the error, and the other files are not useful here. The details of the error, if any, are in the Output tab, to the right of the Error List tab. I suggest you try the build process again as above and try to isolate the details of the first error in the Output tab. Paul

prascle avatar Jan 23 '23 17:01 prascle

Hello Paul, I attached a copy from the Output after the Install_CloudCompareProject command.

cloudComPy_Install_CloudCompareProjects_1_23_2023.txt

snowman907 avatar Jan 23 '23 20:01 snowman907

Perhaps the error is the result of the Install invoking the command "conda activate CloudComPy310" not from an anaconda shell. Is this supposed to work with the correct configuration?

snowman907 avatar Jan 23 '23 20:01 snowman907

OK, so apparently I was missing the command conda init Then I reran in VisualStudios the Install CloudComparePorjects and did not get any error!

snowman907 avatar Jan 23 '23 20:01 snowman907

OK, I think you don't need conda init if the CMakeSettings.json is correctly configured: you have two variables to check, condaBase and condaRoot. In your output log, you can see that the path for Scripts\activate.bat is incorrect (probably because condaBase is incorrect). Anyway, it should work now. Paul

prascle avatar Jan 23 '23 23:01 prascle

CMakeSettings.json has an anacondaRoot, but there is no condaRoot, condaBase or anacondaBase! So I do know where to look for the error in condaBase. Thanks CMakeSettings.json.rmv_ext.txt

snowman907 avatar Jan 23 '23 23:01 snowman907

CMakeSettings.json was updated on November 19, 2022, to have a portable script for building documentation. The CloudComPy sources and build scripts are based on the definitions in CMakeSettings.json. You should migrate to the new one to get something consistent. Anyway, even without that, the installation should be fine, except for the documentation: CloudComPy tests should work, as well as CloudCompare Gui. Paul

prascle avatar Jan 24 '23 09:01 prascle