- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Dealing with Problems Compiling MySQL
Some problems with compiling MySQL could be because of not configuring properly. Hence, the solution is to reconfigure.
If CMake is run right after it was previously run, there is a possibility that it would use information that was gathered from its previous call. This information is present in CMakeCache.txt. When CMake begins, it looks for this file and reads the contents (if it exists), assuming that the information is correct. This assumption becomes wrong when the file is reconfigured.
Each time CMake is run, ‘make’ has to be executed again to recompile. The old object files from previous builds can be removed first because since they would have been compiled using different configuration options.
To prevent old object files or configuration information from being used by current installation, the following commands need to be run before re-running CMake −
shell> make clean shell> rm CMakeCache.txt
shell> devenv MySQL.sln /clean shell> del CMakeCache.txt
If it is built outside the source tree, the build directory has to be removed and recreated before rerunning CMake. On some systems, warnings may occur because of differences in system include files.
To define which C and C++ compilers to use, the CC and CXX environment variables can be defined. It has been shown below −
shell> CC=gcc shell> CXX=g++ shell> export CC CXX
To specify user’s own C and C++ compiler flags, the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS CMake options can be used.
To see what flags need to be specified by the user, mysql_config along with the −−cflags and −−cxxflags options can be invoked.
To see which commands are being executed during the compile stage, run ‘make VERBOSE=1’ instead of running ‘make’ after using CMake to configure MySQL. If compilation fails, check whether the MYSQL_MAINTAINER_MODE option is enabled or not. This mode causes compiler warnings to become errors, hence disabling it may enable the compilation to happen.
- Compiling a C++ program with GCC
- How to Report MySQL Bugs or Problems
- Should parents change their mentality while dealing with their kids?
- How effectively is the Indian government dealing with cyber crime?
- What the strategies involved in dealing with Advance Reading Comprehension?
- Compiling multiple .cpp files in c++ program
- Signal-To-Noise Ratio Numerical Problems with Solutions
- What points should one keep in mind while dealing with theme writing?
- Introduction to Miscellaneous Problems
- What are Agency Problems?
- Phobias: Embarrassing yet Compulsive Problems
- Introduction to Algorithms for Mathematical Problems
- How to handle teen behavioral problems?
- Profit and loss Problems using C
- Explain the Decidable and undecidable problems