On amd64 platform, emerge of app-text/mbtpdfasm-1.0.26-r1 fails in the compile phase, if I am using gcc 4.1: >>> Compiling source in /var/tmp/portage/mbtpdfasm-1.0.26-r1/work/mbtPdfAsm-1.0.26 ... x86_64-pc-linux-gnu-g++ -pipe -march=athlon64 -O2 -fomit-frame-pointer -c main.cpp -o out/main.o In file included from pdfFile.hpp:8, from main.cpp:29: diversPdf.hpp:109:1: warning: "__N" redefined In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string:45, from listeFichiers.hpp:6, from main.cpp:28: /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h:103:1: warning: this is the location of the previous definition x86_64-pc-linux-gnu-g++ -pipe -march=athlon64 -O2 -fomit-frame-pointer -c pdfFile.cpp -o out/pdfFile.o pdfFile.cpp:2666:2: warning: no newline at end of file pdfFile.cpp: In member function ‘int C_pdfFile::makeAttrib(C_pdfFile*, char*, int, char**, char*, int)’: pdfFile.cpp:948: error: cast from ‘char*’ to ‘int’ loses precision make: *** [out/pdfFile.o] Error 1 A workaround is to compile with gcc 3. Here is my emerge --info: Gentoo Base System version 1.12.1 Portage 2.1 (default-linux/amd64/2005.1, gcc-4.1.1/amd64-vanilla, glibc-2.3.6-r3, 2.6.17-rc5 x86_64) ================================================================= System uname: 2.6.17-rc5 x86_64 AMD Athlon(tm) 64 Processor 3400+ ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r2 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16-r1, 2.16.1-r2 sys-devel/gcc-config: 2.0.0_rc1 sys-devel/libtool: 1.3.5, 1.5.22 virtual/os-headers: 2.6.16 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-pipe -march=athlon64 -O2 -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-pipe -march=athlon64 -O2 -fomit-frame-pointer" DISTDIR="/portages/distfiles" FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" MAKEOPTS="-j1" PKGDIR="/portages/packages64" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="amd64 X X509 aalib acl acpi alsa apache2 arts artswrappersuid audiofile avi bash-completion berkdb bitmap-fonts bonobo bzip2 cairo cdparanoia cdr chroot cli crypt cscope cups curl divx4linux doc dri dvd dvdr dvi eds effects emacs emboss encode erandom esd expat f77 faad ffmpeg flac font-server fontconfig foomaticdb fortran fpx freetype gcj gd gdbm gif gimp gimpprint glut gmp gpgme gpm graphviz gs gstreamer guile hardenedphp httpd idn imagemagick imlib inkjar innodb ipv6 isdnlog jack jack-tmpfs java jbig jpeg jpeg2k kde kipi lcms libsamplerate live lzo lzw lzw-tiff mad maildir mbox menubar mng motif mozcalendar mozilla mozp3p mozsvg mozxmlterm mp3 mpeg mpeg2 multislot ncurses network nls nntp nodrm nptl nptlonly nsplugin objc ofx ogg oggvorbis openexr opengl oss pam pcre pdf pdflib perl php png pop pop3d portaudio ppds pppd python qt quicktime quotes readline reflection rtc scanner sdk sdl session smime smtp spell spl ssl stream svg t1lib tabs tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb uudeview vcd vim-with-x vlm vorbis wmf xface xine xml xml2 xmms xorg xpm xprint xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_wacom kernel_linux userland_GNU video_cards_nv" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
On amd64 platform, emerge of app-text/mbtpdfasm-1.0.26-r1 fails in the compile phase, if I am using gcc 4.1: >>> Compiling source in /var/tmp/portage/mbtpdfasm-1.0.26-r1/work/mbtPdfAsm-1.0.26 ... x86_64-pc-linux-gnu-g++ -pipe -march=athlon64 -O2 -fomit-frame-pointer -c main.cpp -o out/main.o In file included from pdfFile.hpp:8, from main.cpp:29: diversPdf.hpp:109:1: warning: "__N" redefined In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/string:45, from listeFichiers.hpp:6, from main.cpp:28: /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/include/g++-v4/x86_64-pc-linux-gnu/bits/c++config.h:103:1: warning: this is the location of the previous definition x86_64-pc-linux-gnu-g++ -pipe -march=athlon64 -O2 -fomit-frame-pointer -c pdfFile.cpp -o out/pdfFile.o pdfFile.cpp:2666:2: warning: no newline at end of file pdfFile.cpp: In member function âint C_pdfFile::makeAttrib(C_pdfFile*, char*, int, char**, char*, int)â: pdfFile.cpp:948: error: cast from âchar*â to âintâ loses precision make: *** [out/pdfFile.o] Error 1 A workaround is to compile with gcc 3. Here is my emerge --info: Gentoo Base System version 1.12.1 Portage 2.1 (default-linux/amd64/2005.1, gcc-4.1.1/amd64-vanilla, glibc-2.3.6-r3, 2.6.17-rc5 x86_64) ================================================================= System uname: 2.6.17-rc5 x86_64 AMD Athlon(tm) 64 Processor 3400+ ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r2 dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16-r1, 2.16.1-r2 sys-devel/gcc-config: 2.0.0_rc1 sys-devel/libtool: 1.3.5, 1.5.22 virtual/os-headers: 2.6.16 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-pipe -march=athlon64 -O2 -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-pipe -march=athlon64 -O2 -fomit-frame-pointer" DISTDIR="/portages/distfiles" FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" MAKEOPTS="-j1" PKGDIR="/portages/packages64" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="amd64 X X509 aalib acl acpi alsa apache2 arts artswrappersuid audiofile avi bash-completion berkdb bitmap-fonts bonobo bzip2 cairo cdparanoia cdr chroot cli crypt cscope cups curl divx4linux doc dri dvd dvdr dvi eds effects emacs emboss encode erandom esd expat f77 faad ffmpeg flac font-server fontconfig foomaticdb fortran fpx freetype gcj gd gdbm gif gimp gimpprint glut gmp gpgme gpm graphviz gs gstreamer guile hardenedphp httpd idn imagemagick imlib inkjar innodb ipv6 isdnlog jack jack-tmpfs java jbig jpeg jpeg2k kde kipi lcms libsamplerate live lzo lzw lzw-tiff mad maildir mbox menubar mng motif mozcalendar mozilla mozp3p mozsvg mozxmlterm mp3 mpeg mpeg2 multislot ncurses network nls nntp nodrm nptl nptlonly nsplugin objc ofx ogg oggvorbis openexr opengl oss pam pcre pdf pdflib perl php png pop pop3d portaudio ppds pppd python qt quicktime quotes readline reflection rtc scanner sdk sdl session smime smtp spell spl ssl stream svg t1lib tabs tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts unicode usb uudeview vcd vim-with-x vlm vorbis wmf xface xine xml xml2 xmms xorg xpm xprint xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_wacom kernel_linux userland_GNU video_cards_nv" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
This is an issue already seen, expecially on amd64, see bug #135040 for more info (no fix actually....)
@Matteo: ok, so I just wait for bug #135040?
Created attachment 88940 [details, diff] change 'char *add' to 'int *add' I grep'ed the source and this seems just fine. (I am on x86-only so cannot test.)
Just realized that 'int add' instead of 'int *add' could be better. :)
Created attachment 88941 [details, diff] version 2 Ok, changing 'char *add' to 'int add' seems fine. Then memcpy complains. Changing 'add' to '(char *)add' compiles. Casting this way may not lose precision? :)
Please apply this patch
in CVS as *-r2.