[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Can't get lmdb to build on FreeBSD 12
- To: Russell Haley <russ.haley@gmail.com>, openldap-technical@openldap.org
- Subject: Re: Can't get lmdb to build on FreeBSD 12
- From: Howard Chu <hyc@symas.com>
- Date: Wed, 4 Oct 2017 17:28:04 +0100
- In-reply-to: <WM!9d3f476bf712876a9fdabecd05fb414a72ec5b16235c4c5266a188f33dc84827754416bc2fd425eea55648ef07b0d304!@mailstronghold-2.zmailcloud.com>
- References: <CABx9NuTqd7OBPzzq3YPy4J81Gsk3KqTHWjbmcWC3mt3b8GYO7Q@mail.gmail.com> <WM!9d3f476bf712876a9fdabecd05fb414a72ec5b16235c4c5266a188f33dc84827754416bc2fd425eea55648ef07b0d304!@mailstronghold-2.zmailcloud.com>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 SeaMonkey/2.53a1
Russell Haley wrote:
Hi,
Sorry for the silly question, but I've stumped myself and my C is
weak. Normally lmdb builds fine without issue on most of the platforms
I try (Debian Jessie, FreeBSD 10.3 & 12), but it's stopped compiling
on my TrueOS box, which is FreeBSD 12. I've tried gcc and clang 4.0
and 3.9.
Try using GNU make. It looks like whatever make you're using doesn't have the
proper default build rules.
------------------------
russellh@prescott:~/Git/lmdb/libraries/liblmdb% make
cc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized -v mdb_stat.c -o mdb_stat
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin
"/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd12.0 -emit-obj
-disable-free -main-file-name mdb_stat.c -mrelocation-model static
-mthread-model posix -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -v
-dwarf-column-info -debug-info-kind=standalone -dwarf-version=2
-debugger-tuning=gdb -resource-dir /usr/bin/../lib/clang/4.0.0 -O2 -W
-Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized
-fdebug-compilation-dir /usr/home/russellh/Git/lmdb/libraries/liblmdb
-ferror-limit 19 -fmessage-length 237 -pthread -fobjc-runtime=gnustep
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o
/tmp/mdb_stat-852384.o -x c mdb_stat.c
clang -cc1 version 4.0.0 based upon LLVM 4.0.0 default target
x86_64-unknown-freebsd12.0
#include "..." search starts here:
#include <...> search starts here:
/usr/bin/../lib/clang/4.0.0/include
/usr/include
End of search list.
"/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1
--hash-style=both --enable-new-dtags -o mdb_stat /usr/lib/crt1.o
/usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/mdb_stat-852384.o
-lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc
--as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
/tmp/mdb_stat-852384.o: In function `main':
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:104:
undefined reference to `mdb_env_create'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:106:
undefined reference to `mdb_strerror'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:111:
undefined reference to `mdb_env_set_maxdbs'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:114:
undefined reference to `mdb_env_open'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:116:
undefined reference to `mdb_strerror'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:121:
undefined reference to `mdb_env_stat'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:122:
undefined reference to `mdb_env_info'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:136:
undefined reference to `mdb_reader_list'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:139:
undefined reference to `mdb_reader_check'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:141:
undefined reference to `mdb_reader_list'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:147:
undefined reference to `mdb_txn_begin'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:149:
undefined reference to `mdb_strerror'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:257:
undefined reference to `mdb_env_close'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:160:
undefined reference to `mdb_cursor_open'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:162:
undefined reference to `mdb_strerror'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:165:
undefined reference to `mdb_stat'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:171:
undefined reference to `mdb_cursor_get'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:171:
undefined reference to `mdb_cursor_get'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:199:
undefined reference to `mdb_cursor_close'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:203:
undefined reference to `mdb_dbi_open'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:205:
undefined reference to `mdb_strerror'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:209:
undefined reference to `mdb_stat'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:(.text+0x5d6):
undefined reference to `mdb_strerror'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:255:
undefined reference to `mdb_txn_abort'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:221:
undefined reference to `mdb_cursor_open'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:223:
undefined reference to `mdb_strerror'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:226:
undefined reference to `mdb_cursor_get'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:234:
undefined reference to `mdb_dbi_open'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:239:
undefined reference to `mdb_stat'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:245:
undefined reference to `mdb_dbi_close'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:226:
undefined reference to `mdb_cursor_get'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:247:
undefined reference to `mdb_cursor_close'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:253:
undefined reference to `mdb_dbi_close'
/usr/home/russellh/Git/lmdb/libraries/liblmdb/mdb_stat.c:241:
undefined reference to `mdb_strerror'
cc: error: linker command failed with exit code 1 (use -v to see
invocation)
*** Error code 1
Stop.
make: stopped in /usr/home/russellh/Git/lmdb/libraries/liblmdb
----------------------------------
The full output is here with uname, git status and compiler info:
http://termbin.com/io9d
Any help would be grand.
Thanks,
Russ
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/