building terminated because of errors

Asked by Ivanov on 2009-12-25

It is the last section in scons output:
g++ -o build/client/Text.o -c -I. -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DICONV_CONST=const -DHAVE_IFADDRS_H -D_DATADIR='"/usr/local/share"' -pthread client/Text.cpp
In file included from /usr/include/c++/4.3/ext/hash_map:64,
                 from client/stdinc.h:110,
                 from client/Text.cpp:19:
/usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
client/Text.cpp: In static member function ‘static const std::string& Text::convert(const std::string&, std::string&, const std::string&, const std::string&)’:
client/Text.cpp:339: ошибка: некорректное преобразование из ‘const char**’ в ‘char**’
client/Text.cpp:339: ошибка: при инициализации 2 -го аргумента ‘size_t libiconv(void*, char**, size_t*, char**, size_t*)’
scons: *** [build/client/Text.o] Error 1
scons: building terminated because of errors.

What can I do?

Question information

Language:
English Edit question
Status:
Solved
For:
LinuxDC++ Edit question
Assignee:
No assignee Edit question
Solved by:
Steven Sheehy
Solved:
2009-12-28
Last query:
2009-12-28
Last reply:
2009-12-27
Razzloss (razzloss) said : #1

Well, you could start by telling what you're trying to build and where (OS and distribution version).

You might be missing the necessary headers for iconv parameter detection to work correctly or there's some other problem in the build script, but that's impossible to say since no OS info was given.

--RZ

Ivanov (ivanov-mail) said : #2

I have Ubuntu 8.10 cernel 2.6.27-16-generic.
I downloaded file linuxdcpp-1.0.3.tar.bz2 from site lauchpad.net.
I unfold it in my home directory.
Following readme file installed scons and installed other packets, which scons told.
But I don't know what to do now.

Ivanov

Steven Sheehy (steven-sheehy) said : #3

Firstly, if you upgrade ubuntu to 9.10 you can install linuxdcpp 1.0.3 directly from apt. If you don't want to/unable to upgrade then you can try using the compile from source directions at:

http://ubuntuforums.org/showthread.php?s=ac4d41e935ae568477fdebc7bfd9ea6e&t=193984

In particular:

sudo apt-get install scons build-essential libgtk2.0-dev libglade2-dev zlib1g-dev libbz2-dev libssl-dev libboost-dev

Ivanov (ivanov-mail) said : #4

I perform apt-get install.
All but libboost-dev were in place.
But nothing changed.

Ivanov (ivanov-mail) said : #5

I have found two files iconv.h on my system one in /usr/include and one in /usr/local/include. And one libiconv.so.2.4.0 in /usr/local/lib.
Is it right?

Steven Sheehy (steven-sheehy) said : #6

Sounds like you have conflicting iconvs on your system. iconv should come with glibc, so not sure why you have a separate libiconv in /usr/local. I would suggest removing the lib and header file in /usr/local and see if it works.

Ivanov (ivanov-mail) said : #7

I remove all iconv.h files but scons still report:
Checking for C header file iconv.h... (cached) yes
Checking for iconv(0, (const char **)0, 0, (char**)0, 0) in C library iconv... (cached) yes

Best Steven Sheehy (steven-sheehy) said : #8

Scons may be caching the previous results. Delete the build dir:

rm -rf <linuxdcpp_dir>/build

Ivanov (ivanov-mail) said : #9

Without libiconv I managed to build linuxdcpp but in SConstruct I read:

 if not conf.CheckHeader('iconv.h'):
  Exit(1)
 elif conf.CheckLibWithHeader('iconv', 'iconv.h', 'c', 'iconv(0, (const char **)0, 0, (char**)0, 0);'):
  conf.env['ICONV_CONST'] = 'const'

it seems that developers thinked about using libiconv