aMule Forum

English => Compilation problems => Topic started by: wuischke on June 26, 2006, 09:45:00 AM

Title: 20060626 on Ubuntu Dapper
Post by: wuischke on June 26, 2006, 09:45:00 AM
Quote
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA    -I./libs -Ilibs -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC   -MT amule-ExternalConn.o -MD -MP -MF ".deps/amule-ExternalConn.Tpo" -c -o amule-ExternalConn.o `test -f 'ExternalConn.cpp' || echo './'`ExternalConn.cpp; \
        then mv -f ".deps/amule-ExternalConn.Tpo" ".deps/amule-ExternalConn.Po"; else rm -f ".deps/amule-ExternalConn.Tpo"; exit 1; fi
In file included from ExternalConn.h:31,
                 from ExternalConn.cpp:34:
./libs/ec/ECSpecialTags.h:28:2: warning: #warning Kry - Preferences packet derived from packet, and that's ok, but shouldn't be here because this is a tag file and forces a stupid include
In file included from ./libs/ec/ECPacket.h:28,
                 from ./libs/ec/ECSpecialTags.h:29,
                 from ExternalConn.h:31,
                 from ExternalConn.cpp:34:
./libs/ec/ECTag.h:34:2: warning: #warning Kry - Can you say "Design flaw"?
In file included from CFile.h:29,
                 from PartFile.h:31,
                 from ExternalConn.cpp:38:
SafeFile.h:201:2: warning: #warning DOCS
ExternalConn.cpp:845:2: warning: #warning Kry - lfroen, please fix this to work with 64bits
/usr/include/sys/types.h:67: error: multiple types in one declaration
/usr/include/sys/types.h:67: error: declaration does not declare anything
/usr/include/sys/types.h:82: error: multiple types in one declaration
/usr/include/sys/types.h:82: error: declaration does not declare anything
/usr/include/sys/types.h:100: error: multiple types in one declaration
/usr/include/sys/types.h:100: error: declaration does not declare anything
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/include/stdint.h:141: error: duplicate ‘unsigned’
/usr/include/stdint.h:141: error: ‘long long long’ is too long for GCC
/usr/include/stdint.h:141: error: declaration does not declare anything
/usr/include/wx-2.6/wx/buffer.h: In constructor ‘wxCharBuffer::wxCharBuffer(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:96: error: ‘malloc’ was not declared in this scope
/usr/include/wx-2.6/wx/buffer.h: In constructor ‘wxWCharBuffer::wxWCharBuffer(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:100: error: ‘malloc’ was not declared in this scope
/usr/include/wx-2.6/wx/buffer.h: In constructor ‘wxMemoryBufferData::wxMemoryBufferData(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:134: error: ‘malloc’ was not declared in this scope
/usr/include/wx-2.6/wx/buffer.h: In member function ‘void wxMemoryBufferData::ResizeIfNeeded(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:145: error: ‘realloc’ was not declared in this scope
/usr/include/wx-2.6/wx/vector.h: In member function ‘bool wxVectorBase::Alloc(size_t)’:
/usr/include/wx-2.6/wx/vector.h:35: error: ‘realloc’ was not declared in this scope
make[3]: *** [amule-ExternalConn.o] Error 1
make[3]: Leaving directory `/home/tux/build/amule-cvs/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tux/build/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tux/build/amule-cvs'
make: *** [all] Error 2
Can't check that any further now, but maybe this helps you in any way.

Ubuntu Dapper, wxGTK 2.6.3, gcc 4.0.3.
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on June 26, 2006, 12:37:08 PM
Gave up on this as I couldn't follow the huge changes in the code organisation.
I'll just use yesterdays SVN as my base and merge it then. (The relevant parts for me are not affected anyway.)
Title: Re: 20060626 on Ubuntu Dapper
Post by: GonoszTopi on June 26, 2006, 02:15:54 PM
Seems more like a gcc problem than an aMule problem.
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on June 27, 2006, 10:23:14 AM
You're for sure right, as it compiles successfully with gcc-3.4. But I consider it an aMule-problem anyway, because it doesn't work since yesterday's codechanges (removing opcodes, ec in lib/ec and so  on) anymore. It's OK when this happens in SVN, but it should be solved until the next stable release. Imho it's necessary to compile with the default compiler of such a widespread distribution like Ubuntu.

Quote
if g++ -DHAVE_CONFIG_H -I. -I. -I..     -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA    -I./libs -Ilibs -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC   -MT amule-ExternalConn.o -MD -MP -MF ".deps/amule-ExternalConn.Tpo" -c -o amule-ExternalConn.o `test -f 'ExternalConn.cpp' || echo './'`ExternalConn.cpp; \
        then mv -f ".deps/amule-ExternalConn.Tpo" ".deps/amule-ExternalConn.Po"; else rm -f ".deps/amule-ExternalConn.Tpo"; exit 1; fi
In file included from ExternalConn.h:31,
                 from ExternalConn.cpp:34:
./libs/ec/ECSpecialTags.h:28:2: warning: #warning Kry - Preferences packet derived from packet, and that's ok, but shouldn't be here because this is a tag file and forces a stupid include
In file included from ./libs/ec/ECPacket.h:28,
                 from ./libs/ec/ECSpecialTags.h:29,
                 from ExternalConn.h:31,
                 from ExternalConn.cpp:34:
./libs/ec/ECTag.h:34:2: warning: #warning Kry - Can you say "Design flaw"?
In file included from CFile.h:29,
                 from PartFile.h:31,
                 from ExternalConn.cpp:38:
SafeFile.h:201:2: warning: #warning DOCS
ExternalConn.cpp:845:2: warning: #warning Kry - lfroen, please fix this to work with 64bits
/usr/include/sys/types.h:67: error: multiple types in one declaration
/usr/include/sys/types.h:67: error: declaration does not declare anything
/usr/include/sys/types.h:82: error: multiple types in one declaration
/usr/include/sys/types.h:82: error: declaration does not declare anything
/usr/include/sys/types.h:100: error: multiple types in one declaration
/usr/include/sys/types.h:100: error: declaration does not declare anything
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/cstdlib:110: error: ‘::malloc’ has not been declared
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/cstdlib:118: error: ‘::realloc’ has not been declared
/usr/include/stdint.h:141: error: duplicate ‘unsigned’
/usr/include/stdint.h:141: error: ‘long long long’ is too long for GCC
/usr/include/stdint.h:141: error: declaration does not declare anything
/usr/include/wx-2.6/wx/buffer.h: In constructor ‘wxCharBuffer::wxCharBuffer(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:96: error: ‘malloc’ was not declared in this scope
/usr/include/wx-2.6/wx/buffer.h: In constructor ‘wxWCharBuffer::wxWCharBuffer(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:100: error: ‘malloc’ was not declared in this scope
/usr/include/wx-2.6/wx/buffer.h: In constructor ‘wxMemoryBufferData::wxMemoryBufferData(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:134: error: ‘malloc’ was not declared in this scope
/usr/include/wx-2.6/wx/buffer.h: In member function ‘void wxMemoryBufferData::ResizeIfNeeded(size_t)’:
/usr/include/wx-2.6/wx/buffer.h:145: error: ‘realloc’ was not declared in this scope
/usr/include/wx-2.6/wx/vector.h: In member function ‘bool wxVectorBase::Alloc(size_t)’:
/usr/include/wx-2.6/wx/vector.h:35: error: ‘realloc’ was not declared in this scope
make[3]: *** [amule-ExternalConn.o] Error 1
make[3]: Leaving directory `/home/tux/build/amule-cvs/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/tux/build/amule-cvs/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tux/build/amule-cvs'
make: *** [all] Error 2
tux@xubuntu:~/build/amule-cvs$
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on June 27, 2006, 06:18:55 PM
Well, I didn't notice this before, but I found something in the configure-log:
Quote
checking nl_types.h usability... no
checking nl_types.h presence... yes
configure: WARNING: nl_types.h: present but cannot be compiled
configure: WARNING: nl_types.h:     check for missing prerequisite headers?
configure: WARNING: nl_types.h: see the Autoconf documentation
configure: WARNING: nl_types.h:     section "Present But Cannot Be Compiled"
configure: WARNING: nl_types.h: proceeding with the preprocessor's result
configure: WARNING: nl_types.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------ ##
configure: WARNING:     ## Report this to admin@amule.org ##
configure: WARNING:     ## ------------------------------ ##
Quote
checking sys/select.h usability... no
checking sys/select.h presence... yes
configure: WARNING: sys/select.h: present but cannot be compiled
configure: WARNING: sys/select.h:     check for missing prerequisite headers?
configure: WARNING: sys/select.h: see the Autoconf documentation
configure: WARNING: sys/select.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/select.h: proceeding with the preprocessor's result
configure: WARNING: sys/select.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------ ##
configure: WARNING:     ## Report this to admin@amule.org ##
configure: WARNING:     ## ------------------------------ ##
Quote
checking sys/resource.h usability... no
checking sys/resource.h presence... yes
configure: WARNING: sys/resource.h: present but cannot be compiled
configure: WARNING: sys/resource.h:     check for missing prerequisite headers?
configure: WARNING: sys/resource.h: see the Autoconf documentation
configure: WARNING: sys/resource.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/resource.h: proceeding with the preprocessor's result
configure: WARNING: sys/resource.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------ ##
configure: WARNING:     ## Report this to admin@amule.org ##
configure: WARNING:     ## ------------------------------ ##
Quote
checking sys/timeb.h usability... no
checking sys/timeb.h presence... yes
configure: WARNING: sys/timeb.h: present but cannot be compiled
configure: WARNING: sys/timeb.h:     check for missing prerequisite headers?
configure: WARNING: sys/timeb.h: see the Autoconf documentation
configure: WARNING: sys/timeb.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/timeb.h: proceeding with the preprocessor's result
configure: WARNING: sys/timeb.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------ ##
configure: WARNING:     ## Report this to admin@amule.org ##
configure: WARNING:     ## ------------------------------ ##

I'll check now what could be wrong with my system in (the not so improbable) case that it's my fault. ;)
Title: Re: 20060626 on Ubuntu Dapper
Post by: Gerd78 on June 27, 2006, 06:24:24 PM
These messages mean that programs which #include the above headers don't compile. Error messages like these can indicate broken system headers.

Please verify the installation of the glibc development package. On RPM systems, this would be
Code: [Select]
rpm -V glibc-develThere must be a similar way to do that on Ubuntu. If there are errors, reinstall the package which contains the system headers.
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on June 27, 2006, 06:33:20 PM
I reinstalled the package (libc6-dev), but I still have the above errors with gcc-4.0.3 but nothing like this with gcc-3.4.
Gonna search the Ubuntu forums.
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on June 27, 2006, 06:52:22 PM
Some pretty old mailing list entry lead me to the conviction that I maybe have to readd some header files - whilst I don't have a clue what I'm actually doing and found no other information up to this point. ;)
e.g. http://mail.gnome.org/archives/orbit-list/2003-May/msg00028.html
Title: Re: 20060626 on Ubuntu Dapper
Post by: phoenix on June 28, 2006, 04:04:16 AM
I have exactly the same problem here and I don't know what is going on.
Code: [Select]
Compiling TextClient.cpp
In file included from ./libs/ec/ECPacket.h:28,
                 from ./libs/ec/RemoteConnect.h:31,
                 from ExternalConnector.h:39,
                 from TextClient.h:29,
                 from TextClient.cpp:35:
./libs/ec/ECTag.h:34:2: warning: #warning Kry - Can you say "Design flaw"?
In file included from TextClient.cpp:42:
./libs/ec/ECSpecialTags.h:28:2: warning: #warning Kry - Preferences packet derived from packet, and that's ok, but shouldn't be here because this is a tag file and forces a stupid include
/usr/include/unistd.h:201: error: multiple types in one declaration
/usr/include/unistd.h:201: error: declaration does not declare anything
/usr/include/unistd.h:206: error: multiple types in one declaration
/usr/include/unistd.h:206: error: declaration does not declare anything
/usr/include/unistd.h:229: error: multiple types in one declaration
/usr/include/unistd.h:229: error: declaration does not declare anything
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/cstdlib:110: error: '::malloc' has not been declared
/usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/cstdlib:118: error: '::realloc' has not been declared
/usr/include/stdint.h:141: error: declaration does not declare anything
/usr/local/wxWidgets-cvsu/include/wx-2.7/wx/vector.h: In member function 'bool wxVectorBase::Alloc(size_t)':
/usr/local/wxWidgets-cvsu/include/wx-2.7/wx/vector.h:35: error: 'realloc' was not declared in this scope
make[3]: *** [amulecmd-TextClient.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Title: Re: 20060626 on Ubuntu Dapper
Post by: phoenix on June 28, 2006, 10:53:55 AM
config.h is beeing generated wrong, this is the source of the previous error:

Code: [Select]
/* Define to `int' if doesn't define. */
#define gid_t int

And here it is sys/types.h:
Code: [Select]
#ifndef __gid_t_defined
typedef __gid_t gid_t;
# define __gid_t_defined
#endif
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on June 28, 2006, 11:17:42 AM
That's it. (After commenting out nearly everything in this file it works fine again.)
Title: Re: 20060626 on Ubuntu Dapper
Post by: GonoszTopi on June 28, 2006, 04:00:21 PM
cstdlib problem is caused by the test `checking for a GNU libc compatible malloc/realloc...' failing.

You can work this around by commenting out the #define malloc/realloc lines in config.h

Anyway, the question is WHY does it fail?
Title: Re: 20060626 on Ubuntu Dapper
Post by: GonoszTopi on June 28, 2006, 04:08:46 PM
Possible reasons:[list=1]
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on June 28, 2006, 04:16:14 PM
1. I'm not.
2. I have them - It works fine after commenting out.
3. *whistling the X-files melody*
Title: Re: 20060626 on Ubuntu Dapper
Post by: phoenix on June 30, 2006, 05:44:17 AM
It's all Kry's fault. He is the most evil one. :D

The new behaviour is a new feature of the new autoconf. Look at section 17.7 of the latest autoconf manual. Carefully specifying the necessary AC_CHECK_HEADERS might do the trick. Unfortunately, I can't look into it now.
Title: Re: 20060626 on Ubuntu Dapper
Post by: GonoszTopi on June 30, 2006, 06:03:51 PM
phoenix, can you check wich was the last revision that compiled for you?
Title: Re: 20060626 on Ubuntu Dapper
Post by: Attila on July 02, 2006, 08:41:52 AM
Quote
Originally posted by GonoszTopi
phoenix, can you check wich was the last revision that compiled for you?
I'm not Phoenix but maybe this is helpful. I'm running Debian Etch 2.6.15 with gcc version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3). The last CVS to compile is 20060625.
20060626 does not compile (I get similar /sys/type.h errors as above). I tried both changing to gcc 3.4 and editing the config.h file as suggested above and no of the combinations worked. All gave the same errors. I tried 20060702 (the most recent) and no joy either so I assume that everything between 20060626 and yesterday has the same problems. Notice that the problem begins with 20060626. This number contains 666. (More X-files music).
Hope this helps.
Attila
Title: Re: 20060626 on Ubuntu Dapper
Post by: phoenix on July 03, 2006, 02:14:13 AM
Quote
Originally posted by GonoszTopi
phoenix, can you check wich was the last revision that compiled for you?

Any suggestions on how to do it without checking out in binary search and compiling?

Commenting 5 or 6 lines from config.h did the trick, but this must be done every time config.h is generated.

Anyway, I don't think it will compile anymore, I believe it is a problem with autoconf. I have here rpm autoconf-2.59-5 from FC4.
Title: Re: 20060626 on Ubuntu Dapper
Post by: GonoszTopi on July 03, 2006, 01:14:17 PM
I want revisions 6859, 6860, 6862 and 6866 be tested. If anyone, who currently cannot compile CVS because of the above errors, is wiiing to do the test, I can provide the necessary tarballs, just let me know.

Sorry, I do not have this bug, otherwise it would have been fixed already, but I need to find exacly where the bug introduced itself. I do have ideas, but it would be just too much work to analyze all of them.

Thanks.
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on July 03, 2006, 01:21:56 PM
I can test on Nexenta and Ubuntu. Please tell me how I could help you in this issue. (Will probably be offline from 2pm[Berlin] to 7pm)
Title: Re: 20060626 on Ubuntu Dapper
Post by: GonoszTopi on July 03, 2006, 02:26:33 PM
The tarballs are available at http://www.savefile.com/projects.php?pid=478961

Any help solving this issue is highly appreciated.
Title: Re: 20060626 on Ubuntu Dapper
Post by: wuischke on July 03, 2006, 10:04:11 PM
I've just tested on Ubuntu yet, because the 1866MHz P-M ist slightly faster than the 650MHz Athlon...;)

6859 does compile fine, all other need the modification of the config.h in order to work.

I've attached a bunch of logfiles, I hope they help you in any way.
Title: Re: 20060626 on Ubuntu Dapper
Post by: GonoszTopi on July 03, 2006, 11:49:46 PM
Solved. Tomorrow's tarball will have the fix.

Thanks to wuischke for his valuable help.
Title: Re: 20060626 on Ubuntu Dapper
Post by: phoenix on July 04, 2006, 04:07:58 AM
Works here. Great job you both!
Title: CVS-20060704 compiles
Post by: Attila on July 04, 2006, 04:37:03 PM
I can confirm it compiles with no problems on Debian Etch.  :baby:
As always, outstanding!
Thanks.
Title: Re: 20060626 on Ubuntu Dapper
Post by: Onkelvent on July 04, 2006, 05:10:42 PM
:D Yes, it also goes again with the SuSE 10.  :D

THX