robotology / blockfactory

A tiny framework to wrap algorithms for dataflow programming
https://robotology.github.io/blockfactory
GNU Lesser General Public License v2.1
40 stars 16 forks source link

s-function #77

Open rcone11 opened 4 months ago

rcone11 commented 4 months ago

I am trying to install block factory for the first time. I want to run the example in the blockfactory folder first. When I tried to run it in Simulink, I got an error saying it couldn’t find blockfactory. I also tried to mex blockfactory.cpp, but I couldn’t compile it successfully. I want to know if I missed any steps. What should I do to make Simulink find blockfactory?

traversaro commented 4 months ago

Please report the exact error, thanks.

rcone11 commented 4 months ago

I tried to mex blockfactory.cpp in matlab and got the error message: /usr/bin/ld: /tmp/mex_35266495627694_401685/BlockFactory.o: in function catchLogMessages(bool, SimStruct_tag*)': BlockFactory.cpp:(.text+0x123a): undefined reference to blockfactory::core::Log::getSingleton()’ /usr/bin/ld: BlockFactory.cpp:(.text+0x124c): undefined reference to `blockfactory::core::Log::getWarningsabi:cxx11 const’, this is just a small part of the error report.what should I do?thank you

rcone11 commented 4 months ago

请报告确切的错误,谢谢。

I opened the model in the example in simulink, and after running it, I encountered the following error: Error in S-function ‘Model/w// mask’: S-Function ‘BlockFactory’ does not exist Component: Simulink | Category: Model error Error in S-function ‘Model/w//o mask’: S-Function ‘BlockFactory’ does not exist Component: Simulink | Category: Model error. I have been trying to solve this problem, and I was thinking that if I successfully compile block factory.cpp in Matlab, this error would not exist. But I have been unsuccessful, maybe my approach is wrong?

traversaro commented 4 months ago

The S-Function needs to be compiled via CMake, see https://robotology.github.io/blockfactory/mkdocs/install/#installation .

rcone11 commented 4 months ago

The S-Function needs to be compiled via CMake, see https://robotology.github.io/blockfactory/mkdocs/install/#installation .

On this webpage, I have completed everything as instructed on Ubuntu 20.04.6, except for the last step regarding export BLOCKFACTORY_PLUGIN_PATH=/installfolder1/subfolder1/blockfactory:/installfolder2/subfolder2/blockfactory/:<...>. because I am not very clear on which files I need to export, can you please help me with this, sir?thank you

traversaro commented 4 months ago

That is an environment variable, see https://www.hostinger.com/tutorials/linux-environment-variables for a primer on that. You only need to set it once you have compiled your first blockfactory block, see https://robotology.github.io/blockfactory/mkdocs/create_new_library/ for an example on how to do that.

rcone11 commented 4 months ago

这是一个环境变量,有关这方面的入门知识,请参见 https://www.hostinger.com/tutorials/linux-environment-variables。您只需要在编译第一个 blockfactory 块后进行设置,有关如何执行此操作的示例,请参阅 https://robotology.github.io/blockfactory/mkdocs/create_new_library/

So,sir do I not need to try mex blockfactory in Matlab? Just need to set export BLOCKFACTORY_PLUGIN_PATH=/installfolder1/subfolder1/blockfactory:/installfolder2/subfolder2/blockfactory/:<…> right, so that the example can run fine right? and on (https://robotology.github.io/blockfactory/mkdocs/create_new_library/) “You should now find in the ./build directories a new library file, which depending on your OS is: libExampleToolbox.so on Linux.” After I executed this, I did not find the libExampleToolbox.so, why is that? thank you

traversaro commented 4 months ago

Did you followed the instructions in the "Compiling instructions" in https://robotology.github.io/blockfactory/mkdocs/create_new_library/ ?

rcone11 commented 4 months ago

Did you followed the instructions in the "Compiling instructions" in https://robotology.github.io/blockfactory/mkdocs/create_new_library/ ?

yes,I followed this command

traversaro commented 4 months ago

Can you report the output of those commands?

rcone11 commented 4 months ago

Can you report the output of those commands?

after the last command:Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found autogenerated sources for AutogenerationExample model. -- Configuring done -- Generating done -- Build files have been written to: /home/han/blockfactory/example/build

traversaro commented 4 months ago

Can you report the output of those commands?

after the last command:Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found autogenerated sources for AutogenerationExample model. -- Configuring done -- Generating done -- Build files have been written to: /home/han/blockfactory/example/build

It seems that you did not executed the command cmake --build ., unless I am missing something.

rcone11 commented 4 months ago

Can you report the output of those commands?

after the last command:Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found autogenerated sources for AutogenerationExample model. -- Configuring done -- Generating done -- Build files have been written to: /home/han/blockfactory/example/build

It seems that you did not executed the command cmake --build ., unless I am missing something.

When I execute cmake build ., an error occurs: [ 42%] Linking CXX executable main /usr/bin/ld: /home/han/miniforge3/lib/libBlockFactorySimulinkCoder.so.0.8.5: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29’ collect2: error: ld returned 1 make[2]: [CMakeFiles/main.dir/build.make:88:main] Error 1 make[1]: [CMakeFiles/Makefile2:98:CMakeFiles/main.dir/all] Error 2 make: *** [Makefile:84:all] Error 2

Then I changed the command to cmake -Dcmake_CXX_STANDARD=14 --build ., the output is: Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) – Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) – Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) – Found autogenerated sources for AutogenerationExample model. – Configuring done – Generating done – Build files have been written to: /home/han/blockfactory/example/build。It's wrong?

traversaro commented 4 months ago

Please always report the full errors you are encountering, otherwise it is really difficult to help you. : )

In the command cmake -Dcmake_CXX_STANDARD=14 --build . the --build part is ignored as you are passing a -D option, so basically you are not building anymore the example.

It seems that you are building inside a conda environement, can you please report the content of that environment with the output conda list ? My intuition is that you are trying to use libraries from that conda environment, but without installing the compilers for conda, but using the compilers from the underlying distribution, but that is not possible, as the libraries from conda require a newer C++ standard library, and hence the error you are seeing.

rcone11 commented 4 months ago

请始终报告您遇到的完整错误,否则真的很难帮助您。: )

在命令中,当您传递一个选项时,该部分将被忽略,因此基本上您不再构建示例。cmake -Dcmake_CXX_STANDARD=14 --build .``--build``-D

您似乎正在 conda 环境中构建,您能否通过输出报告该环境的内容?我的直觉是,您正在尝试使用来自该 conda 环境的库,但没有安装 conda 的编译器,而是使用底层发行版中的编译器,但这是不可能的,因为 conda 的库需要更新的 C++ 标准库,因此您看到的错误。conda list

I am very sorry to have disturbed you.This is all the results in my terminal.(base) han@han-System-Product-Name:~/blockfactory/example/build$ cmake .. -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found BlockFactory 0.8.5 (Components: Core Simulink SimulinkCoder) -- Found autogenerated sources for AutogenerationExample model. -- Configuring done -- Generating done -- Build files have been written to: /home/han/blockfactory/example/build (base) han@han-System-Product-Name:~/blockfactory/example/build$ cmake --build . [ 28%] Built target AutogenerationExample [ 42%] Linking CXX executable main /usr/bin/ld: /home/han/miniforge3/lib/libBlockFactorySimulinkCoder.so.0.8.5: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29' collect2: 错误:ld 返回 1 make[2]: [CMakeFiles/main.dir/build.make:88:main] 错误 1 make[1]: [CMakeFiles/Makefile2:98:CMakeFiles/main.dir/all] 错误 2 make: *** [Makefile:84:all] 错误 2 (base) han@han-System-Product-Name:~/blockfactory/example/build$

traversaro commented 4 months ago

Can you report the output of the conda list command?

rcone11 commented 4 months ago

conda list

(base) han@han-System-Product-Name:~$ conda list

packages in environment at /home/han/miniforge3:

#

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge ace 7.1.3 h59595ed_2 conda-forge alsa-lib 1.2.11 hd590300_1 conda-forge ampl-mp 3.1.0 h2cc385e_1006 conda-forge aom 3.8.2 h59595ed_0 conda-forge archspec 0.2.3 pyhd8ed1ab_0 conda-forge assimp 5.3.1 h8343317_3 conda-forge attr 2.5.1 h166bdaf_1 conda-forge blockfactory 0.8.5 h59595ed_120 robotology boltons 24.0.0 pyhd8ed1ab_0 conda-forge brotli-python 1.1.0 py310hc6cd4ac_1 conda-forge bzip2 1.0.8 hd590300_5 conda-forge c-ares 1.28.1 hd590300_0 conda-forge ca-certificates 2024.2.2 hbcca054_0 conda-forge cairo 1.18.0 h3faef2a_0 conda-forge casadi 3.6.5 py310h60ac289_0 conda-forge casadi-matlab-bindings 3.6.3.1 h59595ed_120 robotology certifi 2024.2.2 pyhd8ed1ab_0 conda-forge cffi 1.16.0 py310h2fee648_0 conda-forge charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge colorama 0.4.6 pyhd8ed1ab_0 conda-forge conda 24.3.0 py310hff52083_0 conda-forge conda-libmamba-solver 24.1.0 pyhd8ed1ab_0 conda-forge conda-package-handling 2.2.0 pyh38be061_0 conda-forge conda-package-streaming 0.9.0 pyhd8ed1ab_0 conda-forge cython 0.29.37 py310hc6cd4ac_0 conda-forge dav1d 1.2.1 hd590300_0 conda-forge dbus 1.13.6 h5008d03_3 conda-forge distro 1.9.0 pyhd8ed1ab_0 conda-forge eigen 3.4.0 h00ab1b0_0 conda-forge expat 2.6.2 h59595ed_0 conda-forge ffmpeg 6.1.1 gpl_hee4b679_108 conda-forge fmt 10.2.1 h00ab1b0_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 h77eed37_1 conda-forge fontconfig 2.14.2 h14ed4e7_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge freeglut 3.2.2 hac7e632_2 conda-forge freetype 2.12.1 h267a509_2 conda-forge fribidi 1.0.10 h36c2ea0_0 conda-forge gettext 0.22.5 h59595ed_2 conda-forge gettext-tools 0.22.5 h59595ed_2 conda-forge glfw 3.4 hd590300_0 conda-forge glib 2.80.0 hf2295e7_6 conda-forge glib-tools 2.80.0 hde27a5a_6 conda-forge gmp 6.3.0 h59595ed_1 conda-forge gnutls 3.7.9 hb077bed_0 conda-forge graphite2 1.3.13 h59595ed_1003 conda-forge gsl 2.7 he838d99_0 conda-forge gst-plugins-base 1.24.1 hfa15dee_1 conda-forge gstreamer 1.24.1 h98fc4e7_1 conda-forge harfbuzz 8.3.0 h3d44ed6_0 conda-forge hdf5 1.14.3 nompi_h4f84152_100 conda-forge icu 73.2 h59595ed_0 conda-forge icub-firmware-shared 1.38.0 h59595ed_120 robotology icub-main 2.5.0 py310hd29ae9e_120 robotology icub-models 2.5.0 py310hc6cd4ac_0 conda-forge idna 3.6 pyhd8ed1ab_0 conda-forge idyntree 11.0.0 py310h3478c64_0 conda-forge idyntree-matlab-bindings 10.3.0 h9f71af4_120 robotology imath 3.1.11 hfc55251_0 conda-forge ipopt 3.14.14 h04b96a2_1 conda-forge irrlicht 1.8.5 h2a6caf8_4 conda-forge jasper 4.2.3 he6dfbbe_0 conda-forge jsonpatch 1.33 pyhd8ed1ab_0 conda-forge jsonpointer 2.4 py310hff52083_3 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge krb5 1.21.2 h659d440_0 conda-forge lame 3.100 h166bdaf_1003 conda-forge ld_impl_linux-64 2.40 h41732ed_0 conda-forge lerc 4.0.0 h27087fc_0 conda-forge libabseil 20240116.1 cxx17_h59595ed_2 conda-forge libaec 1.1.3 h59595ed_0 conda-forge libarchive 3.7.2 h2aa1ff5_1 conda-forge libasprintf 0.22.5 h661eb56_2 conda-forge libasprintf-devel 0.22.5 h661eb56_2 conda-forge libass 0.17.1 h8fe9dca_1 conda-forge libblas 3.9.0 22_linux64_openblas conda-forge libboost 1.84.0 h8013b2b_2 conda-forge libcap 2.69 h0f662aa_0 conda-forge libcblas 3.9.0 22_linux64_openblas conda-forge libccd-double 2.1 h59595ed_3 conda-forge libclang-cpp15 15.0.7 default_h127d8a8_5 conda-forge libclang13 18.1.3 default_h5d6823c_0 conda-forge libcups 2.3.3 h4637d8d_4 conda-forge libcurl 8.7.1 hca28451_0 conda-forge libdc1394 2.2.7 h59595ed_1 conda-forge libdeflate 1.20 hd590300_0 conda-forge libdrm 2.4.120 hd590300_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 hd590300_2 conda-forge libevent 2.1.12 hf998b51_1 conda-forge libexpat 2.6.2 h59595ed_0 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libflac 1.4.3 h59595ed_0 conda-forge libgcc-ng 13.2.0 h807b86a_5 conda-forge libgcrypt 1.10.3 hd590300_0 conda-forge libgettextpo 0.22.5 h59595ed_2 conda-forge libgettextpo-devel 0.22.5 h59595ed_2 conda-forge libgfortran-ng 13.2.0 h69a702a_6 conda-forge libgfortran5 13.2.0 h43f5ff8_6 conda-forge libglib 2.80.0 hf2295e7_6 conda-forge libglu 9.0.0 hac7e632_1003 conda-forge libgomp 13.2.0 h807b86a_5 conda-forge libgpg-error 1.48 h71f35ed_0 conda-forge libhwloc 2.9.3 default_h554bfaf_1009 conda-forge libi2c 4.3 hcb278e6_2 conda-forge libiconv 1.17 hd590300_2 conda-forge libidn2 2.3.7 hd590300_0 conda-forge libjpeg-turbo 3.0.0 hd590300_1 conda-forge liblapack 3.9.0 22_linux64_openblas conda-forge liblapacke 3.9.0 22_linux64_openblas conda-forge libllvm15 15.0.7 hb3ce162_4 conda-forge libllvm18 18.1.3 h2448989_0 conda-forge libmamba 1.5.8 had39da4_0 conda-forge libmambapy 1.5.8 py310h39ff949_0 conda-forge libnghttp2 1.58.0 h47da74e_1 conda-forge libnsl 2.0.1 hd590300_0 conda-forge libode 0.16.2 hc6cd4ac_14 conda-forge libogg 1.3.4 h7f98852_1 conda-forge libopenblas 0.3.27 pthreads_h413a1c8_0 conda-forge libopencv 4.9.0 qt5_py38h03d32d8_512 conda-forge libopenvino 2024.0.0 h2da1b83_5 conda-forge libopenvino-auto-batch-plugin 2024.0.0 hb045406_5 conda-forge libopenvino-auto-plugin 2024.0.0 hb045406_5 conda-forge libopenvino-hetero-plugin 2024.0.0 h5c03a75_5 conda-forge libopenvino-intel-cpu-plugin 2024.0.0 h2da1b83_5 conda-forge libopenvino-intel-gpu-plugin 2024.0.0 h2da1b83_5 conda-forge libopenvino-ir-frontend 2024.0.0 h5c03a75_5 conda-forge libopenvino-onnx-frontend 2024.0.0 h07e8aee_5 conda-forge libopenvino-paddle-frontend 2024.0.0 h07e8aee_5 conda-forge libopenvino-pytorch-frontend 2024.0.0 he02047a_5 conda-forge libopenvino-tensorflow-frontend 2024.0.0 h39126c6_5 conda-forge libopenvino-tensorflow-lite-frontend 2024.0.0 he02047a_5 conda-forge libopus 1.3.1 h7f98852_1 conda-forge libosqp 0.6.3 h59595ed_0 conda-forge libpciaccess 0.18 hd590300_0 conda-forge libpng 1.6.43 h2797004_0 conda-forge libpq 16.2 h33b98f1_1 conda-forge libprotobuf 4.25.3 h08a7969_0 conda-forge libqdldl 0.1.5 h27087fc_1 conda-forge libscotch 7.0.4 h91e35bf_1 conda-forge libsndfile 1.2.2 hc60ed4a_1 conda-forge libsolv 0.7.28 hfc55251_2 conda-forge libspral 2023.09.07 h6aa6db2_2 conda-forge libsqlite 3.45.2 h2797004_0 conda-forge libssh2 1.11.0 h0841786_0 conda-forge libstdcxx-ng 13.2.0 h7e041cc_5 conda-forge libsystemd0 255 h3516f8a_1 conda-forge libtasn1 4.19.0 h166bdaf_0 conda-forge libtiff 4.6.0 h1dd3fc0_3 conda-forge libudev1 255 h3f72095_1 conda-forge libunistring 0.9.10 h7f98852_0 conda-forge libusb 1.0.27 h520f47e_100 conda-forge libuuid 2.38.1 h0b41bf4_0 conda-forge libva 2.21.0 hd590300_0 conda-forge libvorbis 1.3.7 h9c3ff4c_0 conda-forge libvpx 1.14.0 h59595ed_0 conda-forge libwebp-base 1.4.0 hd590300_0 conda-forge libxcb 1.15 h0b41bf4_0 conda-forge libxcrypt 4.4.36 hd590300_1 conda-forge libxkbcommon 1.7.0 h662e7e4_0 conda-forge libxml2 2.12.6 h232c23b_1 conda-forge libyarp 3.9.0 ha614a09_2 conda-forge libzlib 1.2.13 hd590300_5 conda-forge lz4-c 1.9.4 hcb278e6_0 conda-forge lzo 2.10 h516909a_1000 conda-forge mamba 1.5.8 py310h51d5547_0 conda-forge matlab-whole-body-simulator 3.3.0 h59595ed_120 robotology menuinst 2.0.2 py310hff52083_0 conda-forge metis 5.1.0 h59595ed_1007 conda-forge mpg123 1.32.6 h59595ed_0 conda-forge mumps-include 5.6.2 ha770c72_4 conda-forge mumps-seq 5.6.2 hfef103a_4 conda-forge mysql-common 8.3.0 hf1915f5_4 conda-forge mysql-libs 8.3.0 hca2cd23_4 conda-forge ncurses 6.4.20240210 h59595ed_0 conda-forge nettle 3.9.1 h7ab15ed_0 conda-forge nspr 4.35 h27087fc_0 conda-forge nss 3.98 h1d7d5a4_0 conda-forge numpy 1.26.4 py310hb13e2d6_0 conda-forge ocl-icd 2.3.2 hd590300_1 conda-forge openexr 3.2.2 haf962dd_1 conda-forge openh264 2.4.1 h59595ed_0 conda-forge openssl 3.2.1 hd590300_1 conda-forge osqp-eigen 0.8.1 hdd734ac_1 conda-forge osqp-matlab 0.6.2.4 hdd734ac_120 robotology p11-kit 0.24.1 hc5aa10d_0 conda-forge packaging 24.0 pyhd8ed1ab_0 conda-forge pcre2 10.43 hcad00b1_0 conda-forge pip 24.0 pyhd8ed1ab_0 conda-forge pixman 0.43.2 h59595ed_0 conda-forge platformdirs 4.2.0 pyhd8ed1ab_0 conda-forge pluggy 1.4.0 pyhd8ed1ab_0 conda-forge portaudio 19.6.0 h7c63dc7_9 conda-forge proxsuite 0.6.4 py310hd41b1e2_1 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge pugixml 1.14 h59595ed_0 conda-forge pulseaudio-client 17.0 hb77b528_0 conda-forge pybind11-abi 4 hd8ed1ab_3 conda-forge pycosat 0.6.6 py310h2372a71_0 conda-forge pycparser 2.22 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.10.14 hd12c33a_0_cpython conda-forge python_abi 3.10 4_cp310 conda-forge qpoases 3.2.1 py310h22287dc_2 conda-forge qt-main 5.15.8 hc9dc06e_21 conda-forge readline 8.2 h8228510_1 conda-forge reproc 14.2.4.post0 hd590300_1 conda-forge reproc-cpp 14.2.4.post0 h59595ed_1 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge robot-testing-framework 2.0.1 hcb278e6_1 conda-forge ruamel.yaml 0.18.6 py310h2372a71_0 conda-forge ruamel.yaml.clib 0.2.8 py310h2372a71_0 conda-forge scipy 1.13.0 py310hb13e2d6_0 conda-forge scotch 7.0.4 h23d43cc_1 conda-forge sdl 1.2.68 h293081c_0 conda-forge sdl2 2.30.2 hdbcbe63_0 conda-forge setuptools 69.5.1 pyhd8ed1ab_0 conda-forge simde 0.8.0 h00ab1b0_0 conda-forge snappy 1.2.0 hdb0a2a9_1 conda-forge soxr 0.1.3 h0b41bf4_3 conda-forge svt-av1 2.0.0 h59595ed_0 conda-forge tbb 2021.11.0 h00ab1b0_1 conda-forge tinyxml 2.6.2 h4bd325d_2 conda-forge tinyxml2 10.0.0 h59595ed_0 conda-forge tk 8.6.13 noxft_h4845f30_101 conda-forge tqdm 4.66.2 pyhd8ed1ab_0 conda-forge truststore 0.8.0 pyhd8ed1ab_0 conda-forge tzdata 2024a h0c530f3_0 conda-forge unixodbc 2.3.12 h661eb56_0 conda-forge urllib3 2.2.1 pyhd8ed1ab_0 conda-forge wayland 1.22.0 h8c25dac_1 conda-forge wb-toolbox 5.6.1 h9f71af4_120 robotology wheel 0.43.0 pyhd8ed1ab_1 conda-forge whole-body-controllers 2.5.6 h59595ed_120 robotology x264 1!164.3095 h166bdaf_2 conda-forge x265 3.5 h924138e_3 conda-forge xcb-util 0.4.0 hd590300_1 conda-forge xcb-util-image 0.4.0 h8ee46fc_1 conda-forge xcb-util-keysyms 0.4.0 h8ee46fc_1 conda-forge xcb-util-renderutil 0.3.9 hd590300_1 conda-forge xcb-util-wm 0.4.1 h8ee46fc_1 conda-forge xkeyboard-config 2.41 hd590300_0 conda-forge xorg-fixesproto 5.0 h7f98852_1002 conda-forge xorg-inputproto 2.3.2 h7f98852_1002 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.1.1 hd590300_0 conda-forge xorg-libsm 1.2.4 h7391055_0 conda-forge xorg-libx11 1.8.9 h8ee46fc_0 conda-forge xorg-libxau 1.0.11 hd590300_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h0b41bf4_2 conda-forge xorg-libxfixes 5.0.3 h7f98852_1004 conda-forge xorg-libxi 1.7.10 h7f98852_0 conda-forge xorg-libxinerama 1.1.5 h27087fc_0 conda-forge xorg-libxrender 0.9.11 hd590300_0 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge xorg-xf86vidmodeproto 2.3.1 h7f98852_1002 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.2.6 h166bdaf_0 conda-forge yaml-cpp 0.8.0 h59595ed_0 conda-forge yarp-matlab-bindings 3.9.1 h59595ed_120 robotology ycm-cmake-modules 0.16.2 h59595ed_0 conda-forge zlib 1.2.13 hd590300_5 conda-forge zstandard 0.22.0 py310h1275a96_0 conda-forge zstd 1.5.5 hfc55251_0 conda-forge (base) han@han-System-Product-Name:~$

traversaro commented 4 months ago

My theory is correct, there is no compilers package. Either you deactivate the conda environment when you build blockfactory and all related packages, or you also install in the environment the packages required for C++ development, i.e. :

conda install cmake pkg-config make ninja compilers

If you do this, remember to delete the build folder before attempting again to compile, as the path of the C++ compiler is cached inside the build (in particular inside the CMakeCache.txt file).

rcone11 commented 4 months ago

My theory is correct, there is no compilers package. Either you deactivate the conda environment when you build blockfactory and all related packages, or you also install in the environment the packages required for C++ development, i.e. :

conda install cmake pkg-config make ninja compilers

I will follow your instructions and appreciate your patient guidance .thank you very much

rcone11 commented 4 months ago

My theory is correct, there is no package. Either you deactivate the conda environment when you build blockfactory and all related packages, or you also install in the environment the packages required for C++ development, i.e. :compilers

conda install cmake pkg-config make ninja compilers

I will follow your instructions and appreciate your patient guidance .thank you very much

I am sorry to bother you again. When my terminal was executing cmake --build . --target install, an error occurred in this last step:

han@han-System-Product-Name:~/blockfactory/build$ cmake --build . --target install make[1]: Entering directory “/home/han/blockfactory/build” make[2]: Entering directory “/home/han/blockfactory/build” make[2]: Leaving directory “/home/han/blockfactory/build” [ 25%] Built target shlibpp make[2]: Entering directory “/home/han/blockfactory/build” make[2]: Leaving directory “/home/han/blockfactory/build” [ 75%] Built target Core make[2]: Entering directory “/home/han/blockfactory/build” make[2]: Leaving directory “/home/han/blockfactory/build” [ 87%] Built target SimulinkCoder make[2]: Entering directory “/home/han/blockfactory/build” make[2]: Leaving directory “/home/han/blockfactory/build” [100%] Built target blockfactory-exists make[1]: Leaving directory “/home/han/blockfactory/build” Install the project… – Install configuration: “Release” – Installing: /home/han/blockfactory/build/lib/cmake/shlibpp/shlibppConfigVersion.cmake – Up-to-date: /home/han/blockfactory/build/lib/cmake/shlibpp/shlibppConfig.cmake – Old export file “/home/han/blockfactory/build/lib/cmake/shlibpp/shlibppTargets.cmake” will be replaced. Removing files [/home/han/blockfactory/build/lib/cmake/shlibpp/shlibppTargets-release.cmake]. – Installing: /home/han/blockfactory/build/lib/cmake/shlibpp/shlibppTargets.cmake – Installing: /home/han/blockfactory/build/lib/cmake/shlibpp/shlibppTargets-release.cmake CMake Error at deps/sharedlibpp/src/cmake_install.cmake:52 (file): file INSTALL cannot find “/home/han/blockfactory/build/lib/libshlibpp.so.0.0.1”: No such file or directory. Call Stack (most recent call first): deps/sharedlibpp/cmake_install.cmake:69 (include) deps/cmake_install.cmake:42 (include) cmake_install.cmake:42 (include)

make: *** [Makefile:86: install] Error 1 han@han-System-Product-Name:~/blockfactory/build$

traversaro commented 4 months ago

It seems that you already installed blockfactory in your conda environment, so I guess you do not need to re-compile it from source. I guess you just need to compile the example block.

rcone11 commented 4 months ago

It seems that you already installed blockfactory in your conda environment, so I guess you do not need to re-compile it from source. I guess you just need to compile the example block.

Just now I deleted the blockfactory folder in the computer and followed the instructions step by step, then this error occurred. Does this mean that this error can be ignored?

traversaro commented 4 months ago

It seems that you already installed blockfactory in your conda environment, so I guess you do not need to re-compile it from source. I guess you just need to compile the example block.

Just now I deleted the blockfactory folder in the computer and followed the instructions step by step, then this error occurred. Does this mean that this error can be ignored?

Which error?

rcone11 commented 4 months ago

It seems that you already installed blockfactory in your conda environment, so I guess you do not need to re-compile it from source. I guess you just need to compile the example block.

Just now I deleted the blockfactory folder in the computer and followed the instructions step by step, then this error occurred. Does this mean that this error can be ignored?

Which error?

It seems that you already installed blockfactory in your conda environment, so I guess you do not need to re-compile it from source. I guess you just need to compile the example block.

Just now I deleted the blockfactory folder in the computer and followed the instructions step by step, then this error occurred. Does this mean that this error can be ignored?

Which error?

I'm sorry, I didn't make myself clear. The error I mentioned were those in my previous reply.

traversaro commented 4 months ago

The error in https://github.com/robotology/blockfactory/issues/77#issuecomment-2082452979 mention the folder /home/han/blockfactory/build/, so I am not sure what you mean with "I deleted the blockfactory folder", as the error refer to the /home/han/blockfactory folder. Anyhow, as I stated before if you already installed blockfactory via conda, you do not need to install it again from source (i.e. following the steps in https://robotology.github.io/blockfactory/mkdocs/install/).

rcone11 commented 4 months ago

The error in #77 (comment) mention the folder /home/han/blockfactory/build/, so I am not sure what you mean with "I deleted the blockfactory folder", as the error refer to the /home/han/blockfactory folder. Anyhow, as I stated before if you already installed blockfactory via conda, you do not need to install it again from source (i.e. following the steps in https://robotology.github.io/blockfactory/mkdocs/install/).

OK,Thank you for your sincere answer and the great help you have given me.