aMule Forum

English => Compilation problems => Topic started by: monohouse on January 03, 2009, 08:43:18 AM

Title: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 03, 2009, 08:43:18 AM
wxGTK 2.8.9 configs and builds fine:
Code: [Select]
./configure --prefix=/opt/wx --enable-unicode --with-gtk --with-unicode

aMule 2.2.3 configs and builds fine:
Code: [Select]
~/aMule-2.2.3$ ./configure --with-wx-prefix=/opt/wx --prefix=/opt/amule --disable-debug --disable-upnp --enable-optimize --disable-profile --disable-amulecmd --disable-amule-gui --disable-amule-daemon --disable-webserver --disable-cas --disable-wxcas --disable-ed2k --disable-alc --disable-alcc --disable-systray --disable-geoip --disable-unicode --without-unicode --disable-nls
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking if this is a FreeBSD 4 or earlier system... no
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for gawk... (cached) gawk
checking for egrep... grep -E
checking whether make sets $(MAKE)... (cached) yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
checking for a BSD-compatible install... /bin/install -c
checking for ranlib... ranlib
checking for bison... bison -y
checking for ranlib... (cached) ranlib
checking for strip... strip
checking for ar... ar
checking for ld... ld
checking for zlib >= 1.1.4... yes (version 1.2.3.3)
checking for File::Copy... ok
checking whether we need the GUI... yes
checking for the --with-toolkit option... will be automatically detected
checking for the --with-wxshared option... will be automatically detected
checking for the --with-wxdebug option... will be automatically detected
checking for the --with-wxversion option... will be automatically detected
checking for wx-config... /opt/wx/bin/wx-config
checking for wxWidgets version >= 2.8.0 (--unicode=yes)... yes (version 2.8.9)
checking for wxWidgets static library... no
checking if wxWidgets was built in DEBUG mode... no
checking if wxWidgets was built in STATIC mode... no
checking which wxWidgets toolkit was selected... gtk2
checking for crypto++ version >= 5.1... yes (version 5.5.2, installed)
checking if we're using the GNU C++ library... yes
checking that wxWidgets has support for large files... yes
checking for exception-handling... yes
checking for <cxxabi.h> and __cxa_demangle()... yes
checking for bfd... yes
checking for <execinfo.h> and backtrace()... yes
checking for extended flex capabilities... yes
checking for X... libraries , headers
checking for working alloca.h... yes
checking for alloca... yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for ANSI C header files... yes
checking argz.h usability... yes
checking argz.h presence... yes
checking for argz.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking inttypes.h usability... yes
checking inttypes.h presence... yes
checking for inttypes.h... yes
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking nl_types.h usability... yes
checking nl_types.h presence... yes
checking for nl_types.h... yes
checking stdint.h usability... yes
checking stdint.h presence... yes
checking for stdint.h... yes
checking stdio_ext.h usability... yes
checking stdio_ext.h presence... yes
checking for stdio_ext.h... yes
checking stdlib.h usability... yes
checking stdlib.h presence... yes
checking for stdlib.h... yes
checking string.h usability... yes
checking string.h presence... yes
checking for string.h... yes
checking strings.h usability... yes
checking strings.h presence... yes
checking for strings.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mntent.h usability... no
checking sys/mntent.h presence... no
checking for sys/mntent.h... no
checking sys/mnttab.h usability... no
checking sys/mnttab.h presence... no
checking for sys/mnttab.h... no
checking sys/mount.h usability... yes
checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking sys/types.h usability... yes
checking sys/types.h presence... yes
checking for sys/types.h... yes
checking unistd.h usability... yes
checking unistd.h presence... yes
checking for unistd.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for uid_t in sys/types.h... yes
checking for working volatile... yes
checking for ptrdiff_t... yes
checking whether closedir returns void... no
checking whether gcc needs -traditional... no
checking for pid_t... yes
checking for unistd.h... (cached) yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for getmntent in -lsun... no
checking for getmntent in -lseq... no
checking for getmntent in -lgen... no
checking for getmntent... yes
checking whether lstat dereferences a symlink specified with a trailing slash... no
checking whether lstat accepts an empty string... no
checking whether lstat dereferences a symlink specified with a trailing slash... (cached) no
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for sys/select.h... (cached) yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for function prototypes... yes
checking whether setvbuf arguments are reversed... no
checking return type of signal handlers... void
checking whether stat accepts an empty string... no
checking for strftime... yes
checking for working strtod... yes
checking for vprintf... yes
checking for _doprnt... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for __argz_count... yes
checking for __argz_next... yes
checking for __argz_stringify... yes
checking for endpwent... yes
checking for floor... no
checking for ftruncate... yes
checking for getcwd... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for gethostname... yes
checking for getpass... yes
checking for gettimeofday... yes
checking for inet_ntoa... yes
checking for localeconv... yes
checking for memmove... yes
checking for mempcpy... yes
checking for memset... yes
checking for munmap... yes
checking for nl_langinfo... yes
checking for pow... no
checking for select... yes
checking for setlocale... yes
checking for socket... yes
checking for sqrt... no
checking for stpcpy... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strcspn... yes
checking for strdup... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strstr... yes
checking for strtoul... yes
checking for mkdir... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for getopt_long... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for fallocate... no
checking for SYS_fallocate... no
checking for posix_fallocate... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for library containing strerror... none required
checking whether we are using the GNU C Library 2.1 or newer... yes
checking whether integer division by zero raises SIGFPE... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unsigned long long... yes
checking for inttypes.h... yes
checking whether the inttypes.h PRIxNN macros are broken... no
checking for ld used by GCC... ld
checking if the linker (ld) is GNU ld... yes
checking for shared library run path origin... done
checking for argz.h... (cached) yes
checking for limits.h... (cached) yes
checking for locale.h... (cached) yes
checking for nl_types.h... (cached) yes
checking for malloc.h... (cached) yes
checking for stddef.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for feof_unlocked... yes
checking for fgets_unlocked... yes
checking for getc_unlocked... yes
checking for getcwd... (cached) yes
checking for getegid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getuid... yes
checking for mempcpy... (cached) yes
checking for munmap... (cached) yes
checking for putenv... yes
checking for setenv... yes
checking for setlocale... (cached) yes
checking for stpcpy... (cached) yes
checking for strcasecmp... (cached) yes
checking for strdup... (cached) yes
checking for strtoul... (cached) yes
checking for tsearch... yes
checking for __argz_count... (cached) yes
checking for __argz_stringify... (cached) yes
checking for __argz_next... (cached) yes
checking for iconv... yes
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
checking for nl_langinfo and CODESET... yes
checking for LC_MESSAGES... yes
checking for bison... bison
checking version of bison... 2.3, ok
checking whether NLS is requested... no
checking if the applications should be statically linked... no
checking for docdir... ${prefix}/share/doc/aMule-2.2.3
checking for SVNDATE... None required
checking denoising level... 4
checking whether ccache support should be added... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating docs/Makefile
config.status: creating docs/man/Makefile
config.status: creating intl/Makefile
config.status: creating src/Makefile
config.status: creating src/pixmaps/Makefile
config.status: creating src/pixmaps/flags_xpm/Makefile
config.status: creating src/libs/Makefile
config.status: creating src/libs/ec/Makefile
config.status: creating src/libs/ec/cpp/Makefile
config.status: creating src/libs/common/Makefile
config.status: creating src/utils/Makefile
config.status: creating src/utils/aLinkCreator/Makefile
config.status: creating src/utils/aLinkCreator/docs/Makefile
config.status: creating src/utils/aLinkCreator/src/Makefile
config.status: creating src/utils/cas/Makefile
config.status: creating src/utils/cas/docs/Makefile
config.status: creating src/utils/fileview/Makefile
config.status: creating src/utils/wxCas/Makefile
config.status: creating src/utils/wxCas/docs/Makefile
config.status: creating src/utils/wxCas/src/Makefile
config.status: creating src/utils/xas/Makefile
config.status: creating src/utils/xas/autostart-xas
config.status: creating src/utils/xas/docs/Makefile
config.status: creating src/skins/Makefile
config.status: creating src/webserver/Makefile
config.status: creating src/webserver/src/Makefile
config.status: creating src/webserver/default/Makefile
config.status: creating src/webserver/php-default/Makefile
config.status: creating src/webserver/chicane/Makefile
config.status: creating src/webserver/litoral/Makefile
config.status: creating unittests/Makefile
config.status: creating unittests/muleunit/Makefile
config.status: creating unittests/tests/Makefile
config.status: creating po/Makefile.in
config.status: creating Compilation.flags
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: executing denoiser commands

but does not link: http://manoa.flnet.org/error.log ("The message exceeds the maximum allowed length (20000 characters).")

so far I was able to get this:
Code: [Select]
~/aMule-2.2.3$ grep -lir "typeinfo" /opt/wx/lib/*
/opt/wx/lib/libwx_baseu-2.8.so
/opt/wx/lib/libwx_baseu-2.8.so.0
/opt/wx/lib/libwx_baseu-2.8.so.0.5.0

does anyone have any ideas ? thanks
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: Stu Redman on January 03, 2009, 12:09:34 PM
You configured aMule wrong: --disable-unicode --without-unicode
aMule does not run without unicode. Reconfigure it without these options and make clean; make
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 03, 2009, 02:26:54 PM
done. error still occurs.

attempted to build with:
Code: [Select]
~/aMule-2.2.3$ ./configure --with-wx-prefix=/opt/wx --prefix=/opt/amuleand also tried
Code: [Select]
~/aMule-2.2.3$ ./configure --prefix=/opt/amule
Code: [Select]
export LD_LIBRARY_PATH="/opt/wx/lib"
ldconfig (root)

added /opt/wx/lib into last entry of ld.so.conf and ran ldconfig

Code: [Select]
# ln -s /opt/wx/bin/wx-config /usr/bin/wx-config
# ln -s /opt/wx/bin/wxrc /usr/bin/wxrc
# ln -s /opt/wx/bin/wxrc-2.8 /usr/bin/wxrc-2.8
export PATH=$PATH$:/opt/wx/bin

none had any effect

is it possible that --prefix also affects library locating ? in the meanwhile I am trying to build without any options at all, next i will try to build wxgtk also without any extra options like --prefix on the assumption that the configure script uses --prefix not just as a destination directory
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: Stu Redman on January 03, 2009, 03:13:25 PM
Did you make clean before make ?
If yes, please repost full informaton (as in first post).
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 04, 2009, 05:07:00 AM
yes, of corse, here is the new output: http://manoa.flnet.org/error2.log
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: GonoszTopi on January 04, 2009, 08:37:33 AM
I would be interested in the configure options you used to compile wxWidgets (and maybe the compiler and linker flags, too [CFLAGS, CXXFLAGS, LDFLAGS]). At first sight I guess that wxWidgets has been compiled with run-time type information (RTTI) disabled.
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 04, 2009, 11:13:44 AM
Code: [Select]
./configure --prefix=/opt/wx --enable-unicode --with-gtk --with-unicodeI have explicitly did export CXXFLAGS="-frtti -fexceptions" which can be observed when compiling with full output, however what you say is true, you can see that during the build you can see "g++ -fno-rtti -fno-exceptions -frtti -fexceptions" which is probably because I have added that (it's a good thing the last options are those that override), but that does not make sense because if I did not specify these options during the build of wxGTK how did those options get there...

I will try to delete wxGTK and this time build it with explicit --disable-noexceptions etc... maybe they are auto-added when not specified
CFLAGS and LDFLAGS were not exported before the config script

now I am going to try this:
wxGTK 2.8.9
Code: [Select]
./configure --prefix=/opt/wx --disable-no_exceptions --disable-no_rtti --disable-compat26 --disable-profile --disable-mem_tracing --disable-debug --disable-debug_flag --disable-debug_info --disable-debug_gdb --disable-debug_cntxt --disable-optimise --enable-unicode --with-gtk --with-unicodeaMule 2.2.3
Code: [Select]
./configure --with-wx-prefix=/opt/wx --prefix=/opt/amule --with-denoise-level=0 --disable-debug --disable-upnp --disable-optimize --disable-profile --disable-amulecmd --disable-amule-gui --disable-amule-daemon --disable-webserver --disable-cas --disable-wxcas --disable-ed2k --disable-alc --disable-alcc --disable-systray --disable-geoip --disable-nls
see if it makes a difference, I call this "clean build" no debug and no optimize (aka 1:1 with written code)

yep that did it, this specific configuration worked. thanks, now I was wondering how does one build it against GTK 1.x ?
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: GonoszTopi on January 04, 2009, 02:37:49 PM
now I was wondering how does one build it against GTK 1.x ?

No way. aMule requires a unicode-enabled wxWidgets build, but it is not supported with GTK 1.x.
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 04, 2009, 02:46:46 PM
the INSTALL file clearly indicated that:

Quote
Requirements
--------------

  You will need glib/gtk-1.2.10 (package names like glib and glibdev
  or glib-devel, gtk and gtkdev or gtk-devel or similar) or gtk2
  (package names correspond to gtk ones), libexpat (package name
  should be expat) and gettext to compile aMule. Also wxWidgets-2.4.2 or greater (wxGTK-2.6.x is recommended),
  linked against glib/gtk-1.2.10 is needed (package names wxGTK and
  wxGTK-devel or similar).

Quote
How to compile wxWidgets
--------------------------

  Only GTK1 is supported. GTK2 with wxWidgets 2.6 and greater, but it is known
  to have lots of leaks and so is not supported.

  For GTK1:
  ./configure  --prefix=/usr --disable-gtk2 --with-gtk && make

I tried that it didn't work was wondering why (used even earlier than 2.3 wxGTK)
incase still not possible, what other things can be disabled in wxGTK if only the above amule components are needed ? I suspect there is alote of junk still enabled.. still I have to mention this, good work on it, it's come a long way from the bugs it had at the times when WINEd emule was better, that seems to be no longer the case, amule is considered the only fully functional (best) ed2k/kad client ?
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: GonoszTopi on January 04, 2009, 04:49:50 PM
... the last update of the INSTALL file was at 6th Jan 2006  :-[

Seems like it needs some attention.
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: wuischke on January 04, 2009, 08:13:33 PM
I'll have a look at it.
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 05, 2009, 08:55:32 AM
damn I built the monolithic when I realize now I should have built amuledamuleweb but that shouldn't be a problem now that I do know it builds well, and yeah, it is better than either GTK1/2, commandline no gui beats anything

...

omholyg....look at the optional features list of wxBase....
typing of which...you think you could give me a little more hand on another jam ? http://manoa.flnet.org/error3.log
I tried several config parameters none of them had effect, I am wondering what it may have to do with... it seems to be according to instructions on the wiki but it is still not goin...
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: GonoszTopi on January 05, 2009, 10:31:13 PM
I suggest to download the wxAll (http://sourceforge.net/project/showfiles.php?group_id=9863&package_id=58517) package and configure it with the very same options. At least it contains all files for sure ;)
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 06, 2009, 06:19:17 PM
yhe that worked, thanks again, building of amuled was mutch faster too, and that CPU and memory you mentioned in the Wiki, it is alote more significant than it seems, before amule was taking up 60MB now it only takes 20MB, and CPU was above 40% all the time (up to 100%), now it does not go past 6%
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: Stu Redman on January 06, 2009, 07:16:23 PM
Sounds like you found the --enable-optimize option.  ;)
Title: Re: 2.2.3: Linking error "undefined reference to typeinfo"
Post by: monohouse on January 06, 2009, 07:38:41 PM
yes, but I haven't used it yet, this is with --disable-optimize specified explicitly in both wxbase and amule, maybe sometimes letting code run as written is better who knows...later on I will build with ICC10 and good icc.cfg and see what happens then, I still haven't finished finding all the options that can be disabled in wxWidgets, so far I tested maybe 5% of them all, once wx is properly configured I can start working on what else can be done, but the initial results are exceptional, hard to believe the graphics stuff are so heavy...

still amule seems to have increased ram usage over time
Code: [Select]
62.5 MB after 1 Days 09:36 hours
115 MB after 2 Days 20:47 hours
126 MB after 4 Days 20:31 hours
file buffer size: 1.5MB
queue size: 500
Number of Shared Files: 62
Total size of Shared Files: 67.52 GB
Average file size: 1.09 GB
Active Connections (estimate): 16
Max Connection Limit Reached: Never
Average Connections (estimate): 14.8372
Peak Connections (estimate): 61
Code: [Select]
231MB VIRT, 130MB RES after 7 Days 13:08 hoursthe VIRT is really taking space in swap