#342 1.3.2 compile failure

v1.0_(example)
open
nobody
None
1
2014-04-27
2013-02-09
Dan Kokron
No

I get the following compile failure while building meshlab-1.3.2
using gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)
under Linux 3.7.5-201.fc18.x86_64

See possible workaround below.

g++ -c -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SCRIPT_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtOpenGL -I/usr/include/QtXml -I/usr/include/QtXmlPatterns -I/usr/include/QtScript -I/usr/include -I../.. -I../../../../vcglib -I../../external/glew-1.7.0/include -I/usr/X11R6/include -I. -o filter_plymc.o filter_plymc.cpp
In file included from plymc.h:46:0,
from filter_plymc.cpp:28:
../../../../vcglib/wrap/ply/plystuff.h: In function ‘bool vcg::ply::CheckCacheDirectory(const char)’:
../../../../vcglib/wrap/ply/plystuff.h:123:18: error: ‘access’ was not declared in this scope
../../../../vcglib/wrap/ply/plystuff.h: In function ‘bool vcg::ply::CheckCacheTime(const char
, const char*)’:
../../../../vcglib/wrap/ply/plystuff.h:135:20: error: ‘access’ was not declared in this scope
../../../../vcglib/wrap/ply/plystuff.h:136:20: error: ‘access’ was not declared in this scope
../../../../vcglib/wrap/ply/plystuff.h:145:9: error: ‘close’ was not declared in this scope
In file included from ../../../../vcglib/vcg/complex/algorithms/create/extended_marching_cubes.h:42:0,
from plymc.h:49,
from filter_plymc.cpp:28:

Adding #include <unistd.h> to the non-WIN32 section does allow the code to build. I have no idea what the consequences are. See attached output from 'diff'.

1 Attachments

Discussion

  • Paolo Cignoni
    Paolo Cignoni
    2014-04-03

    corrected in current svn.

     
  • Gregory Smith
    Gregory Smith
    2014-04-27

    Note: this fix didn't make it into MeshLabSrc_AllInc_v133.tgz