First time here? Checkout the FAQ!
x
0 votes
by (1.2k points)
edited by

When compiling the most recent version of Meshalyzer on git(with make -j), I run into a compile error on trimesh.o. Recompiling it doesn't throw a warning, but seems to indicate the compiler exits after re-encountering trimesh.o. Executing ./meshalyzer after that gives me this error, "Can't open display: ".

I've double checked the dependency list and all of them are installed. Perhaps this is a makefile issue? (I also tried using cmake, which gives me a different error but fails to compile nonetheless.)

I've attached the logs below, much apologies for the long post.

System: Win10 Linux Subsystem 2(Ubuntu 20.04)

First run:


cd src && make

make[1]: Entering directory '...'

fluid -c -o .cc FlyBy.fl

fluid -c -o .cc HiLiteWinInfo.fl

fluid -c -o .cc isosurf.fl

FlyBy.fl:2: unknown version '1.0400'

fluid -c -o .cc HDF5DataBrowser.fl

fluid -c -o .cc colourchoice.fl

isosurf.fl:2: unknown version '1.0400'

fluid -c -o .cc TimeLink.fl

colourchoice.fl:2: unknown version '1.0400'

fluid -c -o .cc DataOpacity.fl

fluid -c -o .cc Sequence.fl

DataOpacity.fl:2: unknown version '1.0400'

TimeLink.fl:2: unknown version '1.0400'

fluid -c -o .cc ClipPlane.fl

ClipPlane.fl:2: unknown version '1.0400'

fluid -c -o .cc plottingwin.fl

fluid -c -o .cc DeadDataGUI.fl

fluid -c -o .cc trimesh.fl

DeadDataGUI.fl:2: unknown version '1.0400'

g++ -c -std=c++17 -g  -O0 -I. -D_REENTRANT  -fopenmp -D_GLIBCXX_PARALLEL -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -MMD -DNOMINMAX AuxGrid.cc -o ../obj/AuxGrid.o

[log skipped]

g++ -c -std=c++17 -g  -O0 -I. -D_REENTRANT  -fopenmp -D_GLIBCXX_PARALLEL -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -MMD -DNOMINMAX VecData.cc -o ../obj/VecData.o

g++ -c -std=c++17 -g  -O0 -I. -D_REENTRANT  -fopenmp -D_GLIBCXX_PARALLEL -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -MMD -DNOMINMAX Vector3D.C -o ../obj/Vector3D.o

ColourGroup.cc:3:10: fatal error: trimesh.h: No such file or directory

    3 | #include "trimesh.h"

      |          ^~~~~~~~~~~

compilation terminated.

make[1]: *** [Makefile:91: ../obj/ColourGroup.o] Error 1

make[1]: *** Waiting for unfinished jobs....

IGBheader.cc: In member function ‘int IGBheader::write()’:

IGBheader.cc:555:27: warning: '0' flag ignored with precision and ‘%x’ gnu_printf format [-Wformat=]

  555 |       sprintf( value+a*2, "%0.2x", *(p++) );

      |                           ^~~~~~~

In file included from TBmeshWin.cc:17:

Frame.h:21:39: error: ‘GLubyte’ has not been declared

   21 |       void pixel_color( int x, int y, GLubyte *color ){

      |                                       ^~~~~~~

Frame.h:24:6: error: ‘GLubyte’ does not name a type

   24 |      GLubyte* _buffer = NULL;

      |      ^~~~~~~

Frame.h:33:6: error: ‘GLuint’ does not name a type; did you mean ‘uint’?

   33 |      GLuint _fb, _color_rb, _depth_rb;

      |      ^~~~~~

      |      uint

Frame.h: In member function ‘void Frame::pixel_color(int, int, int*)’:

Frame.h:22:37: error: ‘_buffer’ was not declared in this scope; did you mean ‘setbuffer’?

   22 |                      memcpy( color, _buffer+(x+_w*y)*4, 4*sizeof(GLubyte ) );}

      |                                     ^~~~~~~

      |                                     setbuffer

Frame.h:22:66: error: ‘GLubyte’ was not declared in this scope

   22 |                      memcpy( color, _buffer+(x+_w*y)*4, 4*sizeof(GLubyte ) );}

      |                                                                  ^~~~~~~

TBmeshWin.cc: In member function ‘bool TBmeshWin::process_hits(Frame&)’:

TBmeshWin.cc:1606:54: error: cannot convert ‘std::array<unsigned char, 4>::pointer’ {aka ‘unsigned char*’} to ‘int*’

 1606 |   frame.pixel_color( x, pixel_h()-1-y, pickedCol.data() );

      |                                        ~~~~~~~~~~~~~~^~

      |                                                      |

      |                                                      std::array<unsigned char, 4>::pointer {aka unsigned char*}

In file included from TBmeshWin.cc:17:

Frame.h:21:48: note:   initializing argument 3 of ‘void Frame::pixel_color(int, int, int*)’

   21 |       void pixel_color( int x, int y, GLubyte *color ){

      |                                       ~~~~~~~~~^~~~~

make[1]: *** [Makefile:91: ../obj/TBmeshWin.o] Error 1

make[1]: Leaving directory '/mnt/d/openCarp/meshalyzer/src'

make: *** [Makefile:6: all] Error 2


Second run: 


cd src && make

make[1]: Entering directory '...'

g++ -c -std=c++17 -g  -O0 -I. -D_REENTRANT  -fopenmp -D_GLIBCXX_PARALLEL -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -MMD -DNOMINMAX ClipPlane.cc -o ../obj/ClipPlane.o

g++ -c -std=c++17 -g  -O0 -I. -D_REENTRANT  -fopenmp -D_GLIBCXX_PARALLEL -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -MMD -DNOMINMAX ColourGroup.cc -o ../obj/ColourGroup.o

[log skipped]

g++ -c -std=c++17 -g  -O0 -I. -D_REENTRANT  -fopenmp -D_GLIBCXX_PARALLEL -I/usr/local/include -I/usr/local/include/FL/images -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -MMD -DNOMINMAX trimesh.cc -o ../obj/trimesh.o

g++  -o meshalyzer ../obj/AuxGrid.o ../obj/ClipPlane.o ../obj/ColourGroup.o ../obj/Colourscale.o ../obj/Connection.o ../obj/CutSurfaces.o ../obj/DataOpacity.o ../obj/DeadDataGUI.o ../obj/Directionizer.o ../obj/DrawingObjects.o ../obj/FileType.o ../obj/Fl_Gl_Tb_Window.o ../obj/FlyBy.o ../obj/Frame.o ../obj/Graph.o ../obj/Hexahedron.o ../obj/HiLiteWinInfo.o ../obj/IGBheader.o ../obj/IsoLines.o ../obj/IsoSurface.o ../obj/Matrix4x4.o ../obj/ModInt.o ../obj/Model.o ../obj/MyValueInput.o ../obj/Myslider.o ../obj/Orienter.o ../obj/PNGwrite.o ../obj/PlotWin.o ../obj/Point.o ../obj/PolyGon.o ../obj/Prism.o ../obj/Pyramid.o ../obj/Quadrilateral.o ../obj/Region.o ../obj/Sequence.o ../obj/Surfaces.o ../obj/TBmeshWin.o ../obj/Tetrahedral.o ../obj/TimeLink.o ../obj/Trackball.o ../obj/Triangle.o ../obj/VecData.o ../obj/Vector3D.o ../obj/Vector4D.o ../obj/colourchoice.o ../obj/isosurf.o ../obj/legacyGL.o ../obj/main.o ../obj/plottingwin.o ../obj/render_utils.o ../obj/select_util.o ../obj/short_float.o ../obj/trimesh.o -lGLEW -lglut -L/usr/local/lib -lfltk_images -lpng -lz -lfltk_jpeg -lfltk_gl -lfltk -lXrender -lXfixes -lXext -lpthread -ldl -lm -lX11  -lGL  -lpng -lpthread -lm -lz  -fopenmp -D_GLIBCXX_PARALLEL

fltk-config --post meshalyzer

make[1]: Leaving directory '...'

ln -sf src/meshalyzer .

by (17.4k points)
I am not sure if anyone tried meshalyzer yet on Windows via the Linux subsystem.
Ed: do you know more?

2 Answers

0 votes
by (3.5k points)
selected by
 
Best answer
Hi,

I was not able to reproduce your error using WSL2 (Ubuntu 20.04). I installed the dependencies:

apt-get install freeglut3-dev lib-glew-dev libpng-dev fluid

and then ran the provided make file.

Best regards,

Jorge
0 votes
by (1.2k points)
Update:

meshalyzer compiles fine on Macs, so I guess the problem is solved for now. My best guess is that the compiler wasn't able to find some dependency locations, which I should be able to fix. Thank you all for getting back to me.
Welcome to openCARP Q&A. Ask questions and receive answers from other members of the community. For best support, please use appropriate TAGS!
architecture, carputils, documentation, experiments, installation-containers-packages, limpet, slimfem, website, governance
...