g++ errors [Was: XEmacs or Gentoo error?]
Vladimir G. Ivanovic
vgivanovic at comcast.net
Wed May 30 05:36:14 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mats,
Very nice. Thanks.
I applied your patches, but I still get these errors using
- ---with-xemacs-compiler=g++
src/eval.c:6008: error: cast from 'void*' to 'int' loses precision
src/event-unixoid.c:364: error: cast from 'void*' to 'int' loses precision
src/event-unixoid.c:365: error: cast from 'void*' to 'int' loses precision
src/event-unixoid.c:366: error: cast from 'void*' to 'int' loses precision
src/process-unix.c:849: error: cast from 'void*' to 'int' loses precision
src/process-unix.c:850: error: cast from 'void*' to 'int' loses precision
BTW, the gcc version with your patches compiles, tests and seems to
run just fine.
- --- Vladimir
Mats Lidell wrote:
> This sounded like a funny thing to try so I gave it a spin and did a
> half hearted attempt to get it all the way through. Since I know very
> little about the internals this is merely one way to get it through a
> c++ compile. I haven't even tried to compile the patched version with
> gcc. Still hopefully this patch can provide useful for fixing this.
>
> Patch and build-report below. (Don't get misled by the fact that the
> patch starts with ldap. Apparently the C build gets passed the fact
> that the API used is marked deprecated while C++ doesn't. A configure
> thing? The interesting stuff follows. There is a linuxplay patch in
> here too.)
>
> Index: modules/ldap/eldap.h
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/modules/ldap/eldap.h,v
> retrieving revision 1.4
> diff -u -r1.4 eldap.h
> --- modules/ldap/eldap.h 2005/10/25 08:32:42 1.4
> +++ modules/ldap/eldap.h 2007/05/30 07:03:23
> @@ -22,6 +22,7 @@
> #define INCLUDED_eldap_h_
>
> #include <lber.h>
> +#define LDAP_DEPRECATED 1
> #include <ldap.h>
>
> /*
> Index: src/emacs.c
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs.c,v
> retrieving revision 1.168
> diff -u -r1.168 emacs.c
> --- src/emacs.c 2006/06/21 17:30:36 1.168
> +++ src/emacs.c 2007/05/30 07:03:25
> @@ -3368,7 +3368,8 @@
> /* If we can, try to avoid problems with super-optimizing compilers
> that might decide that memcmp (ptr, ptr, len) can be optimized
> away since its result is always 1. */
> - memcmp (ptr, (Rawbyte *) ptr + 1, len - 1);
> + // memcmp (ptr, (Rawbyte *) ptr + 1, len - 1);
> + memcmp (ptr, ((char*)ptr + 1), len - 1);
> else
> memcmp (ptr, ptr, len);
> }
> Index: src/font-mgr.h
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/font-mgr.h,v
> retrieving revision 1.6
> diff -u -r1.6 font-mgr.h
> --- src/font-mgr.h 2007/04/30 16:46:36 1.6
> +++ src/font-mgr.h 2007/05/30 07:03:25
> @@ -137,7 +137,7 @@
> DECLARE_EISTRING (eistrpxft_name); \
> FcChar8 *name = FcNameUnparse (pattern); \
> \
> - eicpy_ext(eistrpxft_name, name, Qfc_font_name_encoding); \
> + eicpy_ext(eistrpxft_name, (Extbyte*)name, Qfc_font_name_encoding); \
> DEBUG_XFT1 (level, format, eidata(eistrpxft_name)); \
> free (name); \
> } while (0)
> Index: src/linuxplay.c
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/linuxplay.c,v
> retrieving revision 1.21
> diff -u -r1.21 linuxplay.c
> --- src/linuxplay.c 2007/05/19 17:21:30 1.21
> +++ src/linuxplay.c 2007/05/30 07:03:25
> @@ -275,7 +275,8 @@
> fmtType ffmt;
> int fmt,speed,tracks;
> void *pptr, *optr, *cptr, *sptr;
> - int wrtn,rrtn,crtn,prtn;
> + int wrtn,crtn;
> + size_t rrtn,prtn;
> Binbyte sndbuf[SNDBUFSZ];
>
> /* We need to read at least the header information before we can start
> Index: src/objects-tty.c
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-tty.c,v
> retrieving revision 1.19
> diff -u -r1.19 objects-tty.c
> --- src/objects-tty.c 2007/02/22 16:19:44 1.19
> +++ src/objects-tty.c 2007/05/30 07:03:26
> @@ -378,7 +378,7 @@
> if (strchr ((const char *) fontname, '/'))
> {
> if (tty_font_spec_matches_charset (XDEVICE (device), charset, 0,
> - font, 0, -1, 0))
> + font, 0, -1, initial))
> return font;
> return Qnil;
> }
> Index: src/objects-xlike-inc.c
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-xlike-inc.c,v
> retrieving revision 1.6
> diff -u -r1.6 objects-xlike-inc.c
> --- src/objects-xlike-inc.c 2007/02/22 16:19:44 1.6
> +++ src/objects-xlike-inc.c 2007/05/30 07:03:26
> @@ -61,7 +61,7 @@
> const Ibyte *new_hyphening;
>
> for (hyphen_count = 0;
> - NULL != (new_hyphening = memchr((const void *)hyphening, '-', length));
> + NULL != (new_hyphening = (const Ibyte*)memchr((const void *)hyphening, '-', length));
> hyphen_count++)
> {
> ++new_hyphening;
> @@ -518,7 +518,7 @@
> if (cr->rfc3066)
> {
> DECLARE_DEBUG_FONTNAME (name);
> - CHECKING_LANG (0, eidata(name), cr->language);
> + CHECKING_LANG (0, (Extbyte *)eidata(name), cr->language);
> lang = (FcChar8 *) cr->rfc3066;
> }
> else if (cr->charset)
> @@ -786,7 +786,7 @@
> for (j = 0; j < registries_len; ++j)
> {
> if (0 == qxestrcasecmp(XSTRING_DATA(XVECTOR_DATA(registries)[j]),
> - FALLBACK_ASCII_REGISTRY))
> + (Ibyte*)FALLBACK_ASCII_REGISTRY))
> {
> have_latin1 = 1;
> break;
> Index: src/sysdep.h
> ===================================================================
> RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sysdep.h,v
> retrieving revision 1.22
> diff -u -r1.22 sysdep.h
> --- src/sysdep.h 2004/02/25 20:05:33 1.22
> +++ src/sysdep.h 2007/05/30 07:03:26
> @@ -26,10 +26,6 @@
>
> #include <setjmp.h>
>
> -#ifndef WIN32_NATIVE
> -extern char **environ;
> -#endif
> -
> #ifdef PDUMP
> int pdump_read_file (char **pdump_start_pos, size_t *pdump_length);
> #endif
> @@ -67,6 +63,10 @@
> void unrequest_sigio (void);
>
> BEGIN_C_DECLS
> +
> +#ifndef WIN32_NATIVE
> +extern char **environ;
> +#endif
>
> void stop_interrupts (void);
> void start_interrupts (void);
>
> ======================================================================
>
> uname -a: Linux spencer 2.6.20-gentoo-r8 #3 SMP Mon May 28 23:43:45 CEST 2007 i686 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux
>
> ./configure '--prefix=/src/beta/xemacs' '--enable-mule' '--with-package-path=/src/xemacs/xemacs-packages:/src/xemacs/mule-packages:/src/xemacs/site-packages' '--enable-sound=esd' '--enable-database=no' '--enable-widgets=athena' '--enable-dialogs=athena' '--with-athena=3d' '--with-newgc' '--with-xft=emacs,tabs,menubars,gauges' '--with-xim=no' '--with-gnome' '--with-xemacs-compiler=g++'
>
>
> XEmacs 21.5-b28 "fuki" (+CVS-20070529) configured for `i686-pc-linux'.
>
> Compilation Environment and Installation Defaults:
> Source code location: /src/xemacs/working
> Installation prefix: /src/beta/xemacs
> Operating system description file: `s/linux.h'
> Machine description file: `m/intel386.h'
> Compiler version: g++ (GCC) 4.1.2 (Gentoo 4.1.2)
> - GCC specs file: specs.
> - Compiler command: g++ -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts -Wpacked -Weffc++ -g
> Compiler version for lib-src: (detection code unimplemented)
> - Compiler command for lib-src: gcc -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts -Wpacked -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -g
> libc version: 2.5
> Relocating allocator for buffers: no
> GNU version of malloc: yes
> - Using Doug Lea's new malloc from the GNU C Library.
>
> Window System:
> Compiling in support for the X window system:
> - X Windows headers location: /usr/X11R6/include
> - X Windows libraries location: /usr/X11R6/lib
> - Handling WM_COMMAND properly.
> - Using fontconfig to manage fonts.
> - Compiling in support for Xft antialiased fonts (EXPERIMENTAL).
> Compiling in support for the Athena widget set:
> - Athena headers location: X11/Xaw3d
> - Athena library to link: Xaw3d
> Using Lucid menubars.
> - Using Xft to render antialiased fonts in menubars.
> WARNING: This feature will be replaced with a face.
> Using Lucid scrollbars.
> Using Athena dialog boxes.
> Using Athena native widgets.
> - Using Xft to render antialiased fonts in tab controls.
> WARNING: This feature will be replaced with a face.
> - Using Xft to render antialiased fonts in progress bars.
> WARNING: This feature will be replaced with a face.
> WARNING: This feature not yet implemented; setting ignored.
>
> TTY:
> Compiling in support for ncurses.
> Compiling in support for GPM (General Purpose Mouse).
>
> Images:
> Compiling in support for GIF images (builtin).
> Compiling in support for XPM images.
> Compiling in support for PNG images.
> Compiling in support for JPEG images.
> Compiling in support for TIFF images.
>
> Sound:
> Compiling in support for sound (native).
> Compiling in support for ALSA (Advanced Linux Sound Architecture).
> Compiling in support for ESD (Enlightened Sound Daemon).
>
> Databases:
> Compiling in support for LDAP.
>
> Internationalization:
> Compiling in support for Mule (multi-lingual Emacs).
>
> Mail:
> Compiling in support for "file" mail spool file locking method.
>
> Other Features:
> Inhibiting IPv6 canonicalization at startup.
> Compiling in support for dynamic shared object modules.
> Using the new GC mark algorithms (KKCC).
> WARNING: ---------------------------------------------------------
> WARNING: The new algorithms are experimental. They are enabled by
> WARNING: default for this release. Use `--disable-kkcc' to
> WARNING: turn it off.
> WARNING: ---------------------------------------------------------
> Using the new incremental garbage collector and the new allocator.
> Using POSIX sigaction() to install fault handler.
> Using the new portable dumper.
> Compiling in support for extra debugging code.
> Compiling in support for runtime error checking.
> WARNING: ---------------------------------------------------------
> WARNING: XEmacs will run noticeably more slowly as a result.
> WARNING: Error checking is on by default for XEmacs beta releases.
> WARNING: ---------------------------------------------------------
>
>
> Contents of file xemacs-make-all.err
> Keeping lines matching (in python regexp syntax): "^--\[\[|\]\]$|^(cd|n?make)\s|errors?|warnings?|pure.*(space|size)|hides|strange|shadowings|^Compil(ing\s+in|ation)|^Using|not\s+found|^Note:|Installing|[Ff]ile\(s\) copied|\s+tests\s+|^[A-Z] [^ ]+$|^Wrong number of arguments:|^ \*\* |^(FAIL|SKIP):"
> ... and then deleting lines matching (in python regexp syntax): "confl.*with.*auto-inlining|^Formatting:|^PASS:|\(100%\) tests successful"
> ------------------------------------------------------------------------------
> cd ./lib-src && make all
> cd ./lwlib && make all
> cd ./src && make all
> emacs.c:3372: warning: statement has no effect
> gc.c:137: warning: non-local variable '<anonymous struct> gc_state' uses anonymous type
> Using load-path (/src/xemacs/working/lisp/)
> Using module-load-path (/src/xemacs/working/modules)
> Generating autoloads for lisp/next-error.el...
> Computing custom-loads for next-error...
> cd ./modules/ldap && make all
> cd /src/xemacs/working/man && make info
> ------------------------------------------------------------------------------
>
> Contents of file xemacs-make-check.err
> Keeping lines matching (in python regexp syntax): "^--\[\[|\]\]$|^(cd|n?make)\s|errors?|warnings?|pure.*(space|size)|hides|strange|shadowings|^Compil(ing\s+in|ation)|^Using|not\s+found|^Note:|Installing|[Ff]ile\(s\) copied|\s+tests\s+|^[A-Z] [^ ]+$|^Wrong number of arguments:|^ \*\* |^(FAIL|SKIP):"
> ... and then deleting lines matching (in python regexp syntax): "confl.*with.*auto-inlining|^Formatting:|^PASS:|\(100%\) tests successful"
> ------------------------------------------------------------------------------
> cd ./src && make check
> base64-tests.el: 1234 of 1234 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> byte-compiler-tests.el: 104 of 104 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> c-tests.el: 4 of 4 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> case-tests.el: 1148 of 1148 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> ccl-tests.el: 4570 of 4570 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> database-tests.el: No tests run.
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> extent-tests.el: 194 of 194 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> hash-table-tests.el: 9866 of 9866 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> iso-ir-196-test.el: 2 of 2 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> lisp-reader-tests.el: 52 of 52 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> lisp-tests.el: 3672 of 3672 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> md5-tests.el: 56 of 56 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> mule-tests.el: 1042 of 1042 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> os-tests.el: 20 of 20 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> regexp-tests.el: 350 of 350 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> region-tests.el: 28 of 28 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> symbol-tests.el: 246 of 246 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (syntax-error "Unbalanced parentheses")
> KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (syntax-error "Unbalanced parentheses")
> syntax-tests.el: 72 of 78 tests successful ( 92%).
> KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (syntax-error "Unbalanced parentheses")
> KNOWN BUG: (backward-up-list-moves-point-from-to 23 3) ==> error: (syntax-error "Unbalanced parentheses")
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> tag-tests.el: 6 of 6 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> weak-tests.el: 140 of 140 tests successful (100%).
> 0 errors that should have been generated, but weren't
> 0 wrong-error failures
> base64-tests.el: 1234 of 1234 tests successful (100%).
> byte-compiler-tests.el: 104 of 104 tests successful (100%).
> c-tests.el: 4 of 4 tests successful (100%).
> case-tests.el: 1148 of 1148 tests successful (100%).
> ccl-tests.el: 4570 of 4570 tests successful (100%).
> database-tests.el: No tests run.
> extent-tests.el: 194 of 194 tests successful (100%).
> hash-table-tests.el: 9866 of 9866 tests successful (100%).
> iso-ir-196-test.el: 2 of 2 tests successful (100%).
> lisp-reader-tests.el: 52 of 52 tests successful (100%).
> lisp-tests.el: 3672 of 3672 tests successful (100%).
> md5-tests.el: 56 of 56 tests successful (100%).
> mule-tests.el: 1042 of 1042 tests successful (100%).
> os-tests.el: 20 of 20 tests successful (100%).
> regexp-tests.el: 350 of 350 tests successful (100%).
> region-tests.el: 28 of 28 tests successful (100%).
> symbol-tests.el: 246 of 246 tests successful (100%).
> syntax-tests.el: 72 of 78 tests successful ( 92%).
> tag-tests.el: 6 of 6 tests successful (100%).
> weak-tests.el: 140 of 140 tests successful (100%).
> ------------------------------------------------------------------------------
>
> Contents of file xemacs-make-install.err
> Keeping lines matching (in python regexp syntax): "^--\[\[|\]\]$|^(cd|n?make)\s|errors?|warnings?|pure.*(space|size)|hides|strange|shadowings|^Compil(ing\s+in|ation)|^Using|not\s+found|^Note:|Installing|[Ff]ile\(s\) copied|\s+tests\s+|^[A-Z] [^ ]+$|^Wrong number of arguments:|^ \*\* |^(FAIL|SKIP):"
> ... and then deleting lines matching (in python regexp syntax): "confl.*with.*auto-inlining|^Formatting:|^PASS:|\(100%\) tests successful"
> ------------------------------------------------------------------------------
> cd ./lib-src && make all
> cd ./lwlib && make all
> cd ./src && make all
> cd ./modules/ldap && make all
> cd /src/xemacs/working/man && make info
> cd ./src && make check-features
> Installing utilities run internally by XEmacs.
> Installing utilities for users to run.
> cd /src/beta/xemacs/bin && rm -f ./xemacs && ln -s xemacs-21.5-b28 ./xemacs
> cd /src/xemacs/working/etc && \
> make gzip-el
> ------------------------------------------------------------------------------
>
> Yours
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (GNU/Linux)
iD8DBQFGXUWOEo/yvZUwubMRAud4AJ4sniFSw1j7O+zcaLyeM2i6mM6PWgCfS3J7
vxAZNvsnqYlZ+/bIfsFd0bw=
=gyj4
-----END PGP SIGNATURE-----
More information about the XEmacs-Beta
mailing list