Environment:
OS: Fedora Release 26
Compiler: g++ (GCC) 7.2.1
CEGUI: 0.8.7
Configured with: cmake .. -DCEGUI_BUILD_RENDERER_OPENGL=OFF -DCEGUI_BUILD_RENDERER_OPENGL3=ON -DCEGUI_USE_EPOXY=ON -DCEGUI_USE_GLEW=OFF
Epoxy: Latest version from https://github.com/yaronct/libepoxy
PowerVR Graphics SDK and Tools: v2017_R2 from
https://community.imgtec.com/developers/powervr/graphics-sdk/
Code:
CEGUI::OpenGL3Renderer& myRenderer = CEGUI::OpenGL3Renderer::bootstrapSystem();
Error:
CEGUI::RendererException in function 'void
CEGUI::OpenGLInfo::initTypeAndVer()'
(/home/jay/tmp/cegui/cegui-0.8.7/cegui/src/RendererModules/OpenGL/GL.cpp:88)
: Failed to obtain desktop OpenGL version. terminate called after
throwing an instance of 'CEGUI::RendererException' what():
CEGUI::RendererException in function 'void
CEGUI::OpenGLInfo::initTypeAndVer()'
(/home/jay/tmp/cegui/cegui-0.8.7/cegui/src/RendererModules/OpenGL/GL.cpp:88)
: Failed to obtain desktop OpenGL version.
Include from header file:
#include <epoxy/gl.h>
Just in case this is helpful. Here is the output of the cmake to show what it was able to find and what it was not:
sudo cmake .. -DCEGUI_BUILD_RENDERER_OPENGL=OFF -DCEGUI_BUILD_RENDERER_OPENGL3=ON -DCEGUI_USE_EPOXY=ON -DCEGUI_USE_GLEW=OFF
CMake Deprecation Warning at CMakeLists.txt:6 (cmake_policy):
The OLD behavior for policy CMP0017 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 7.2.1
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PCRE: /usr/lib64/libpcre.so
-- Found FREETYPE: /usr/lib64/libfreetype.so
-- Found MINIZIP: /usr/lib64/libminizip.so
-- Found PkgConfig: /bin/pkg-config (found version "1.3.12")
-- Checking for module 'fribidi'
-- Found fribidi, version 0.19.7
-- Found FRIBIDI: TRUE
-- Looking for iconv
-- Looking for iconv - found
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Found GLEW: /usr/lib64/libGLEW.so
-- Found GLM: /usr/include
-- Could NOT find GLFW (missing: GLFW_H_PATH)
-- Found GLFW3: /usr/lib64/libglfw.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found SDL2: /usr/lib64/libSDL2.so;-lpthread
-- Found SDL2IMAGE: /usr/lib64/libSDL2_image.so
-- Could NOT find DIRECTXSDK (missing: DIRECTXSDK_LIB_PATH DIRECTXSDK_H_PATH DIRECTXSDK_MAX_D3D)
-- Could NOT find D3DX11EFFECTS (missing: D3DX11EFFECTS_LIB D3DX11EFFECTS_H_PATH)
-- Found IRRLICHT: /usr/lib64/libIrrlicht.so
-- Could NOT find OGRE (missing: OGRE_LIB OGRE_H_PATH OGRE_H_BUILD_SETTINGS_PATH)
-- Found OIS: /usr/lib64/libOIS.so
-- Could NOT find DIRECTFB (missing: DIRECTFB_LIB DIRECTFB_H_PATH)
-- Could NOT find OPENGLES (missing: OPENGLES_LIB OPENGLES_H_PATH)
-- Found EPOXY: /usr/local/lib64/libepoxy.so
-- Found EXPAT: /usr/lib64/libexpat.so
-- Could NOT find XERCESC (missing: XERCESC_LIB XERCESC_H_PATH)
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.4")
-- Found TINYXML: /usr/lib64/libtinyxml.so
-- Performing Test TINYXML_API_TEST
-- Performing Test TINYXML_API_TEST - Success
-- Could NOT find RAPIDXML (missing: RAPIDXML_H_PATH)
-- Could NOT find IL (missing: IL_LIB IL_H_PATH)
-- Could NOT find ILU (missing: ILU_LIB)
-- Found FREEIMAGE: /usr/lib64/libfreeimage.so
-- Found SILLY: /usr/lib64/libSILLY.so
-- Could NOT find CORONA (missing: CORONA_LIB CORONA_H_PATH)
-- Could NOT find PVRTOOLS (missing: PVRTOOLS_LIB PVRTOOLS_H_PATH)
-- Found LUA51: /usr/lib64/liblua.so
-- Found TOLUAPP: /usr/lib64/libtolua++.so
-- Found PythonInterp: /bin/python (found version "2.7.14")
-- Found PythonLibs: //lib64/libpython2.7.so (found suitable exact version "2.7.14")
-- Boost version: 1.63.0
-- Found the following Boost libraries:
-- python
-- unit_test_framework
-- system
-- timer
-- Found Doxygen: /bin/doxygen (found version "1.8.13") found components: doxygen missing components: dot
-- Found GTK2_GTK: /usr/lib64/libgtk-x11-2.0.so
-- Configuring done
-- Generating done
-- Build files have been written to: xxx
I was able to resolve this issue and I wanted to share what worked for me.
The issue was that Epoxy was not finding the active context. OSG does not currently set the context that you have open ( which might be your only context ) as the current context. You have to manually set it as the current context as follows:
// You will need to have realized the viewer at least once
viewer.realize();
// You can get your camera's primary context by calling getGraphicsContext
// on it. I then also called realize on it. I'm not 100% certain if this
// is necessary, but it seemed to .
viewer.getCamera()->getGraphicsContext()->realize();
// Set the GraphicsContext as the current GraphicsContext.
viewer.getCamera()->getGraphicsContext()->makeCurrent();
Epoxy now sees the current context and this error goes away.
Related
I'm new to audio programming in Ubuntu 20.04 and was looking at open source audio libraries and found OpenAL-Soft. I'm following this tutorial online https://www.youtube.com/watch?v=kWQM1iQ1W0E&ab_channel=Code%2CTech%2CandTutorials
The basic code used is
ALCdevice* p_ALCDevice = alcOpenDevice( nullptr ); //nullptr = gets default device
if( !p_ALCDevice )
throw( "failed to get sound device" );
When I do this it returns
[ALSOFT] (WW) Failed to open playback device: Could not open /dev/dsp: No
such file or directory
[ALSOFT] (WW) Error generated on device (nil), code 0xa004
terminate called after throwing an instance of 'char const*'
Aborted (core dumped)
When using
const ALCchar * devices = alcGetString( NULL, ALC_DEVICE_SPECIFIER );
and
printf( "%s", devices );
it outputs
OpenAL Soft
not even sure what this output means and what it has to do with my audio devices. Anyone know whats going on?
When reinstalling using cmake
- Checking for module 'dbus-1'
-- No package 'dbus-1' found
-- Could NOT find DBus1 (missing: DBus1_INCLUDE_DIRS DBus1_LIBRARIES)
-- Checking for module 'libpipewire-0.3>=0.3.23'
-- No package 'libpipewire-0.3' found
-- Could NOT find AudioIO (missing: AUDIOIO_INCLUDE_DIR)
-- Could NOT find OpenSL (missing: OPENSL_LIBRARY OPENSL_INCLUDE_DIR OPENSL_ANDROID_INCLUDE_DIR)
-- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
-- Could NOT find MySOFA (missing: MYSOFA_LIBRARY MYSOFA_INCLUDE_DIR)
-- Could NOT find Qt5Widgets
-- Could NOT find SndFile (missing: SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
-- Could NOT find SDL2 (missing: SDL2_LIBRARY SDL2_INCLUDE_DIR)
--
-- Building OpenAL with support for the following backends:
-- ALSA, OSS, SndIO (linked), PortAudio, PulseAudio, JACK, WaveFile, Null
--
-- Building with support for CPU extensions:
-- Default, SSE, SSE2, SSE3, SSE4.1
--
-- Embedding HRTF datasets
--
-- Installing library and headers
-- Installing sample configuration
-- Installing HRTF data files
-- Installing AmbDec presets
--
-- Building utility programs
--
-- Building example programs
--
-- Configuring done
-- Generating done
-- Build files have been written to: /home/brian/openal-soft/build
OS: Windows 10
Compiler: Visual Studio 2019
SOCI Version: 4.0.2
PostgreSQL Version: 13
CMake VersionL 3.20.3
I'm not too familiar with CMake so bear with me if I'm doing something uninformed and incorrectly.
Steps:
Download and execute postgresql-13.3-2-windows-x64.exe
Download and execute pgadmin4-5.3-x64.exe
Download and extract SOCI 4.0.2
Create build directory in SOCI 4.0.2
Call the following from cmd in the build directory:
cmake -G "Visual Studio 16 2019" .. -DWITH_BOOST=OFF -DWITH_POSTGRESQL=ON -DPOSTGRESQL_INCLUDE_DIR:STRING="c:/Program Files/PostgreSQL/13/include" -DPOSTGRESQL_LIBRARIES:STRING="c:/Program Files/PostgreSQL/13/lib" -DSOCI_STATIC=ON -DSOCI_SHARED=OFF
I got the following output
CMake Deprecation Warning at CMakeLists.txt:13 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
-- The C compiler identification is MSVC 19.29.30037.0
-- The CXX compiler identification is MSVC 19.29.30037.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test SOCI_HAVE_VISIBILITY_SUPPORT
-- Performing Test SOCI_HAVE_VISIBILITY_SUPPORT - Failed
-- Looking for _M_AMD64
-- Looking for _M_AMD64 - found
-- Looking for _M_IX86
-- Looking for _M_IX86 - not found
-- Configuring SOCI:
-- SOCI_VERSION = 4.0.2
-- SOCI_ABI_VERSION = 4_0
-- SOCI_SHARED = OFF
-- SOCI_STATIC = ON
-- SOCI_TESTS = ON
-- SOCI_ASAN = OFF
-- SOCI_CXX11 = OFF
-- LIB_SUFFIX = 64
-- Looking for SOCI dependencies:
-- Threads:
-- CMAKE_THREAD_LIBS_INIT =
-- Boost: disabled, since WITH_BOOST=OFF
-- MySQL:
-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION
-- Performing Test HAVE_MYSQL_OPT_EMBEDDED_CONNECTION - Failed
-- MySQL not found.
-- MySQL Embedded not found.
-- WARNING: MySQL libraries not found, some features will be disabled.
-- ODBC:
-- ODBC_INCLUDE_DIR =
-- ODBC_LIBRARIES = odbc32.lib
-- Oracle:
-- ORACLE_HOME=
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (ORACLE)
does not match the name of the calling package (Oracle). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindOracle.cmake:84 (find_package_handle_standard_args)
cmake/dependencies/Oracle.cmake:3 (find_package)
cmake/SociDependencies.cmake:79 (include)
CMakeLists.txt:129 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- None of the supported Oracle versions (19;18;12;11;10) could be found, consider updating ORACLE_VERSIONS if the version you use is not among them.
-- WARNING: Oracle libraries not found, some features will be disabled.
-- PostgreSQL:
-- WARNING: PostgreSQL libraries not found, some features will be disabled.
-- SQLite3:
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (SQLITE3)
does not match the name of the calling package (SQLite3). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindSQLite3.cmake:57 (find_package_handle_standard_args)
cmake/dependencies/SQLite3.cmake:3 (find_package)
cmake/SociDependencies.cmake:79 (include)
CMakeLists.txt:129 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- SQLite3 not found (SQLITE3_INCLUDE_DIR=SQLITE3_INCLUDE_DIR-NOTFOUND, SQLITE3_LIBRARY=SQLITE3_LIBRARY-NOTFOUND.
-- WARNING: SQLite3 libraries not found, some features will be disabled.
-- Firebird:
-- SOCI_FIREBIRD_EMBEDDED = OFF
-- WARNING: Firebird libraries not found, some features will be disabled.
-- DB2:
-- WARNING: DB2 libraries not found, some features will be disabled.
-- Configuring SOCI core library:
-- SOCI_CORE_TARGET = soci_core
-- SOCI_CORE_TARGET_OUTPUT_NAME = soci_core_4_0
-- SOCI_CORE_DEPS_LIBS =
-- SOCI_CORE_INCLUDE_DIRS = C:/Users/Hbagh/Downloads/soci-4.0.2/build C:/Users/Hbagh/Downloads/soci-4.0.2/include C:/Users/Hbagh/Downloads/soci-4.0.2/build/include C:/Users/Hbagh/Downloads/soci-4.0.2/include/private C:/Users/Hbagh/Downloads/soci-4.0.2/build/src/core
-- WITH_BOOST = OFF
-- COMPILE_DEFINITIONS = _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNING _SCL_SECURE_NO_WARNINGS SOCI_ABI_VERSION="4_0" DBUG_OFF SOCI_LIB_PREFIX="soci_" SOCI_LIB_SUFFIX=".dll" SOCI_DEBUG_POSTFIX=""
--
-- Configuring SOCI backend libraries:
-- MySQL not found.
-- MySQL Embedded not found.
-- ORACLE_HOME=
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (ORACLE)
does not match the name of the calling package (Oracle). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindOracle.cmake:84 (find_package_handle_standard_args)
src/backends/CMakeLists.txt:17 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- None of the supported Oracle versions (19;18;12;11;10) could be found, consider updating ORACLE_VERSIONS if the version you use is not among them.
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (SQLITE3)
does not match the name of the calling package (SQLite3). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
cmake/modules/FindSQLite3.cmake:57 (find_package_handle_standard_args)
src/backends/CMakeLists.txt:17 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- SQLite3 not found (SQLITE3_INCLUDE_DIR=SQLITE3_INCLUDE_DIR-NOTFOUND, SQLITE3_LIBRARY=SQLITE3_LIBRARY-NOTFOUND.
-- Empty - SOCI backend skeleton for new backends development
-- SOCI_EMPTY = ON
-- SOCI_EMPTY_TARGET = soci_empty
-- SOCI_EMPTY_OUTPUT_NAME = soci_empty_4_0
-- SOCI_EMPTY_COMPILE_DEFINITIONS = _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNING _SCL_SECURE_NO_WARNINGS SOCI_ABI_VERSION="4_0" DBUG_OFF DBUG_OFF
-- SOCI_EMPTY_INCLUDE_DIRECTORIES = C:/Users/Hbagh/Downloads/soci-4.0.2/build C:/Users/Hbagh/Downloads/soci-4.0.2/include C:/Users/Hbagh/Downloads/soci-4.0.2/build/include C:/Users/Hbagh/Downloads/soci-4.0.2/include/private C:/Users/Hbagh/Downloads/soci-4.0.2/include/private
-- ODBC - SOCI backend for ODBC
-- SOCI_ODBC = ON
-- SOCI_ODBC_TARGET = soci_odbc
-- SOCI_ODBC_OUTPUT_NAME = soci_odbc_4_0
-- SOCI_ODBC_COMPILE_DEFINITIONS = _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNING _SCL_SECURE_NO_WARNINGS SOCI_ABI_VERSION="4_0" DBUG_OFF DBUG_OFF
-- SOCI_ODBC_INCLUDE_DIRECTORIES = C:/Users/Hbagh/Downloads/soci-4.0.2/build C:/Users/Hbagh/Downloads/soci-4.0.2/include C:/Users/Hbagh/Downloads/soci-4.0.2/build/include C:/Users/Hbagh/Downloads/soci-4.0.2/include/private C:/Users/Hbagh/Downloads/soci-4.0.2/include/private
--
-- Configuring SOCI tests:
-- SOCI_EMPTY_TEST_CONNSTR = dummy
-- SOCI_ODBC_TEST_ACCESS_CONNSTR = FILEDSN=C:/Users/Hbagh/Downloads/soci-4.0.2/tests/odbc/test-access.dsn
-- SOCI_ODBC_TEST_MSSQL_CONNSTR = FILEDSN=C:/Users/Hbagh/Downloads/soci-4.0.2/tests/odbc/test-mssql.dsn
-- SOCI_ODBC_TEST_MYSQL_CONNSTR = FILEDSN=C:/Users/Hbagh/Downloads/soci-4.0.2/tests/odbc/test-mysql.dsn
-- SOCI_ODBC_TEST_POSTGRESQL_CONNSTR = FILEDSN=C:/Users/Hbagh/Downloads/soci-4.0.2/tests/odbc/test-postgresql-win64.dsn
-- ODBC DB2 test disabled.
--
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
POSTGRESQL_LIBRARIES
-- Build files have been written to: C:/Users/Hbagh/Downloads/soci-4.0.2/build
The following stands out to me:
-- PostgreSQL:
-- WARNING: PostgreSQL libraries not found, some features will be disabled.
CMake Warning:
Manually-specified variables were not used by the project:
POSTGRESQL_LIBRARIES
This refers to the original question posted by Tom Doodler, and answered by Norbert Boros, on the same topic. I am also trying to get the MySQL Connector/C or /C++ to work. Using MS Visual Studio 2017. Following the steps in the answer, did all the steps till :
Run this command ( assuming you want the STATIC DEBUG ):
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Debug -DBUILD_STATIC=true -DBUNDLE_DEPENDENCIES=ON -DSTATIC_MSVCRT=OFF -DWITH_JDBC=ON
The output on the screen says:
Configuring incomplete, errors occurred! in the last few lines. No "MYSQLCPPCONN.sln" either.
I have a pdf of the output but do not know how to attach it here. The output says three files are missing and one test failed, these are towards the end of the file, highlighted. Of course, their could be more problems that I could not identify, being a green thumb.
Any ideas about how to address this ?
I found Protobuf.sln at E:\MySQL C++ Connector Unresolved Dependencies (VS 2015) *\mysql-connector-cpp-master\cdk\protobuf*. would this be of any use ?
Here is part of the output where problems occurred (there could be more problems elsewhere, have no idea. Also, had to format the output as "code", a posting requirement on the forum ?):
-- Looking for pthread.h
-- Looking for pthread.h - not found
.
.
-- Performing Test HAVE_STATIC_ASSERT - Success
-- Performing Test HAVE_IS_SAME
-- Performing Test HAVE_IS_SAME - Failed
-- Performing Test HAVE_SHARED_PTR
-- Performing Test HAVE_SHARED_PTR - Success
-- Performing Test HAVE_SYSTEM_ERROR
-- Performing Test HAVE_SYSTEM_ERROR - Success
-- Check size of wchar_t
-- Check size of wchar_t - done
-- Looking for sys/endian.h
-- Looking for sys/endian.h - not found
-- Looking for sys/byteorder.h
-- Looking for sys/byteorder.h - not found
Wrote configuration header: E:/MySQL C++ Connector Unresolved Dependencies (VS 2
015)/mysql-connector-cpp-master/cdk/include/mysql/cdk/config.h
Legacy library soversion: 7
Looking for MySQL Client library:
CMake Error at jdbc/cmake/DepFindMySQL.cmake:128 (message):
Could not find MySQL headers at:
Point at MySQL client library location using WITH_MYSQL or
MYSQL_INCLUDE_DIR, MYSQL_LIB_DIR settings.
Call Stack (most recent call first):
jdbc/cmake/DepFindMySQL.cmake:555 (main)
cdk/cmake/dependency.cmake:42 (include)
jdbc/CMakeLists.txt:147 (find_dependency)
-- Configuring incomplete, errors occurred!
As the title says. I'm trying to compile the code found on Google's Github. I don't know much about CMake. First I ran the following command as per instructions:
git submodule update --init --recursive
I got the following error message: fatal: not a git repository (or any of the parent directories): .git. After that I tried to run the following build command:
cmake -DCRC32C_BUILD_TESTS=0 -DCRC32C_BUILD_BENCHMARKS=0 .. && make all install
The output is shown below:
l install
-- Building for: Visual Studio 16 2019
-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Performing Test CRC32C_HAVE_NO_DEPRECATED
-- Performing Test CRC32C_HAVE_NO_DEPRECATED - Failed
-- Performing Test CRC32C_HAVE_NO_SIGN_COMPARE
-- Performing Test CRC32C_HAVE_NO_SIGN_COMPARE - Failed
-- Performing Test CRC32C_HAVE_NO_UNUSED_PARAMETER
-- Performing Test CRC32C_HAVE_NO_UNUSED_PARAMETER - Failed
-- Performing Test CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS
-- Performing Test CRC32C_HAVE_NO_MISSING_FIELD_INITIALIZERS - Failed
-- Performing Test HAVE_BUILTIN_PREFETCH
-- Performing Test HAVE_BUILTIN_PREFETCH - Failed
-- Performing Test HAVE_MM_PREFETCH
-- Performing Test HAVE_MM_PREFETCH - Success
-- Performing Test HAVE_SSE42
-- Performing Test HAVE_SSE42 - Success
-- Performing Test HAVE_ARM64_CRC32C
-- Performing Test HAVE_ARM64_CRC32C - Failed
-- Performing Test HAVE_STRONG_GETAUXVAL
-- Performing Test HAVE_STRONG_GETAUXVAL - Failed
-- Performing Test HAVE_WEAK_GETAUXVAL
-- Performing Test HAVE_WEAK_GETAUXVAL - Failed
CMake Error at CMakeLists.txt:184 (add_subdirectory):
The source directory
C:/Source/crc32c-master/third_party/glog
does not contain a CMakeLists.txt file.
-- Configuring incomplete, errors occurred!
See also "C:/Source/crc32c-master/build/CMakeFiles/CMakeOutput.log".
See also "C:/Source/crc32c-master/build/CMakeFiles/CMakeError.log".
I looked at the error log, but didn't get much help there. the third_party/glog directory is empty, so there wasn't any CMakeLists.txt file like there should have been. (The /benchmark and /googletest subdirectories under /third_party were also empty. ?)
Has anybody successfully built this using Visual Studio? If so, how?
I don't think it matters much, but I'm using VS2019 Community Edition 16.2.5 and CMake 3.15.2. TIA.
Alan Birtles gave me the correct answer.
I had just downloaded the .zip file, when I needed to do a git clone of the files. After that, everything worked like it was supposed to. Big thanks to Alan Birtles.
I'm trying to get llvm/clang built on my Windows 10 box under CYGWIN. I've been working on this for a bit and have resolved many of the errors myself, but now I'm hitting one that I can't find any resources on. I get an error that says CLANG_TABLEGEN_EXE not set. Below is the full output from a fresh build. Any help is much appreciated.
C:\cygwin64\usr\src\llvm-build>cmake -G "Unix Makefiles" ../llvm
-- No build type selected, default to Debug
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for dirent.h
-- Looking for dirent.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for limits.h
-- Looking for limits.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc.h
-- Looking for malloc.h - found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - not found
-- Looking for ndir.h
-- Looking for ndir.h - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for sys/dir.h
-- Looking for sys/dir.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/ndir.h
-- Looking for sys/ndir.h - not found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for utime.h
-- Looking for utime.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - not found
-- Looking for mach-o/dyld.h
-- Looking for mach-o/dyld.h - not found
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Performing Test HAVE_CXXABI_H
-- Performing Test HAVE_CXXABI_H - Success
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Looking for compress2 in z
-- Looking for compress2 in z - not found
-- Looking for setupterm in tinfo
-- Looking for setupterm in tinfo - not found
-- Looking for setupterm in terminfo
-- Looking for setupterm in terminfo - not found
-- Looking for setupterm in curses
-- Looking for setupterm in curses - not found
-- Looking for setupterm in ncurses
-- Looking for setupterm in ncurses - not found
-- Looking for setupterm in ncursesw
-- Looking for setupterm in ncursesw - not found
-- Looking for xar_open in xar
-- Looking for xar_open in xar - not found
-- Looking for arc4random
-- Looking for arc4random - found
-- Looking for backtrace
-- Looking for backtrace - not found
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for sigaltstack
-- Looking for sigaltstack - found
-- Looking for writev
-- Looking for writev - found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - not found
-- Looking for mkdtemp
-- Looking for mkdtemp - found
-- Looking for mkstemp
-- Looking for mkstemp - found
-- Looking for mktemp
-- Looking for mktemp - found
-- Looking for closedir
-- Looking for closedir - found
-- Looking for opendir
-- Looking for opendir - found
-- Looking for readdir
-- Looking for readdir - found
-- Looking for getcwd
-- Looking for getcwd - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for realpath
-- Looking for realpath - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for srand48
-- Looking for srand48 - found
-- Looking for lrand48
-- Looking for lrand48 - found
-- Looking for drand48
-- Looking for drand48 - found
-- Looking for strtoll
-- Looking for strtoll - found
-- Looking for strtoq
-- Looking for strtoq - not found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for dlerror
-- Looking for dlerror - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Performing Test HAVE_INT64_T
-- Performing Test HAVE_INT64_T - Success
-- Performing Test HAVE_UINT64_T
-- Performing Test HAVE_UINT64_T - Success
-- Performing Test HAVE_U_INT64_T
-- Performing Test HAVE_U_INT64_T - Success
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG
-- Performing Test SUPPORTS_NO_VARIADIC_MACROS_FLAG - Success
-- Performing Test HAS_MAYBE_UNINITIALIZED
-- Performing Test HAS_MAYBE_UNINITIALIZED - Success
-- Target triple: x86_64-unknown-cygwin
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Sphinx disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test C_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Failed
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG
-- Performing Test CXX_SUPPORTS_DELETE_NON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME
-- Performing Test C_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME
-- Performing Test CXX_SUPPORTS_WERROR_DATE_TIME - Success
-- Performing Test CXX_SUPPORTS_CXX11
-- Performing Test CXX_SUPPORTS_CXX11 - Success
-- Found PythonInterp: /usr/bin/python3.6 (found version "3.6.1")
-- Constructing LLVMBuild project information
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting AArch64
-- Targeting AMDGPU
-- Targeting ARM
-- Targeting BPF
-- Targeting Hexagon
-- Targeting Mips
-- Targeting MSP430
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting X86
-- Targeting XCore
-- Clang version: 3.9.1
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG
-- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- SampleAnalyzerPlugin ignored -- Loadable modules not supported on this platform.
-- PrintFunctionNames ignored -- Loadable modules not supported on this platform.
-- AnnotateFunctions ignored -- Loadable modules not supported on this platform.
CMake Error at cmake/modules/TableGen.cmake:13 (message):
CLANG_TABLEGEN_EXE not set
Call Stack (most recent call first):
tools/clang/cmake/modules/AddClang.cmake:21 (tablegen)
tools/include/clang/AST/CMakeLists.txt:1 (clang_tablegen)
-- Configuring incomplete, errors occurred!
See also "/usr/src/llvm-build/CMakeFiles/CMakeOutput.log".
See also "/usr/src/llvm-build/CMakeFiles/CMakeError.log".
So, I noticed that under tools/include - the cgywin version of the llvm source already includes clang. As such, I scrapped my modified directory - for I had followed the instructions on the llvm website of getting the clang source code and putting it under tools/clang.
After restoring the unmodified llvm source code, I was able to finally get cmake to work!