Comment 17 for bug 1561091

Revision history for this message
igroene (igroene) wrote :

Thank you Tomislav. I tried to build on Centos5 and here is what I got on CMakeFiles/CMakeError.log:

Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"
/usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
gmake[1]: Entering directory `/vagrant/percona-server/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /vagrant/percona-server/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/src.c.o
/usr/bin/gcc -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -fPIC -DHAVE_LIBNUMA -o CMakeFiles/cmTryCompileExec.dir/src.c.o -c /vagrant/percona-server/CMakeFiles/CMakeTmp/src.c
/vagrant/percona-server/CMakeFiles/CMakeTmp/src.c: In function ?~@~Xmain?~@~Y:
/vagrant/percona-server/CMakeFiles/CMakeTmp/src.c:6: error: ?~@~Xnuma_all_nodes_ptr?~@~Y undeclared (first use in this function)
/vagrant/percona-server/CMakeFiles/CMakeTmp/src.c:6: error: (Each undeclared identifier is reported only once
/vagrant/percona-server/CMakeFiles/CMakeTmp/src.c:6: error: for each function it appears in.)
gmake[1]: *** [CMakeFiles/cmTryCompileExec.dir/src.c.o] Error 1
gmake[1]: Leaving directory `/vagrant/percona-server/CMakeFiles/CMakeTmp'
gmake: *** [cmTryCompileExec/fast] Error 2

Source file was:

    #include <numa.h>
    #include <numaif.h>
    int main()
    {
       struct bitmask *all_nodes= numa_all_nodes_ptr;
       set_mempolicy(MPOL_DEFAULT, 0, 0);
       return all_nodes != NULL;
    }

So digging a bit more,
On Centos 6
package numactl-devel-2.0.9-2.el6.x86_64
/usr/include/numa.h contains:

/* Set with all nodes from which the calling process may allocate memory.
   Only valid after numa_available. */
extern struct bitmask *numa_all_nodes_ptr;

On Centos 5
package numactl-devel-0.9.8-12.el5_6
/usr/include/numa.h doesn't have any mention of numa_all_nodes_ptr, instead there is:

/* Set with all nodes. Only valid after numa_available. */
extern const nodemask_t numa_all_nodes;

so the cmake check is not passing on Centos5.