Prebuild flatc.exe, please :)

1,331 views
Skip to first unread message

Markus Junginger

unread,
Aug 22, 2014, 7:36:58 AM8/22/14
to flatb...@googlegroups.com
I want to use flatc on a Windows machine and setting up the toolchain is cruel. I don't want to install Visual Studio, so I gave a shot at MinGW+CMake, which isn't a pleasant experience either.

Here's what I got in the end:
s:\git\flatbuffers>cmake -G "MinGW Makefiles"
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: S:/git/flatbuffers
s:\git\flatbuffers>mingw32-make
Scanning dependencies of target flatc
[  7%] Building CXX object CMakeFiles/flatc.dir/src/idl_parser.cpp.obj
[ 15%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_cpp.cpp.obj
[ 23%] Building CXX object CMakeFiles/flatc.dir/src/idl_gen_java.cpp.obj
In file included from c:\mingw\include\direct.h:34:0,
                 from S:\git\flatbuffers\src\idl_gen_java.cpp:24:
c:\mingw\include\io.h:301:14: error: 'off64_t' does not name a type
 __CRT_INLINE off64_t lseek64 (int, off64_t, int);
              ^
c:\mingw\include\io.h:302:14: error: 'off64_t' does not name a type
 __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence) {
              ^
CMakeFiles\flatc.dir\build.make:102: recipe for target 'CMakeFiles/flatc.dir/src/idl_gen_java.cpp.obj' failed
mingw32-make[2]: *** [CMakeFiles/flatc.dir/src/idl_gen_java.cpp.obj] Error 1
CMakeFiles\Makefile2:59: recipe for target 'CMakeFiles/flatc.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/flatc.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

Again, I strongly propose offering a prebuild exe for Windows. Nevertheless, I also welcome some help on that off64_t issue.

Thanks,
Markus

Wouter van Oortmerssen

unread,
Aug 22, 2014, 2:41:57 PM8/22/14
to Markus Junginger, flatb...@googlegroups.com
You're right, I was already thinking that be a good idea, I'll make it a priority.

I'll also see if I can fix these errors :)


--
You received this message because you are subscribed to the Google Groups "FlatBuffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flatbuffers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wouter van Oortmerssen

unread,
Sep 3, 2014, 5:27:07 PM9/3/14
to Markus Junginger, flatb...@googlegroups.com
Just tried to reproduce these errors. Just downloaded a fresh copy of MinGW.

From the Msys shell, cmake -G "MSYS Makefiles"; make; ./flattests all works.

Also tried from a DOS shell, using cmake -G "MinGW Makefiles", which fails with this error: http://lists.gnu.org/archive/html/bug-make/2013-05/msg00083.html which apparently still hasn't been fixed. I'm unable to get around it.

Would suggest using the Msys shell, as it works more predictably.

Wouter van Oortmerssen

unread,
Sep 3, 2014, 7:55:00 PM9/3/14
to Markus Junginger, flatb...@googlegroups.com
Oh, and releases from now on will have a windows exe, like the last one:



Reply all
Reply to author
Forward
0 new messages