Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
547 views
in Technique[技术] by (71.8m points)

c++ - 当我尝试进行TPC-E测试时,使公用程序抱怨“未定义的引用”(Make utility complains about “undefined reference” when I tried to make TPC-E test)

The problem is compounded by the fact that I am far from programming.

(我还远未编程,这使问题更加复杂。)

I need to use the TPC-E test.

(我需要使用TPC-E测试。)

I downloaded the source codes from their website .

(我从他们的网站下载了源代码。)

There is a miserable and almost meaningless ReadMe.

(有一个悲惨而几乎毫无意义的自述文件。)

Here are its contents:

(其内容如下:)

To use the Makefile you must first set the following environment variables 
to match your system and compiler requirements:

CXX: path and name of compiler
    ex: export CXX=/opt/SUNWspro/bin/CC  (C++ compiler on Solaris)
CCFLAGS: compiler options
    ex: export CCFLAGS="-g -O"  
        -g enable debug
        -O optimize code
LDFLAGS: linker/loader options
    ex: export LDFLAGS="-g"
LIBS: extra libraries to link in
    ex: export LIBS="-lpthread"

According to the instructions there, I created the necessary environment variables (I just removed the -g switch from the CCFLAGS variable).

(根据那里的说明,我创建了必要的环境变量(我刚刚从CCFLAGS变量中删除了-g开关)。)

After that, I ran the make utility and got more than five thousand lines of errors.

(之后,我运行了make实用程序,并收到五千多行错误。)

Apparently he lacks some libraries.

(显然他缺少一些图书馆。)

On this my knowledge ends.

(我的知识到此结束。)

Here are some error messages received:

(这是收到的一些错误消息:)

...

/usr/bin/ld: DateTime.o: in function `TPCE::CDateTime::Validate(int, int, int, int, int, int, int)': DateTime.cpp:(.text+0xee): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'
/usr/bin/ld: DateTime.cpp:(.text+0xfd): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/usr/bin/ld: DateTime.cpp:(.text+0x107): undefined reference to `__cxa_allocate_exception'
/usr/bin/ld: DateTime.cpp:(.text+0x117): undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const'
/usr/bin/ld: DateTime.cpp:(.text+0x122): undefined reference to `std::out_of_range::out_of_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: DateTime.cpp:(.text+0x135): undefined reference to `operator delete(void*)'

...

/usr/bin/ld: error.cpp:(.text._ZN4TPCE10CSystemErrD0Ev[_ZN4TPCE10CSystemErrD5Ev]+0x24): undefined reference to `std::exception::~exception()'
/usr/bin/ld: error.cpp:(.text._ZN4TPCE10CSystemErrD0Ev[_ZN4TPCE10CSystemErrD5Ev]+0x31): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: error.o: in function `TPCE::CSystemErr::~CSystemErr()':error.cpp:(.text._ZN4TPCE10CSystemErrD2Ev[_ZN4TPCE10CSystemErrD5Ev]+0x1c): undefined reference to `operator delete(void*)'

...

/usr/bin/ld: locking.cpp:(.text+0x1fb): undefined reference to `operator delete(void*)'
/usr/bin/ld: locking.cpp:(.text+0x202): undefined reference to `std::runtime_error::~runtime_error()'
/usr/bin/ld: locking.cpp:(.text+0x209): undefined reference to `typeinfo for std::runtime_error'
/usr/bin/ld: locking.cpp:(.text+0x211): undefined reference to `__cxa_throw'
/usr/bin/ld: locking.o: in function `TPCE::CMutex::lock()':locking.cpp:(.text+0x246): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'

...

A search on the internet made me think of installing the libboost-all-dev package, but that didn't help.

(互联网上的搜索使我想到安装libboost-all-dev软件包,但这没有帮助。)

In the end, I gave up - I'm completely incomprehensible to the terminology and I don't have time to study C ++ programming.

(最后,我放弃了-我对术语完全不理解,而且我没有时间学习C ++编程。)

Operating System - Debian 10

(操作系统-Debian 10)

Questions: which libraries need to be installed and is there anyone who used these tests, how to adapt them to PostgreSQL?

(问题:需要安装哪些库?是否有使用过这些测试的人?如何使它们适应PostgreSQL?)

Full error log (892 230 bytes)

(完整的错误日志(892 230字节))

  ask by Vasilii Korotkikh translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...