怎么解决呢? [ODBC 库 - link 检查失败]

How can slove it? [ODBC library - link check failed]

我只允许使用这个路径:[/data/matt/],系统是REDHAT6.5-mini。老大需要rabbitmq, 所以,我在 [/data/matt/matt_env/] 中构建了 jdk,ncurses6,openssl,pcre8,unixODBC2,zlib 当我构建 otp_src_22.3.tar.gz,

---
unixODBC-2.3.1]$ ./configure --prefix=/data/matt/matt_env/unixODBC2 --enable-gui=no

otp_src_22.3]$ export LD_LIBRARY_PATH=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/data/matt/matt_env/pcre8/lib:/lib:/lib64:/usr/lib:/usr/lib64

otp_src_22.3]$ export LIBS=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/lib:/lib64:/usr/lib:/usr/lib64

export JAVA_HOME=/data/matt/matt_env/jdk1.8.0_251
export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
export PATH=$PATH:${JAVA_HOME}/bin

$ export LD_RUN_PATH=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/lib:/lib64:/usr/lib:/usr/lib64

$ export LIBRARY_PATH=/data/matt/matt_env/ncurses6/lib:/data/matt/matt_env/openssl/lib:/data/matt/matt_env/zlib/lib:/data/matt/matt_env/unixODBC2/lib:/lib:/lib64:/usr/lib:/usr/lib64

otp_src_22.3]$ ./configure --prefix=/data/matt/matt_env/erlang24  LDFLAGS="-L/data/matt/matt_env/ncurses6/lib -L/data/matt/matt_env/openssl/lib -L/data/matt/matt_env/zlib/lib -L/data/matt/matt_env/unixODBC2/lib -L/data/matt/matt_env/pcre8/lib"  --with-ssl=/data/matt/matt_env/openssl --with-PACKAGE=/data/matt/matt_env/zlib/lib/pkgconfig --with-PACKAGE=/data/matt/matt_env/pcre8/lib/pkgconfig --without-termcap

---

但是,配置的结果告诉我:"odbc : ODBC library - link check failed"

当我 [make] 时,错误:

##
beam/erl_bif_re.c: In function ‘erts_init_bif_re’:
beam/erl_bif_re.c:96: error: ‘erts_pcre_malloc’ undeclared (first use in this function)
beam/erl_bif_re.c:96: error: (Each undeclared identifier is reported only once
beam/erl_bif_re.c:96: error: for each function it appears in.)
beam/erl_bif_re.c:97: error: ‘erts_pcre_free’ undeclared (first use in this function)
beam/erl_bif_re.c:98: error: ‘erts_pcre_stack_malloc’ undeclared (first use in this function)
beam/erl_bif_re.c:99: error: ‘erts_pcre_stack_free’ undeclared (first use in this function)
beam/erl_bif_re.c:101: error: ‘erts_pcre_stack_guard’ undeclared (first use in this function)
beam/erl_bif_re.c: In function ‘build_compile_result’:
beam/erl_bif_re.c:485: warning: implicit declaration of function ‘erts_pcre_fullinfo’
beam/erl_bif_re.c:496: warning: implicit declaration of function ‘erts_pcre_free’
beam/erl_bif_re.c: In function ‘re_version_0’:
beam/erl_bif_re.c:516: warning: implicit declaration of function ‘erts_pcre_version’
beam/erl_bif_re.c:516: warning: cast to pointer from integer of different size
beam/erl_bif_re.c: In function ‘re_compile’:
beam/erl_bif_re.c:560: warning: implicit declaration of function ‘erts_pcre_compile2’
beam/erl_bif_re.c:561: warning: assignment makes pointer from integer without a cast
beam/erl_bif_re.c: At top level:
beam/erl_bif_re.c:602: error: expected specifier-qualifier-list before ‘erts_pcre_extra’
beam/erl_bif_re.c: In function ‘cleanup_restart_context’:
beam/erl_bif_re.c:616: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:617: warning: implicit declaration of function ‘erts_pcre_free_restart_data’
beam/erl_bif_re.c:617: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:618: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:620: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:621: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:622: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:624: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:624: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:625: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:627: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:628: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:629: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:630: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:632: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:633: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:634: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c: In function ‘build_exec_return’:
beam/erl_bif_re.c:654: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:671: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:680: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:693: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:694: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:694: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:715: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:723: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:724: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:724: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:749: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:758: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:759: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:762: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:762: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:763: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:763: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:766: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:770: error: ‘RestartContext’ has no member named ‘subject’
 CC     obj/x86_64-unknown-linux-gnu/opt/smp/sys_float.o
beam/erl_bif_re.c:807: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:817: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:818: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:821: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:821: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:822: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:822: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:825: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:829: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c: In function ‘build_one_capture’:
beam/erl_bif_re.c:890: warning: implicit declaration of function ‘erts_pcre_get_stringtable_entries’
beam/erl_bif_re.c:914: warning: implicit declaration of function ‘erts_pcre_get_stringnumber’
 CC     obj/x86_64-unknown-linux-gnu/opt/smp/sys_time.o
beam/erl_bif_re.c: In function ‘re_run’:
beam/erl_bif_re.c:1163: warning: assignment makes pointer from integer without a cast
beam/erl_bif_re.c:1202: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1203: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1244: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1245: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1251: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1252: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1252: error: ‘PCRE_EXTRA_LOOP_LIMIT’ undeclared (first use in this function)
beam/erl_bif_re.c:1253: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1254: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1257: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1258: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1260: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:1261: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1261: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:1262: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1263: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1264: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1267: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1268: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1272: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1273: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1277: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1277: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1278: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1279: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1287: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:1307: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1308: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:1313: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1314: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1315: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1316: error: ‘RestartContext’ has no member named ‘ret_info’
beam/erl_bif_re.c:1320: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1322: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1327: error: ‘RestartContext’ has no member named ‘flags’
beam/erl_bif_re.c:1334: warning: implicit declaration of function ‘erts_pcre_exec’
beam/erl_bif_re.c:1334: error: ‘RestartContext’ has no member named ‘code’
beam/erl_bif_re.c:1334: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1334: error: ‘RestartContext’ has no member named ‘subject’
beam/erl_bif_re.c:1336: error: ‘RestartContext’ has no member named ‘ovector’
beam/erl_bif_re.c:1345: error: ‘PCRE_ERROR_LOOP_LIMIT’ undeclared (first use in this function)
beam/erl_bif_re.c: In function ‘re_exec_trap’:
beam/erl_bif_re.c:1417: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1420: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1421: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1423: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1424: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1424: error: ‘RestartContext’ has no member named ‘restart_data’
beam/erl_bif_re.c:1425: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1430: error: ‘RestartContext’ has no member named ‘extra’
beam/erl_bif_re.c:1434: error: ‘PCRE_ERROR_LOOP_LIMIT’ undeclared (first use in this function)
 CC     obj/x86_64-unknown-linux-gnu/opt/smp/erl_poll.o
 CC     obj/x86_64-unknown-linux-gnu/opt/smp/erl_check_io.o
make[4]: *** [obj/x86_64-unknown-linux-gnu/opt/smp/erl_bif_re.o] Error 1
make[4]: *** Waiting for unfinished jobs....
sys/common/erl_poll.c: In function ‘erts_poll_wait’:
sys/common/erl_poll.c:1882: warning: unused variable ‘__erts_msacc_state’
beam/erl_nif.c: In function ‘erts_fire_nif_monitor’:
beam/erl_nif.c:2579: warning: ‘brefc’ may be used uninitialized in this function
##

所以!我该如何解决这些问题?我用了一个星期来尝试...

导出 ODBC_LIB=-L"/data/bonc/bonc_env/unixODBC2/lib";导出 ODBC_INCLUDE="-I/data/bonc/bonc_env/unixODBC2/include" 。 不报告“ODBC 库 - link 检查失败