Bug 232766 - sys-fs/mtools-3.9.10 - cc1: error: unrecognized command line option "-m486"
Bug#: 232766 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: base-system@gentoo.org Reported By: mike@weisso.com
Component: Ebuilds
URL: 
Summary: sys-fs/mtools-3.9.10 - cc1: error: unrecognized command line option "-m486"
Keywords:  
Status Whiteboard: 
Opened: 2008-07-23 16:21 0000
Description:   Opened: 2008-07-23 16:21 0000
When trying to build sys-fs/mtools-3.9.10 on autoconf-2.62-r1 and
glibc-2.8_p20080602-r0, mtools fails to compile, complaining about Autoconf
'Present But Cannot Be Compiled' warnings and cc1: error: unrecognized command
line option "-m486". 

Not sure if this is an i486 only issue, if so probably something like:
    if [ "$host_cpu" = i486 ] ; then
        filter-flags "-m486"
    fi
would fix it, but i have to test that. 


Reproducible: Always

Steps to Reproduce:
1. gcc-config i486-pc-linux-gnu-4.3.1 
2. emerge mtools
3.

Actual Results:  
relevant error logs:
configure: WARNING: sys/socket.h: present but cannot be compiled
configure: WARNING: sys/socket.h:     check for missing prerequisite headers?
configure: WARNING: sys/socket.h: see the Autoconf documentation
configure: WARNING: sys/socket.h:     section "Present But Cannot Be Compiled"
configure: WARNING: sys/socket.h: proceeding with the preprocessor's result
configure: WARNING: sys/socket.h: in the future, the compiler will take
precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##
checking for sys/socket.h... yes
checking arpa/inet.h usability... no
checking arpa/inet.h presence... yes
configure: WARNING: arpa/inet.h: present but cannot be compiled
configure: WARNING: arpa/inet.h:     check for missing prerequisite headers?
configure: WARNING: arpa/inet.h: see the Autoconf documentation
configure: WARNING: arpa/inet.h:     section "Present But Cannot Be Compiled"
configure: WARNING: arpa/inet.h: proceeding with the preprocessor's result
configure: WARNING: arpa/inet.h: in the future, the compiler will take
precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##
checking for arpa/inet.h... yes
checking netdb.h usability... no
checking netdb.h presence... yes
configure: WARNING: netdb.h: present but cannot be compiled
configure: WARNING: netdb.h:     check for missing prerequisite headers?
configure: WARNING: netdb.h: see the Autoconf documentation
configure: WARNING: netdb.h:     section "Present But Cannot Be Compiled"
configure: WARNING: netdb.h: proceeding with the preprocessor's result
configure: WARNING: netdb.h: in the future, the compiler will take precedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##

and

i486-pc-linux-gnu-gcc  -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc/mtools\" -DCPU_i486
-DVENDOR_pc -DOS_linux_gnu  -O2 -march=core2 -pipe -g -ggdb -m486 -Wall
-fno-strict-aliasing -I.  -I.   -c copyfile.c
cc1: error: unrecognized command line option "-m486"
cc1: error: unrecognized command line option "-m486"
cc1: error: unrecognized command line option "-m486"
cc1: error: unrecognized command line option "-m486"





Portage 2.2_rc2 (default/linux/x86/2008.0, gcc-4.3.1, glibc-2.8_p20080602-     
      r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.24-gentoo-r8-i686-Intel-R-_Core-TM-2_Quad_CPU_Q660     
      0_@_2.40GHz-with-glibc2.0
Timestamp of tree: Wed, 23 Jul 2008 13:30:03 +0000
distcc 2.18.3 i486-pc-linux-gnu (protocols 1 and 2) (default port 3632) [d     
      isabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k     
      1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0
intel8x0            m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug fi     
      le hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug
ra            te route share shm softvol"
ANT_HOME="/usr/share/ant-core"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm     
       authn_default authn_file authz_dbm authz_default authz_groupfile
authz_ho            st authz_owner authz_user autoindex cache dav dav_fs
dav_lock deflate dir             disk_cache env expires ext_filter file_cache
filter headers include info l            og_config logio mem_cache mime
mime_magic negotiation rewrite setenvif spe            ling status unique_id
userdir usertrack vhost_alias"
APACHE2_MPMS="prefork"
ARCH="x86"
AUTOCLEAN="yes"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -march=core2  -pipe -fomit-frame-pointer -g -ggdb"
CHOST="i486-pc-linux-gnu"
CLASSPATH="."
CLEAN_DELAY="5"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/     
       /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf
/etc/gentoo-rele            ase /etc/php/apache2-php5/ext-active/
/etc/php/cgi-php5/ext-active/ /etc/p            hp/cli-php5/ext-active/
/etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c            
/etc/udev/rules.d"
CVS_RSH="ssh"
CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer -g -ggdb"
DCCC_PATH="/usr/lib/distcc/bin"
DISTCC_LOG=""
DISTCC_VERBOSE="0"
DISTDIR="/usr/portage/distfiles"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="-v"
EMERGE_WARNING_DELAY="10"
FEATURES="ccache collision-protect distlocks metadata-transfer nostrip par     
      allel-fetch preserve-libs sandbox sfperms strict test unmerge-orphans
user            fetch userpriv"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${FILE     
      }" "${URI}""
FLTK_DOCDIR="/usr/share/doc/fltk-1.1.7-r3/html"
GCC_SPECS=""
GDK_USE_XFT="1"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ "
HOME="/root"
HTDOCS="/var/www/localhost/htdocs"
INFODIR="/usr/GNUstep/System/Library/Documentation/info:/usr/GNUstep/Local     
      /Library/Documentation/info"
INFOPATH="/usr/share/info:/usr/share/binutils-data/i486-pc-linux-gnu/2.18/     
     
info:/usr/share/gcc-data/i486-pc-linux-gnu/4.3.1/info:/usr/GNUstep/System/     
      Library/Documentation/info:/usr/GNUstep/Local/Library/Documentation/info"
INPUT_DEVICES="keyboard mouse evdev"
JAVAC="/etc/java-config-2/current-system-vm/bin/javac"
JAVA_HOME="/etc/java-config-2/current-system-vm"
JDK_HOME="/etc/java-config-2/current-system-vm"
KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncur     
      ses text"
LDFLAGS="-Wl,-O1"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LOGNAME="root"
LS_COLORS="rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:c     
     
d=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;     
     
42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh     
     
=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:     
     
*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.j     
     
ar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=     
     
01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=0     
     
1;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01     
     
;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;     
     
35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;3     
     
5:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:     
     
*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.     
     
flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=     
     
00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=     
     
00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=0     
     
0;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;3     
      6:"
MAIL="/var/mail/root"
MAKEOPTS="-j5"
MANPATH="/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/us     
     
r/share/man:/usr/share/binutils-data/i486-pc-linux-gnu/2.18/man:/usr/share     
     
/gcc-data/i486-pc-linux-gnu/4.3.1/man:/etc/java-config/system-vm/man/:/usr     
     
/lib/php5/man/:/usr/qt/3/doc/man:/usr/share/postgresql-8.3/man:/opt/opera/     
     
share/man:/usr/GNUstep/System/Library/Documentation/man:/usr/GNUstep/Local     
      /Library/Documentation/man"
MYEBUILDS="/home/mike/myebuilds"
OLDPWD="/var/tmp/portage/sys-fs/mtools-3.9.10-r1/work"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bi     
     
n:/usr/i486-pc-linux-gnu/gcc-bin/4.3.1:/usr/qt/3/bin:/usr/GNUstep/System/T     
      ools:/usr/GNUstep/Local/Tools"
PKGDIR="/usr/portage/packages"
PKG_CONFIG_PATH="/usr/qt/3/lib/pkgconfig"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips     
       ia64 alpha hppa sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib/portage/bin"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_PYM_PATH="/usr/lib/portage/pym"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --com     
      press --force --whole-file --delete --stats --timeout=180
--exclude=/distf            iles --exclude=/local --exclude=/packages"
PORTAGE_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/home/mike/myebuilds"
PWD="/var/tmp/portage/sys-fs/mtools-3.9.10-r1"
QMAKESPEC="linux-g++"
QTDIR="/usr/qt/3"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O "${DISTDIR}/${     
      FILE}" "${URI}""
ROOT="/"
ROOTPATH="/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/4.3.1:/usr/qt/3/bin:/usr     
      /GNUstep/System/Tools:/usr/GNUstep/Local/Tools"
RPMDIR="/usr/portage/rpm"
RUBYOPT="-rauto_gem"
SHELL="/bin/bash"
SHLVL="1"
SSH_CLIENT="XXXXXXX"
SSH_CONNECTION="XXXXXX"
SSH_TTY="/dev/pts/1"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
TERM="xterm"
USE="X acl alsa apache2 avi bash-completion bzip2 cli compat cracklib cryp     
      t cups dbcpalsa dbus dri firefox firfox ftp gd gdbm gpm gstreamer gtk hal
            hddtemp iconv intel isdnlog java java5 java6 javamail jbdc jboss
jpeg libw            ww logitech mailwrapper midi mp3 mpeg mudflap mysql
ncurses nls nptl nptlo            nly ntp nvidia odbc opengl openmp pam pcre
perl png postgres pppd python r            ar readline reflection session spl
ssl svg tcpd unicode vim vim-completion             vim-syntax vim-with-x x86
xml xorg zlib" ALSA_CARDS="ali5451 als4000 atii            xp atiixp-modem
bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es193            8 es1968
fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via           
82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dsh     
      are dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear
met            er mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="ac            tions alias auth_basic authn_alias authn_anon
authn_dbm authn_default auth            n_file authz_dbm authz_default
authz_groupfile authz_host authz_owner auth            z_user autoindex cache
dav dav_fs dav_lock deflate dir disk_cache env expi            res ext_filter
file_cache filter headers include info log_config logio mem            _cache
mime mime_magic negotiation rewrite setenvif speling status unique_           
id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INP     
      UT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad
cfont            z cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
USERLAND="GNU"             VIDEO_CARDS="nvidia"
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS APACHE2_MODULES APACHE2_MPMS CAMER     
      AS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES
FRITZCAPI            _CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS
LIRC_DEVICES MISDN_CARDS U            SERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VIDEO_CARDS="nvidia"
_="/usr/bin/emerge"

------- Comment #1 From Jeroen Roovers 2008-07-23 16:50:27 0000 -------
It's probably time to update CHOST[1].


[1] http://www.gentoo.org/doc/en/change-chost.xml

------- Comment #2 From Jeroen Roovers 2008-07-24 14:24:22 0000 -------
But that aside, the configure script is apparently doing something awful.

------- Comment #3 From Mike Weissman 2008-07-24 14:44:14 0000 -------
Even when i added:

--- mtools-3.9.10/configure.in  2003-02-16 10:13:25.000000000 -0500
+++ mtools-3.9.10/configure-new.in      2008-07-23 11:45:16.000000000 -0400
@@ -330,7 +330,19 @@
 AC_CHECK_LIB(socket,main)
 AC_CHECK_LIB(nsl,main)
 AC_CHECK_LIB(bsd,main)
-AC_CHECK_HEADERS(sys/socket.h arpa/inet.h netdb.h)
+AC_CHECK_HEADERS(sys/socket.h arpa/inet.h netdb.h
+[if HAVE_SOCKET_H
+#include <sys/socket.h>
+#endif
+]
+[[if HAVE_INET_H
+#include <arpa/inet.h
+#endif
+#]
+[[if HAVE_NETDB_H
+#include <netdb.h>
+#endif
+])

The warnings still occur, which i think is indicative of a custom config.h.
From research version 3.9.11 seems to fix a lot of these issues, probably
should just make a version bump request, to make it easy.

------- Comment #4 From Mike Weissman 2008-07-25 15:56:26 0000 -------
works on i486-pc-linux-gnu-4.1.2 and glibc-2.6.1-r0 with:
CFLAGS="-O2 -mtune=prescott -pipe -fomit-frame-pointer -g -ggdb"

Testing on 4.2.4, but i think it has something to do with '-mtune'.

------- Comment #5 From SpanKY 2008-08-17 17:26:30 0000 -------
fixed with 3.9.11

http://sources.gentoo.org/sys-fs/mtools/files/mtools-3.9.11-flags.patch?rev=1.1