vsg-dev/vsgXchange

mingw build fails with src/osg/ShaderUtils.cpp:204:15: error: 'readFile' is not a member of 'vsg'; did you mean 'read_line

Closed this issue · 2 comments

Cross building vsgXchange with gcc for Windows with recent libvsg (from commit ce5b8f9) fails with the following error:

[  157s] cd /home/abuild/rpmbuild/BUILD/vsgXchange-0.0.1+20220706+git.3fa705e/src && /usr/bin/x86_64-w64-mingw32-g++  -DBASISD_SUPPORT_FXT1=0 -DBASISU_NO_ITERATOR_DEBUG_LEVEL -DKHRONOS_STATIC -DKTX_FEATURE_KTX1 -DKTX_FEATURE_KTX2 -DLIBKTX -DUSE_FREETYPE -DUSE_GDAL -DVSG_SHARED_LIBRARY -DvsgXchange_EXPORTS @CMakeFiles/vsgXchange.dir/includes_CXX.rsp -O2 -g -pipe -Wall -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -O2 -g -DNDEBUG   -Wall -Wparentheses -Wno-long-long -Wno-import -Wreturn-type -Wmissing-braces -Wunknown-pragmas -Wmaybe-uninitialized -Wshadow -Wunused -Wno-misleading-indentation -Wextra -std=gnu++17 -o CMakeFiles/vsgXchange.dir/osg/ShaderUtils.cpp.obj -c /home/abuild/rpmbuild/BUILD/vsgXchange-0.0.1+20220706+git.3fa705e/src/osg/ShaderUtils.cpp
[  157s] /home/abuild/rpmbuild/BUILD/vsgXchange-0.0.1+20220706+git.3fa705e/src/osg/ShaderUtils.cpp: In function 'std::string osg2vsg::readGLSLShader(const string&, const uint32_t&, const uint32_t&)':
[  157s] /home/abuild/rpmbuild/BUILD/vsgXchange-0.0.1+20220706+git.3fa705e/src/osg/ShaderUtils.cpp:204:15: error: 'readFile' is not a member of 'vsg'; did you mean 'read_line'?
[  158s]   204 |     if (!vsg::readFile(sourceBuffer, filename))
[  158s]       |               ^~~~~~~~
[  158s]       |               read_line
[  158s] make[2]: *** [src/CMakeFiles/vsgXchange.dir/build.make:518: src/CMakeFiles/vsgXchange.dir/osg/ShaderUtils.cpp.obj] Error 1
[  158s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/vsgXchange-0.0.1+20220706+git.3fa705e'
[  158s] make[2]: *** Waiting for unfinished jobs....

You need to update vsgXchange, the osg2vsg functionality has been moved out to osg2vsg, and vsgXchange no longer has ShaderUtils.cpp

Thanks for this tip - The sources to cross build vsgXchange to OBS are synced every day from github, but today it's still on commit 3fa705e - seems something is broken in the OBS sync.