Problem install Couchbase for FreeBSD


#1

Good afternoon
There is a problem installing the database on FreeBSD 10.3
[ 72%] Built target memcached_daemon
[ 72%] Linking CXX executable …/memcached
/usr/bin/ld: undefined reference to symbol `elf_getdata@@FBSD_1.0’ (try adding -lelf)
//usr/lib/libelf.so.1: could not read symbols: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [kv_engine/daemon/CMakeFiles/memcached.dir/build.make:120: kv_engine/memcached] Error 1
gmake[3]: *** [CMakeFiles/Makefile2:11935: kv_engine/daemon/CMakeFiles/memcached.dir/all] Error 2
gmake[2]: *** [Makefile:141: all] Error 2
gmake[1]: *** [Makefile:37: compile] Error 2
gmake: *** [GNUmakefile:15: all] Error 2
Help please solve this issue
Thank you


#2

Did you try this suggestion?


#3

gmake -lelf ?
Yes, tried

cat ./build/CMakeFiles/CMakeError.log

Summary

Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_26439/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_26439.dir/build.make CMakeFiles/cmTC_26439.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_26439.dir/src.cxx.o
/usr/bin/c++ -std=c++11 -g -Qunused-arguments -Wall -pedantic -Wredundant-decls -Wmissing-braces -fno-strict-aliasing -fvisibility=hidden -pthread -Werror=switch -ftemplate-depth=900 -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wshorten-64-to-32 -Wfloat-equal -fstrict-aliasing -DHAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT -Wzero-as-null-pointer-constant -Wzero-as-null-pointer-constant -o CMakeFiles/cmTC_26439.dir/src.cxx.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/src.cxx
warning: unknown warning option ‘-Wzero-as-null-pointer-constant’; did you mean ‘-Wint-to-void-pointer-cast’? [-Wunknown-warning-option]
warning: unknown warning option ‘-Wzero-as-null-pointer-constant’; did you mean ‘-Wint-to-void-pointer-cast’? [-Wunknown-warning-option]
2 warnings generated.
Linking CXX executable cmTC_26439
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_26439.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++11 -g -Qunused-arguments -Wall -pedantic -Wredundant-decls -Wmissing-braces -fno-strict-aliasing -fvisibility=hidden -pthread -Werror=switch -ftemplate-depth=900 -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wshorten-64-to-32 -Wfloat-equal -fstrict-aliasing -DHAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT -Wzero-as-null-pointer-constant CMakeFiles/cmTC_26439.dir/src.cxx.o -o cmTC_26439
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Source file was:
int main() { return 0; }
Performing C++ SOURCE FILE Test HAVE_CXX_FLAG_COVERAGE failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_51a7e/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_51a7e.dir/build.make CMakeFiles/cmTC_51a7e.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_51a7e.dir/src.cxx.o
/usr/bin/c++ -std=c++11 -g -Qunused-arguments -Wall -pedantic -Wredundant-decls -Wmissing-braces -fno-strict-aliasing -fvisibility=hidden -pthread -Werror=switch -ftemplate-depth=900 -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wshorten-64-to-32 -Wfloat-equal -fstrict-aliasing -Wstrict-aliasing -Wthread-safety -DHAVE_CXX_FLAG_COVERAGE --coverage --coverage -o CMakeFiles/cmTC_51a7e.dir/src.cxx.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_51a7e
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_51a7e.dir/link.txt --verbose=1
/usr/bin/c++ -std=c++11 -g -Qunused-arguments -Wall -pedantic -Wredundant-decls -Wmissing-braces -fno-strict-aliasing -fvisibility=hidden -pthread -Werror=switch -ftemplate-depth=900 -std=c++11 -Wall -Wextra -Wshadow -pedantic -pedantic-errors -Wshorten-64-to-32 -Wfloat-equal -fstrict-aliasing -Wstrict-aliasing -Wthread-safety -DHAVE_CXX_FLAG_COVERAGE --coverage CMakeFiles/cmTC_51a7e.dir/src.cxx.o -o cmTC_51a7e
/usr/bin/ld: /usr/bin/…/lib/libprofile_rt.a: No such file: No such file or directory
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [CMakeFiles/cmTC_51a7e.dir/build.make:98: cmTC_51a7e] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_51a7e/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Source file was:
int main() { return 0; }
Determining if the pthread_setname_np exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_c2ad6/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_c2ad6.dir/build.make CMakeFiles/cmTC_c2ad6.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_c2ad6.dir/CheckSymbolExists.c.o
/usr/bin/cc -D_GNU_SOURCE -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_c2ad6.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'pthread_setname_np’
return ((int*)(&pthread_setname_np))[argc];
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_c2ad6.dir/build.make:66: CMakeFiles/cmTC_c2ad6.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_c2ad6/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_setname_np
return ((int*)(&pthread_setname_np))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the pthread_getname_np exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_058ed/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_058ed.dir/build.make CMakeFiles/cmTC_058ed.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_058ed.dir/CheckSymbolExists.c.o
/usr/bin/cc -D_GNU_SOURCE -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_058ed.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'pthread_getname_np’
return ((int*)(&pthread_getname_np))[argc];
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_058ed.dir/build.make:66: CMakeFiles/cmTC_058ed.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_058ed/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_getname_np
return ((int*)(&pthread_getname_np))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the sched_getaffinity exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_a62b3/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_a62b3.dir/build.make CMakeFiles/cmTC_a62b3.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_a62b3.dir/CheckSymbolExists.c.o
/usr/bin/cc -D_GNU_SOURCE -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_a62b3.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'sched_getaffinity’
return ((int*)(&sched_getaffinity))[argc];
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_a62b3.dir/build.make:66: CMakeFiles/cmTC_a62b3.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_a62b3/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <sched.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef sched_getaffinity
return ((int*)(&sched_getaffinity))[argc];
#else
(void)argc;
return 0;
#endif
}

Performing C++ SOURCE FILE Test HAVE_MAKE_UNIQUE failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_c2fd1/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_c2fd1.dir/build.make CMakeFiles/cmTC_c2fd1.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building CXX object CMakeFiles/cmTC_c2fd1.dir/src.cxx.o
/usr/bin/c++ -std=c++11 -g -Qunused-arguments -Wall -pedantic -Wredundant-decls -Wmissing-braces -fno-strict-aliasing -fvisibility=hidden -pthread -Werror=switch -ftemplate-depth=900 -DHAVE_MAKE_UNIQUE -o CMakeFiles/cmTC_c2fd1.dir/src.cxx.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/src.cxx
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/src.cxx:4:22: error: no member named ‘make_unique’ in namespace 'std’
return *std::make_unique(0);
~~~~~^
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/src.cxx:4:37: error: expected ‘(’ for function-style cast or type construction
return *std::make_unique(0);
~~~^
2 errors generated.
gmake[3]: *** [CMakeFiles/cmTC_c2fd1.dir/build.make:66: CMakeFiles/cmTC_c2fd1.dir/src.cxx.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_c2fd1/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Source file was:

#include <memory>
int main() {
    return *std::make_unique<int>(0);
}

Determining if the gethrtime exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_787e4/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_787e4.dir/build.make CMakeFiles/cmTC_787e4.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_787e4.dir/CheckSymbolExists.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_787e4.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier ‘gethrtime’; did you mean ‘getitimer’?
return ((int*)(&gethrtime))[argc];
^~~~~~~~~
getitimer
/usr/include/sys/time.h:490:5: note: ‘getitimer’ declared here
int getitimer(int, struct itimerval *);
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_787e4.dir/build.make:66: CMakeFiles/cmTC_787e4.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_787e4/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <sys/time.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef gethrtime
return ((int*)(&gethrtime))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the htonll exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_e3e1c/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_e3e1c.dir/build.make CMakeFiles/cmTC_e3e1c.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_e3e1c.dir/CheckSymbolExists.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_e3e1c.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier ‘htonll’; did you mean ‘htonl’?
return ((int*)(&htonll))[argc];
^~~~~~
htonl
/usr/include/arpa/inet.h:139:11: note: ‘htonl’ declared here
uint32_t htonl(uint32_t);
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_e3e1c.dir/build.make:66: CMakeFiles/cmTC_e3e1c.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_e3e1c/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <arpa/inet.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef htonll
return ((int*)(&htonll))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the fdatasync exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_75d1a/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_75d1a.dir/build.make CMakeFiles/cmTC_75d1a.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_75d1a.dir/CheckSymbolExists.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_75d1a.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'fdatasync’
return ((int*)(&fdatasync))[argc];
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_75d1a.dir/build.make:66: CMakeFiles/cmTC_75d1a.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_75d1a/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <unistd.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef fdatasync
return ((int*)(&fdatasync))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the memalign exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_93a05/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_93a05.dir/build.make CMakeFiles/cmTC_93a05.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_93a05.dir/CheckSymbolExists.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_93a05.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
In file included from /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:
/usr/include/malloc.h:3:2: error: “<malloc.h> has been replaced by <stdlib.h>”
#error “<malloc.h> has been replaced by <stdlib.h>”
^
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier 'memalign’
return ((int*)(&memalign))[argc];
^
2 errors generated.
gmake[3]: *** [CMakeFiles/cmTC_93a05.dir/build.make:66: CMakeFiles/cmTC_93a05.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_93a05/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <malloc.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef memalign
return ((int*)(&memalign))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if files alloca.h exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_42cb9/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_42cb9.dir/build.make CMakeFiles/cmTC_42cb9.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_42cb9.dir/CheckIncludeFiles.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_42cb9.dir/CheckIncludeFiles.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: ‘alloca.h’ file not found
#include <alloca.h>
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_42cb9.dir/build.make:66: CMakeFiles/cmTC_42cb9.dir/CheckIncludeFiles.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_42cb9/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Source:
/* */
#include <alloca.h>

int main(void){return 0;}

Determining if files mach/mach_time.h exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_81864/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_81864.dir/build.make CMakeFiles/cmTC_81864.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_81864.dir/CheckIncludeFiles.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_81864.dir/CheckIncludeFiles.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: ‘mach/mach_time.h’ file not found
#include <mach/mach_time.h>
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_81864.dir/build.make:66: CMakeFiles/cmTC_81864.dir/CheckIncludeFiles.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_81864/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Source:
/* */
#include <mach/mach_time.h>

int main(void){return 0;}

Determining if the function mach_absolute_time exists failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_cdb8d/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_cdb8d.dir/build.make CMakeFiles/cmTC_cdb8d.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_cdb8d.dir/CheckFunctionExists.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -DCHECK_FUNCTION_EXISTS=mach_absolute_time -o CMakeFiles/cmTC_cdb8d.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_cdb8d
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cdb8d.dir/link.txt --verbose=1
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -DCHECK_FUNCTION_EXISTS=mach_absolute_time CMakeFiles/cmTC_cdb8d.dir/CheckFunctionExists.c.o -o cmTC_cdb8d
CMakeFiles/cmTC_cdb8d.dir/CheckFunctionExists.c.o: In function main': /usr/local/share/cmake/Modules/CheckFunctionExists.c:17: undefined reference tomach_absolute_time’
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [CMakeFiles/cmTC_cdb8d.dir/build.make:98: cmTC_cdb8d] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_cdb8d/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Determining if files numa.h exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_7ce43/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_7ce43.dir/build.make CMakeFiles/cmTC_7ce43.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_7ce43.dir/CheckIncludeFiles.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_7ce43.dir/CheckIncludeFiles.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: ‘numa.h’ file not found
#include <numa.h>
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_7ce43.dir/build.make:66: CMakeFiles/cmTC_7ce43.dir/CheckIncludeFiles.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_7ce43/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Source:
/* */
#include <numa.h>

int main(void){return 0;}

Determining if the htonll exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_5c061/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_5c061.dir/build.make CMakeFiles/cmTC_5c061.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_5c061.dir/CheckSymbolExists.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_5c061.dir/CheckSymbolExists.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: use of undeclared identifier ‘htonll’; did you mean ‘htonl’?
return ((int*)(&htonll))[argc];
^~~~~~
htonl
/usr/include/arpa/inet.h:139:11: note: ‘htonl’ declared here
uint32_t htonl(uint32_t);
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_5c061.dir/build.make:66: CMakeFiles/cmTC_5c061.dir/CheckSymbolExists.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_5c061/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

File /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <arpa/inet.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef htonll
return ((int*)(&htonll))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if files umem.h exist failed with the following output:
Change Dir: /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/local/bin/gmake" "cmTC_2a66d/fast"
gmake[2]: Entering directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
/usr/local/bin/gmake -f CMakeFiles/cmTC_2a66d.dir/build.make CMakeFiles/cmTC_2a66d.dir/build
gmake[3]: Entering directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
Building C object CMakeFiles/cmTC_2a66d.dir/CheckIncludeFiles.c.o
/usr/bin/cc -g -std=gnu99 -Qunused-arguments -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -fno-strict-aliasing -Wno-overlength-strings -fvisibility=hidden -pthread -o CMakeFiles/cmTC_2a66d.dir/CheckIncludeFiles.c.o -c /usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c
/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp/CheckIncludeFiles.c:2:10: fatal error: ‘umem.h’ file not found
#include <umem.h>
^
1 error generated.
gmake[3]: *** [CMakeFiles/cmTC_2a66d.dir/build.make:66: CMakeFiles/cmTC_2a66d.dir/CheckIncludeFiles.c.o] Error 1
gmake[3]: Leaving directory '/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’
gmake[2]: *** [Makefile:126: cmTC_2a66d/fast] Error 2
gmake[2]: Leaving directory ‘/usr/home/evangel/CouchBase/couchbase/build/CMakeFiles/CMakeTmp’

Source:
/* */
#include <umem.h>

int main(void){return 0;}


#4

I believe it’s suggesting you add that to the linker line.

Try building with make VERBOSE=1, and for the specific command which fails (and gives that suggestion) try adding -lelf to the linker command line.

Other than that I don’t know; FreeBSD isn’t a supported platform - maybe someone else on the forums can help?


#6

add -lelf
to
./build/kv_engine/daemon/CMakeFiles/memcached.dir/link.txt
Ok
next error :frowning:

Summary

[ 86%] Linking CXX executable moxi
/usr/bin/ld: warning: librtmp.so.1, needed by …/…/install/lib/libcurl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libssl.so.8, needed by …/…/install/lib/libcurl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcrypto.so.8, needed by …/…/install/lib/libcurl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: liblber-2.4.so.2, needed by …/…/install/lib/libcurl.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libldap-2.4.so.2, needed by …/…/install/lib/libcurl.so, not found (try using -rpath or -rpath-link)
…/…/install/lib/libcurl.so: undefined reference to ldap_get_option' ../../install/lib/libcurl.so: undefined reference toldap_pvt_url_scheme2proto’
…/…/install/lib/libcurl.so: undefined reference to ldap_memfree' ../../install/lib/libcurl.so: undefined reference toRTMP_Init’
…/…/install/lib/libcurl.so: undefined reference to RTMP_SetBufferMS' ../../install/lib/libcurl.so: undefined reference toldap_get_dn_ber’
…/…/install/lib/libcurl.so: undefined reference to ldap_set_option' ../../install/lib/libcurl.so: undefined reference toldap_init_fd’
…/…/install/lib/libcurl.so: undefined reference to RTMP_ConnectStream' ../../install/lib/libcurl.so: undefined reference tober_sockbuf_add_io’
…/…/install/lib/libcurl.so: undefined reference to ldap_result' ../../install/lib/libcurl.so: undefined reference tober_memfree’
…/…/install/lib/libcurl.so: undefined reference to RTMP_Alloc' ../../install/lib/libcurl.so: undefined reference toldap_url_parse’
…/…/install/lib/libcurl.so: undefined reference to ldap_sasl_bind' ../../install/lib/libcurl.so: undefined reference toldap_msgtype’
…/…/install/lib/libcurl.so: undefined reference to RTMP_Read' ../../install/lib/libcurl.so: undefined reference toRTMP_SetupURL’
…/…/install/lib/libcurl.so: undefined reference to ldap_msgfree' ../../install/lib/libcurl.so: undefined reference tober_free’
…/…/install/lib/libcurl.so: undefined reference to RTMP_Free' ../../install/lib/libcurl.so: undefined reference toldap_err2string’
…/…/install/lib/libcurl.so: undefined reference to ldap_first_message' ../../install/lib/libcurl.so: undefined reference toldap_abandon_ext’
…/…/install/lib/libcurl.so: undefined reference to ldap_get_attribute_ber' ../../install/lib/libcurl.so: undefined reference toldap_parse_result’
…/…/install/lib/libcurl.so: undefined reference to ldap_next_message' ../../install/lib/libcurl.so: undefined reference toldap_unbind_ext’
…/…/install/lib/libcurl.so: undefined reference to RTMP_Write' ../../install/lib/libcurl.so: undefined reference toldap_free_urldesc’
…/…/install/lib/libcurl.so: undefined reference to RTMP_Close' ../../install/lib/libcurl.so: undefined reference toRTMP_Connect1’
…/…/install/lib/libcurl.so: undefined reference to `ldap_search_ext’
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [moxi/CMakeFiles/moxi.dir/build.make:917: moxi/moxi] Error 1
gmake[3]: *** [CMakeFiles/Makefile2:14426: moxi/CMakeFiles/moxi.dir/all] Error 2
gmake[2]: *** [Makefile:141: all] Error 2
gmake[1]: *** [Makefile:37: compile] Error 2
gmake: *** [GNUmakefile:15: all] Error 2