GollyGang / ready

A cross-platform implementation of various reaction-diffusion systems and PDEs.
GNU General Public License v3.0
766 stars 60 forks source link

build failure on OpenSUSE Tumbleweed #168

Open gwhitney opened 1 month ago

gwhitney commented 1 month ago

Just cloned the repo, installed all prerequisites on a reasonably up-to-date installation of OpenSUSE Tumbleweed, the cmake -DCMAKE_BUILD_TYPE=Release . succeeded with two messages of not finding freetype and one of finding it, and make proceeded ok until

[ 93%] Building CXX object CMakeFiles/ready.dir/src/gui/frame.cpp.o
/home/glen/code/ready/src/gui/frame.cpp: In member function ‘void MyFrame::SaveCurrentMesh(const wxFileName&, bool, double)’:
/home/glen/code/ready/src/gui/frame.cpp:2830:54: error: cannot convert ‘wxString’ to ‘const char*’
 2830 |         writer->SetFileName(mesh_filename.GetFullPath());
      |                             ~~~~~~~~~~~~~~~~~~~~~~~~~^~
      |                                                      |
      |                                                      wxString
In file included from /usr/include/vtk-9.3/vtkObject.h:34,
                 from /usr/include/vtk-9.3/vtkInteractorObserver.h:36,
                 from /usr/include/vtk-9.3/vtkInteractorStyle.h:83,
                 from /usr/include/vtk-9.3/vtkInteractorStyleTrackballCamera.h:27,
                 from /home/glen/code/ready/src/gui/InteractorStylePainter.hpp:19,
                 from /home/glen/code/ready/src/gui/frame.hpp:34,
                 from /home/glen/code/ready/src/gui/frame.cpp:19:
/usr/include/vtk-9.3/vtkPLYWriter.h:196:3: note:   initializing argument 1 of ‘virtual void vtkPLYWriter::SetFileName(const char*)’
  196 |   vtkSetFilePathMacro(FileName);
      |   ^~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/ready.dir/build.make:168: CMakeFiles/ready.dir/src/gui/frame.cpp.o] Error 1

Any advice would be welcome.

gwhitney commented 1 month ago

I changed the line 2830 of src/gui/frame.cpp to

writer->SetFileName(mesh_filename.GetFullPath().mb_str());

and the make then succeeded. Two questions: (1) Should I submit a PR for that one-line change? (2) Is there an appropriate forum for asking for build assistance? Although the build completed, the resulting ready executable says that OpenCL was not detected on my machine, even though I didn't see any complaint to that effect during the cmake execution. I understand this issue, and probably not the issue tracker at all, is not the place to ask for help -- I am just asking about where to ask. Thanks.

gwhitney commented 1 month ago

[Actually, I got OpenCL working. There was just an additional package I needed to install, it's called ocl-icd-devel on Tumbleweed, and then a cmake --fresh followed by a make got things working. It's just odd that the original cmake didn't complain about whatever was missing without that package.] So the only remaining question is whether a PR is appropriate for the one-line code change that helped in my situation.

timhutton commented 1 month ago

Hi @gwhitney. Feel free to make a PR. Thanks.

There is a mailing list (link on the front page). You can ask for build help there or feel free to open an issue because probably the instructions can be improved.