Neopallium/lua-zmq — Issue #24: Failed to build in mingw
Author: andrewstarks
Created: 2012-02-11 01:48:34+00:00
State: open

Hey all,

I'm attempting an install on Windows 7 and I followed your instructions for XP. After much, much trial and error, I'm to the point now where I can run:

cmake -G "MSYS Makefiles" -D ZMQ_PATH=c:/zeromq ..

It runs without error. I run "make" and get the following output:
============================================================
$ make
"/c/Program Files (x86)/CMake 2.8/bin/cmake.exe" -H/C/src/lua-zmq -B/C/src/lua-z
mq/build --check-build-system CMakeFiles/Makefile.cmake 0
"/c/Program Files (x86)/CMake 2.8/bin/cmake.exe" -E cmake_progress_start /C/src/
lua-zmq/build/CMakeFiles /C/src/lua-zmq/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/c/src/lua-zmq/build'
make -f CMakeFiles/lua-zmq.dir/build.make CMakeFiles/lua-zmq.dir/depend
make[2]: Entering directory `/c/src/lua-zmq/build'
"/c/Program Files (x86)/CMake 2.8/bin/cmake.exe" -E cmake_depends "MSYS Makefiles" /C/src/lua-zmq /C/src/lua-zmq/C/src/lua-zmq/build /C/src/lua-zmq/build /C/src/lua-zmq/build/CMakeFiles/lua-zmq.dir/DependInfo.cmake --color=make[2]: Leaving directory `/c/src/lua-zmq/build'
make -f CMakeFiles/lua-zmq.dir/build.make CMakeFiles/lua-zmq.dir/build
make[2]: Entering directory `/c/src/lua-zmq/build'
"/c/Program Files (x86)/CMake 2.8/bin/cmake.exe" -E cmake_progress_report /C/src
/lua-zmq/build/CMakeFiles 1
[100%] Building C object CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.obj

/C/MinGW/bin/gcc.exe -Dlua_zmq_EXPORTS @CMakeFiles/lua-zmq.dir/includes_C.rsp -Ic:/zeromq/include -o CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.obj -c /C/src/lua-zmq/src/pre_generated-zmq.nobj.c
c:/src/lua-zmq/src/pre_generated-zmq.nobj.c:194:2: error: unknown type name 'bool'
c:/src/lua-zmq/src/pre_generated-zmq.nobj.c:797:3: error: unknown type name 'bool'
c:/src/lua-zmq/src/pre_generated-zmq.nobj.c:6598:134: error: 'false' undeclared
here (not in a function)
make[2]: *** [CMakeFiles/lua-zmq.dir/src/pre_generated-zmq.nobj.c.obj] Error 1
make[2]: Leaving directory `/c/src/lua-zmq/build'
make[1]: *** [CMakeFiles/lua-zmq.dir/all] Error 2
make[1]: Leaving directory `/c/src/lua-zmq/build'
make: *** [all] Error 2

...which is less than sweet. :)

I've tried it all in the default directory and in /usr/local/ and it makes no difference. If this helps, I ran it in interactive mode and copied the settings:

Andrew Starks@WIN-E28PFBCKACQ /c/src/lua-zmq/build
$ cmake -i -G "MSYS Makefiles" -D ZMQ_PATH=c:/zeromq ..
Would you like to see advanced options? [No]:y
Please wait while cmake processes CMakeLists.txt files....

Variable Name: CMAKE_AR
Description: Path to a program.
Current Value: C:/MinGW/bin/ar.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_BUILD_TYPE
Description: Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAK
E_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_COLOR_MAKEFILE
Description: Enable/Disable color output during build.
Current Value: ON
New Value (Enter to keep current value):

Variable Name: CMAKE_C_COMPILER
Description: C compiler.
Current Value: C:/MinGW/bin/gcc.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_C_FLAGS
Description: Flags used by the compiler during all build types.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_C_FLAGS_DEBUG
Description: Flags used by the compiler during debug builds.
Current Value: -g
New Value (Enter to keep current value):

Variable Name: CMAKE_C_FLAGS_MINSIZEREL
Description: Flags used by the compiler during release minsize builds.
Current Value: -Os -DNDEBUG
New Value (Enter to keep current value):

Variable Name: CMAKE_C_FLAGS_RELEASE
Description: Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot
/Oy /Gs will produce slightly less optimized but smaller files).
Current Value: -O3 -DNDEBUG
New Value (Enter to keep current value):

Variable Name: CMAKE_C_FLAGS_RELWITHDEBINFO
Description: Flags used by the compiler during Release with Debug Info builds.
Current Value: -O2 -g
New Value (Enter to keep current value):

Variable Name: CMAKE_C_STANDARD_LIBRARIES
Description: Libraries linked by defalut with all C applications.
Current Value: -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut
32 -luuid -lcomdlg32 -ladvapi32
New Value (Enter to keep current value):

Variable Name: CMAKE_EXE_LINKER_FLAGS
Description: Flags used by the linker.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_EXE_LINKER_FLAGS_DEBUG
Description: Flags used by the linker during debug builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
Description: Flags used by the linker during release minsize builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_EXE_LINKER_FLAGS_RELEASE
Description: Flags used by the linker during release builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
Description: Flags used by the linker during Release with Debug Info builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_GNUtoMS
Description: Convert GNU import libraries to MS format (requires Visual Studio)
Current Value: OFF
New Value (Enter to keep current value):

Variable Name: CMAKE_INSTALL_PREFIX
Description: Install path prefix, prepended onto install directories.
Current Value: /usr/local
New Value (Enter to keep current value):

Variable Name: CMAKE_LINKER
Description: Path to a program.
Current Value: C:/MinGW/bin/ld.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_MAKE_PROGRAM
Description: Path to a program.
Current Value: C:/MinGW/msys/1.0/bin/make.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_MODULE_LINKER_FLAGS
Description: Flags used by the linker during the creation of modules.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_MODULE_LINKER_FLAGS_DEBUG
Description: Flags used by the linker during debug builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
Description: Flags used by the linker during release minsize builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_MODULE_LINKER_FLAGS_RELEASE
Description: Flags used by the linker during release builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
Description: Flags used by the linker during Release with Debug Info builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_NM
Description: Path to a program.
Current Value: C:/MinGW/bin/nm.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_OBJCOPY
Description: Path to a program.
Current Value: C:/MinGW/bin/objcopy.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_OBJDUMP
Description: Path to a program.
Current Value: C:/MinGW/bin/objdump.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_RANLIB
Description: Path to a program.
Current Value: C:/MinGW/bin/ranlib.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_RC_COMPILER
Description: RC compiler.
Current Value: C:/MinGW/bin/windres.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_RC_FLAGS
Description: Flags for Fortran compiler.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_SHARED_LINKER_FLAGS
Description: Flags used by the linker during the creation of dll's.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_SHARED_LINKER_FLAGS_DEBUG
Description: Flags used by the linker during debug builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
Description: Flags used by the linker during release minsize builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_SHARED_LINKER_FLAGS_RELEASE
Description: Flags used by the linker during release builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
Description: Flags used by the linker during Release with Debug Info builds.
Current Value:
New Value (Enter to keep current value):

Variable Name: CMAKE_SKIP_RPATH
Description: If set, runtime paths are not added when using shared libraries.
Current Value: NO
New Value (Enter to keep current value):

Variable Name: CMAKE_STRIP
Description: Path to a program.
Current Value: C:/MinGW/bin/strip.exe
New Value (Enter to keep current value):

Variable Name: CMAKE_USE_RELATIVE_PATHS
Description: If true, cmake will use relative paths in makefiles and projects.
Current Value: OFF
New Value (Enter to keep current value):

Variable Name: CMAKE_VERBOSE_MAKEFILE
Description: If this value is on, makefiles will be generated without the .SILEN
T directive, and all commands will be echoed to the console during the make. Th
is is useful for debugging only. With Visual Studio IDE projects all commands ar
e done without /nologo.
Current Value: FALSE
New Value (Enter to keep current value): TRUE

Variable Name: INSTALL_CMOD
Description: Directory to install Lua binary modules (configure lua via LUA_CPAT
H)
Current Value: /usr/local/lib/lua/5.1
New Value (Enter to keep current value):

Variable Name: INSTALL_LMOD
Description: Directory to install Lua source modules (configure lua via LUA_PATH
)
Current Value: /usr/local/share/lua/5.1
New Value (Enter to keep current value):

Variable Name: LUA_INCLUDE_DIR
Description: Path to a file.
Current Value: C:/MinGW/msys/1.0/local/bin
New Value (Enter to keep current value):

Variable Name: LUA_LIBRARIES
Description: Lua Libraries
Current Value: C:/MinGW/msys/1.0/local/bin/lua51.dll
New Value (Enter to keep current value):

Variable Name: LUA_LIBRARY
Description: Path to a library.
Current Value: C:/MinGW/msys/1.0/local/bin/lua51.dll
New Value (Enter to keep current value):

Variable Name: LUA_NATIVE_OBJECTS_PATH
Description: Directory to LuaNativeObjects bindings generator.
Current Value: LuaNativeObjects
New Value (Enter to keep current value):

Variable Name: USE_PRE_GENERATED_BINDINGS
Description: Set this to FALSE to re-generate bindings using LuaNativeObjects
Current Value: TRUE
New Value (Enter to keep current value):

Variable Name: ZMQ_PATH
Description: Directory to libzmq. (by default use pkg-config to detect path)
Current Value: c:/zeromq
New Value (Enter to keep current value):

Please wait while cmake processes CMakeLists.txt files....

CMake complete, run make to build project.

Andrew Starks@WIN-E28PFBCKACQ /c/src/lua-zmq/build
$ ls
CMakeCache.txt CMakeFiles Makefile cmake_install.cmake

Andrew Starks@WIN-E28PFBCKACQ /c/src/lua-zmq/build
$ make

===================

Any other info that I can provide, I'd be happy to do so.

FYI:

The instructions break is lua is not installed. Perhaps that is an assumed condition because LuaJIT without Lua is somehow incomplete? Either way, for completeness, it would be nice if the instructions assumed a bare bones install, provided that it currently starts with the installation of LuaJIT.

Thank you so much!