← Back to team overview

maria-developers team mailing list archive

Re: FreeBSD compilation problems and a fix


Hi, Alexander!

On Jan 29, Alexander Barkov wrote:
> 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__)

How comes? HAVE_SYS_TIMEB_H is only defined on Windows, there's no test
for <sys/timeb.h> anywhere in the cmake files.

Furthermore, this whole #ifdef HAVE_SYS_TIMEB_H/#include/#endif
in my_global.h was removed in 5.5. It was mistakenly restored in 10.0,
so feel free to remove it again.

But anyway, HAVE_SYS_TIMEB_H should never be defined on FreeBSD, please
find out why you have it.

> 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

Good idea in general, yes.

> Does this look OK?
> If so, which version should I  push it in?



Follow ups