redex icon indicating copy to clipboard operation
redex copied to clipboard

Redex fails to build from source

Open manushanga opened this issue 2 years ago • 4 comments

System: Fedora 35 Compiler: g++ (GCC) 11.3.1 20220421 (Red Hat 11.3.1-2) Redex commit: cbf674f6c16d1a08fffa1a54cbb05dce372ad990 The linker fails for redex-all by giving the following error

/usr/bin/ld: ./.libs/libredex.a(DexHasher.o): in function `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::__xfer_bufptrs::~__xfer_bufptrs()':
/usr/include/c++/11/sstream:485: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_pbump(char*, char*, long long)'
/usr/bin/ld: ./.libs/libredex.a(JarLoader.o): in function `std::basic_streambuf<char, std::char_traits<char> >::pubseekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)':
/usr/include/c++/11/streambuf:258: undefined reference to `std::basic_filebuf<char, std::char_traits<char> >::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)'
/usr/bin/ld: ./.libs/libredex.a(ConstantLifting.o): in function `ConstantValues::to_str[abi:cxx11]()':
/home/madura/redex/service/method-dedup/ConstantValue.h:149: undefined reference to `std::ostream::seekp(long long, std::_Ios_Seekdir)'
/usr/bin/ld: ./.libs/libredex.a(TypeReference.o): in function `type_reference::get_method_signature[abi:cxx11](DexMethod const*)':
/home/madura/redex/service/reference-update/TypeReference.cpp:382: undefined reference to `std::ostream::seekp(long long, std::_Ios_Seekdir)'
/usr/bin/ld: ./.libs/libredex.a(GraphVisualizer.o): in function `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::__xfer_bufptrs::~__xfer_bufptrs()':
/usr/include/c++/11/sstream:485: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_pbump(char*, char*, long long)'
/usr/bin/ld: /usr/include/c++/11/sstream:485: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_pbump(char*, char*, long long)'
/usr/bin/ld: /usr/include/c++/11/sstream:485: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_pbump(char*, char*, long long)'
/usr/bin/ld: /usr/include/c++/11/sstream:485: undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::_M_pbump(char*, char*, long long)'

manushanga avatar Jun 17 '22 04:06 manushanga

What's libstdc++ version on your machine? Can you try updating it?

ssj933 avatar Jun 17 '22 18:06 ssj933

The installed version is the latest for Fedora 35, libstdc++-11.3.1-2.fc35.x86_64. Is that too old?

manushanga avatar Jun 18 '22 08:06 manushanga

We tried on Fedora 35 and it seems to work on our side. Not really sure what is wrong. Maybe you can try using a ubuntu container?

ssj933 avatar Jun 23 '22 17:06 ssj933

我在Mac上也遇到了类似的问题,master分支

Novelot avatar Aug 25 '22 10:08 Novelot