错误 ODB 运行时版本不匹配

问题描述 投票:0回答:2

有谁可以帮我解决这个问题吗?这远远高于我的工资等级。一段时间以来,我一直在努力安装 odb 及其依赖项,并且不得不手动安装 Homebrew(我通常使用它)。这就是我目前所处的位置。不确定我的安装是否有错误,或者完全不同的东西。

 $ g++ -o build/server/auction_manager.o -c -g -v -MMD -I src -I include -I /usr/local/include/odb -I /usr/local/Cellar/protobuf/3.1.0/include -D ENABLE_TRACE_LOGGING -D AUCTION_APP__ENABLE_ODB -std=c++11 src/server/auction_manager.cpp
Using built-in specs.
COLLECT_GCC=g++-4.8
Target: x86_64-apple-darwin15.4.0
Configured with: ../configure --build=x86_64-apple-darwin15.4.0 --prefix=/usr/local/Cellar/gcc48/4.8.5 --libdir=/usr/local/Cellar/gcc48/4.8.5/lib/gcc/4.8 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.8 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-cloog=/usr/local/opt/cloog018 --with-isl=/usr/local/opt/isl011 --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc48 4.8.5' --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --with-build-config=bootstrap-debug --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.8.5 (Homebrew gcc48 4.8.5) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.11.6' '-o' 'build/server/auction_manager.o' '-c' '-g' '-v' '-MMD' '-I' 'src' '-I' 'include' '-I' '/usr/local/include/odb' '-I' '/usr/local/Cellar/protobuf/3.1.0/include' '-D' 'ENABLE_TRACE_LOGGING' '-D' 'AUCTION_APP__ENABLE_ODB' '-std=c++11' '-shared-libgcc' '-mtune=core2'
 /usr/local/Cellar/gcc48/4.8.5/libexec/gcc/x86_64-apple-darwin15.4.0/4.8.5/cc1plus -quiet -v -I src -I include -I /usr/local/include/odb -I /usr/local/Cellar/protobuf/3.1.0/include -MMD build/server/auction_manager.d -MQ build/server/auction_manager.o -D__DYNAMIC__ -D ENABLE_TRACE_LOGGING -D AUCTION_APP__ENABLE_ODB src/server/auction_manager.cpp -fPIC -feliminate-unused-debug-symbols -quiet -dumpbase auction_manager.cpp -mmacosx-version-min=10.11.6 -mtune=core2 -auxbase-strip build/server/auction_manager.o -g -std=c++11 -version -o /var/folders/pq/7_55zz516wj21251nl6qmfxc0000gn/T//ccjIc5CR.s
GNU C++ (Homebrew gcc48 4.8.5) version 4.8.5 (x86_64-apple-darwin15.4.0)
    compiled by GNU C version 4.8.5, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/Cellar/gcc48/4.8.5/lib/gcc/4.8/gcc/x86_64-apple-darwin15.4.0/4.8.5/../../../../../../x86_64-apple-darwin15.4.0/include"
#include "..." search starts here:
#include <...> search starts here:
 src
 include
 /usr/local/include/odb
 /usr/local/Cellar/protobuf/3.1.0/include
 /usr/local/Cellar/gcc48/4.8.5/lib/gcc/4.8/gcc/x86_64-apple-darwin15.4.0/4.8.5/../../../../../../include/c++/4.8.5
 /usr/local/Cellar/gcc48/4.8.5/lib/gcc/4.8/gcc/x86_64-apple-darwin15.4.0/4.8.5/../../../../../../include/c++/4.8.5/x86_64-apple-darwin15.4.0
 /usr/local/Cellar/gcc48/4.8.5/lib/gcc/4.8/gcc/x86_64-apple-darwin15.4.0/4.8.5/../../../../../../include/c++/4.8.5/backward
 /usr/local/Cellar/gcc48/4.8.5/lib/gcc/4.8/gcc/x86_64-apple-darwin15.4.0/4.8.5/include
 /usr/local/include
 /usr/local/Cellar/gcc48/4.8.5/include
 /usr/local/Cellar/gcc48/4.8.5/lib/gcc/4.8/gcc/x86_64-apple-darwin15.4.0/4.8.5/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
GNU C++ (Homebrew gcc48 4.8.5) version 4.8.5 (x86_64-apple-darwin15.4.0)
    compiled by GNU C version 4.8.5, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: b331b823481e84001cac67f078515d00
In file included from src/server/auction_manager.cpp:16:0:
src/query/account-odb.hpp:17:2: error: #error ODB runtime version mismatch
 #error ODB runtime version mismatch
  ^
In file included from src/server/auction_manager.cpp:17:0:
src/query/auction-odb.hpp:17:2: error: #error ODB runtime version mismatch
 #error ODB runtime version mismatch
  ^
In file included from src/query/auction-odb.hpp:25:0,
                 from src/server/auction_manager.cpp:17:
src/query/bid-odb.hpp:17:2: error: #error ODB runtime version mismatch
 #error ODB runtime version mismatch
gcc4.8 odb
2个回答
0
投票

我在使用odb2.4编译器编译一些中间文件,然后使用odb2.5库和这些中间文件来编译我的程序时遇到了这个问题。这就是错误出现的地方。当我使用odb2.5编译器重新编译中间文件时,然后重新编译我的程序就可以了。


-1
投票

使用 ODB 2.4.0 等。这解决了它。

© www.soinside.com 2019 - 2024. All rights reserved.