maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #06720
FreeBSD compilation problems and a fix
Hi guys,
I just tried to compile 10.0 on FreeBSD-9.1 RELEASE
and noticed two problems:
1. It printed this warning for every source file:
/usr/include/sys/timeb.h:42:2: warning: #warning "this file includes
<sys/timeb.h> which is deprecated"
This diff fixes the problem:
-#ifdef HAVE_SYS_TIMEB_H
+#if defined(HAVE_SYS_TIMEB_H) && !defined(__FreeBSD__)
2. It failed to compile because of pcre (both libraries and includes)
installed in the system. Compiler used the *system* header pcre.h
together with the *bundled* library libpcre.a.
I had a similar complaint from the MacPorts maintainers.
This diff fixes the problem:
# Common defines and includes
+SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include
Does this look OK?
If so, which version should I push it in?
Thanks.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-12-16 12:02:21 +0000
+++ CMakeLists.txt 2014-01-29 12:02:45 +0000
@@ -262,6 +262,7 @@
INCLUDE(configure.cmake)
# Common defines and includes
+SET(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
=== modified file 'include/my_global.h'
--- include/my_global.h 2013-11-20 11:05:39 +0000
+++ include/my_global.h 2014-01-29 12:06:04 +0000
@@ -344,7 +344,7 @@
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
-#ifdef HAVE_SYS_TIMEB_H
+#if defined(HAVE_SYS_TIMEB_H) && !defined(__FreeBSD__)
#include <sys/timeb.h> /* Avoid warnings on SCO */
#endif
#ifdef HAVE_SYS_STAT_H
Follow ups