Archive: Problems building on linux


Problems building on linux
I have problem building nsis on linux. I followed documentation, and got this error:


...
build.cpp:(.text+0x73bd): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
build.cpp:(.text+0x7401): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build.cpp:(.text+0x744d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build.cpp:(.text+0x7523): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build.cpp:(.text+0x754a): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/build.o: In function `CEXEBuild::write_output()':
build.cpp:(.text+0x8a08): undefined reference to `__divdi3'
build.cpp:(.text+0x907a): undefined reference to `__udivdi3'
build/release/makensis/DialogTemplate.o: In function `CDialogTemplate::SetFont(char*, unsigned short)':
DialogTemplate.cpp:(.text+0x99): undefined reference to `operator new[](unsigned int)'
build/release/makensis/DialogTemplate.o: In function `CDialogTemplate::AddItem(DialogItemTemplate)':
DialogTemplate.cpp:(.text+0x261): undefined reference to `operator new[](unsigned int)'
DialogTemplate.cpp:(.text+0x299): undefined reference to `operator new[](unsigned int)'
DialogTemplate.cpp:(.text+0x2cf): undefined reference to `operator new[](unsigned int)'
build/release/makensis/DialogTemplate.o: In function `CDialogTemplate::CDialogTemplate(unsigned char*, unsigned int)':
DialogTemplate.cpp:(.text+0x5bf): undefined reference to `operator new[](unsigned int)'
build/release/makensis/DialogTemplate.o:DialogTemplate.cpp:(.text+0xc50): more undefined references to `operator new[](unsigned int)' follow
build/release/makensis/dirreader.o: In function `dir_reader::exclude(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
dirreader.cpp:(.text+0x2be): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_of(char const*, unsigned int, unsigned int) const'
build/release/makensis/dirreader.o: In function `posix_dir_reader::read(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
dirreader.cpp:(.text._ZN16posix_dir_reader4readERKSs[posix_dir_reader::read(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xa8): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
dirreader.cpp:(.text._ZN16posix_dir_reader4readERKSs[posix_dir_reader::read(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0xcf): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/lang.o: In function `CEXEBuild::GenerateLangTables()':
lang.cpp:(.text+0x2bc2): undefined reference to `operator new[](unsigned int)'
build/release/makensis/makenssi.o: In function `main':
makenssi.cpp:(.text+0x416): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
makenssi.cpp:(.text+0x42e): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
makenssi.cpp:(.text+0x446): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
makenssi.cpp:(.text+0x4b4): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
makenssi.cpp:(.text+0x4cc): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/manifest.o: In function `manifest::generate(manifest::comctl, manifest::exec_level)':
manifest.cpp:(.text+0x5c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/manifest.o:manifest.cpp:(.text+0xdc): more undefined references to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)' follow
build/release/makensis/manifest.o: In function `manifest::generate(manifest::comctl, manifest::exec_level)':
manifest.cpp:(.text+0x178): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
manifest.cpp:(.text+0x195): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
manifest.cpp:(.text+0x1b4): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
manifest.cpp:(.text+0x1d1): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
build/release/makensis/Plugins.o: In function `(anonymous namespace)::file_size(std::basic_ifstream<char, std::char_traits<char> >&)':
Plugins.cpp:(.text+0x40): undefined reference to `std::basic_istream<char, std::char_traits<char> >::seekg(long long, std::_Ios_Seekdir)'
build/release/makensis/Plugins.o: In function `(anonymous namespace)::read_file(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
Plugins.cpp:(.text+0x588): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
Plugins.cpp:(.text+0x647): undefined reference to `std::basic_istream<char, std::char_traits<char> >::read(char*, int)'
Plugins.cpp:(.text+0x6a3): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/Plugins.o: In function `Plugins::GetExports(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
Plugins.cpp:(.text+0x13ba): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/Plugins.o: In function `Plugins::FindCommands(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
Plugins.cpp:(.text+0x1b78): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(unsigned int, char)'
build/release/makensis/Plugins.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
Plugins.cpp:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_[std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x38): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned int)'
Plugins.cpp:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EPKS3_RKS6_[std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x48): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/ResourceEditor.o: In function `CResourceDataEntry::SetData(unsigned char*, unsigned int, unsigned int)':
ResourceEditor.cpp:(.text+0x245): undefined reference to `operator new[](unsigned int)'
build/release/makensis/ResourceEditor.o: In function `CResourceDirectoryEntry::GetName()':
ResourceEditor.cpp:(.text+0x33a): undefined reference to `operator new[](unsigned int)'
build/release/makensis/ResourceEditor.o: In function `CResourceDirectoryEntry::CResourceDirectoryEntry(unsigned short*, CResourceDataEntry*)':
ResourceEditor.cpp:(.text+0x3b8): undefined reference to `operator new[](unsigned int)'
build/release/makensis/ResourceEditor.o: In function `CResourceDirectoryEntry::CResourceDirectoryEntry(unsigned short*, CResourceDataEntry*)':
ResourceEditor.cpp:(.text+0x428): undefined reference to `operator new[](unsigned int)'
build/release/makensis/ResourceEditor.o: In function `CResourceDirectoryEntry::CResourceDirectoryEntry(unsigned short*, CResourceDirectory*)':
ResourceEditor.cpp:(.text+0x498): undefined reference to `operator new[](unsigned int)'
build/release/makensis/ResourceEditor.o:ResourceEditor.cpp:(.text+0x508): more undefined references to `operator new[](unsigned int)' follow
build/release/makensis/script.o: In function `CEXEBuild::do_add_file_create_dir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
script.cpp:(.text+0xc7d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned int) const'
script.cpp:(.text+0xc9b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::insert(unsigned int, char const*, unsigned int)'
script.cpp:(.text+0xcbe): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::find(char, unsigned int) const'
build/release/makensis/script.o: In function `CEXEBuild::add_file(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, char const*, int, int*)':
script.cpp:(.text+0xdf5): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(unsigned int, char)'
script.cpp:(.text+0x1289): undefined reference to `__umoddi3'
build/release/makensis/script.o: In function `CEXEBuild::do_add_file(char const*, int, int, int*, char const*, int, int*, std::set<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
script.cpp:(.text+0x158c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
script.cpp:(.text+0x15a7): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
script.cpp:(.text+0x15d9): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
script.cpp:(.text+0x1788): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
script.cpp:(.text+0x18b2): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
script.cpp:(.text+0x18ef): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
script.cpp:(.text+0x1a2f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(unsigned int, char)'
build/release/makensis/script.o: In function `CEXEBuild::doCommand(int, LineParser&)':
script.cpp:(.text+0x12b62): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
script.cpp:(.text+0x12bd7): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
script.cpp:(.text+0x12bf5): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::assign(char const*, unsigned int)'
script.cpp:(.text+0x13055): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
script.cpp:(.text+0x13158): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*, unsigned int)'
build/release/makensis/util.o: In function `get_string_prefix(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
util.cpp:(.text+0xfe): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char const*, unsigned int, unsigned int) const'
util.cpp:(.text+0x11b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
build/release/makensis/util.o: In function `get_string_suffix(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
util.cpp:(.text+0xba1): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::rfind(char const*, unsigned int, unsigned int) const'
util.cpp:(.text+0xbcc): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
build/release/makensis/winchar.o: In function `winchar_toansi(unsigned short const*, unsigned int)':
winchar.cpp:(.text+0x1aa): undefined reference to `operator new[](unsigned int)'
build/release/makensis/winchar.o: In function `winchar_fromansi(char const*, unsigned int)':
winchar.cpp:(.text+0x46d): undefined reference to `operator new[](unsigned int)'
build/release/makensis/writer.o: In function `writer_sink::write_string(char const*, unsigned int)':
writer.cpp:(.text+0x18f): undefined reference to `operator new[](unsigned int)'
scons: *** [build/release/makensis/makensis] Error 1
scons: building terminated because of errors.



My system is Fedora Core 7, tried with Scons 0.96.95 and 0.97, got the same error. Used command line:

[root@localhost nsis-2.24-src]# scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/Mirko/nsis-install/nsis-2.29 install-compiler

Please help.

Seems like it used gcc instead of g++ for the CPP files. Please attach the complete build log.