Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build error on Windows old rel (gcc 4.9.3) #2

Closed
jefferis opened this issue Aug 1, 2020 · 3 comments
Closed

Fix build error on Windows old rel (gcc 4.9.3) #2

jefferis opened this issue Aug 1, 2020 · 3 comments

Comments

@jefferis
Copy link
Collaborator

jefferis commented Aug 1, 2020

No description provided.

@jefferis jefferis changed the title Fix buiu Fix build error on Windows old rel (gcc 4.9.3) Aug 1, 2020
@jefferis
Copy link
Collaborator Author

jefferis commented Aug 1, 2020

There were some code sections in the Draco lib conditioned on the DRACO_OLD_GCC, which I was not setting.

One of them in stdio_file_writer.cc caused trouble as below. Rather than using Makevars, I figured that it would be easier to put it in a test in draco_features.h.

d:/Compiler/gcc-4.9.3/mingw_32/bin/g++ -std=gnu++11  -I"D:/RCompile/recent/R-3.6.3/include" -DNDEBUG -I. -I"d:/RCompile/CRANpkg/lib/3.6/Rcpp/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c sequential_quantization_attribute_decoder.cc -o sequential_quantization_attribute_decoder.o
d:/Compiler/gcc-4.9.3/mingw_32/bin/g++ -std=gnu++11  -I"D:/RCompile/recent/R-3.6.3/include" -DNDEBUG -I. -I"d:/RCompile/CRANpkg/lib/3.6/Rcpp/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c shannon_entropy.cc -o shannon_entropy.o
d:/Compiler/gcc-4.9.3/mingw_32/bin/g++ -std=gnu++11  -I"D:/RCompile/recent/R-3.6.3/include" -DNDEBUG -I. -I"d:/RCompile/CRANpkg/lib/3.6/Rcpp/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c stdio_file_reader.cc -o stdio_file_reader.o
d:/Compiler/gcc-4.9.3/mingw_32/bin/g++ -std=gnu++11  -I"D:/RCompile/recent/R-3.6.3/include" -DNDEBUG -I. -I"d:/RCompile/CRANpkg/lib/3.6/Rcpp/include"   -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c stdio_file_writer.cc -o stdio_file_writer.o
stdio_file_writer.cc: In static member function 'static std::unique_ptr<draco::FileWriterInterface> draco::StdioFileWriter::Open(const string&)':
stdio_file_writer.cc:47:10: error: cannot bind 'std::unique_ptr<draco::StdioFileWriter>' lvalue to 'std::unique_ptr<draco::StdioFileWriter>&&'
   return file;
          ^
In file included from D:/Compiler/gcc-4.9.3/mingw_32/i686-w64-mingw32/include/c++/memory:81:0,
                 from draco/io/stdio_file_writer.h:6,
                 from stdio_file_writer.cc:1:
D:/Compiler/gcc-4.9.3/mingw_32/i686-w64-mingw32/include/c++/bits/unique_ptr.h:220:2: note: initializing argument 1 of 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = draco::StdioFileWriter; _Ep = std::default_delete<draco::StdioFileWriter>; <template-parameter-2-3> = void; _Tp = draco::FileWriterInterface; _Dp = std::default_delete<draco::FileWriterInterface>]'
  unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
  ^
stdio_file_writer.cc:51:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: *** [stdio_file_writer.o] Error 1
make[1]: Leaving directory `/cygdrive/d/temp/Rtmp4QMo19/R.INSTALL1a5fc58e5723e/dracor/src-i386'
ERROR: compilation failed for package 'dracor'
* removing 'd:/Rcompile/CRANpkg/lib/3.6/dracor'

@jefferis
Copy link
Collaborator Author

jefferis commented Aug 2, 2020

So the win-oldrelease build error was actually fixed by removing one of the excess source files.

@jefferis
Copy link
Collaborator Author

jefferis commented Aug 2, 2020

But also added support for the DRACO_OLD_GCC macro in f9f81b9

@jefferis jefferis closed this as completed Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant