Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218661 - cross-mingw32/binutils contain Linux libbfd and libiberty instead of a Windows version
Summary: cross-mingw32/binutils contain Linux libbfd and libiberty instead of a Window...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-20 22:42 UTC by Dennis Schridde
Modified: 2008-04-20 23:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2008-04-20 22:42:07 UTC
The crossdev generated binutils contain a Linux libbfd (there even is a libbfd.so...) instead of a Windows version.

$ mingw32-nm -A /usr/lib/binutils/mingw32/2.18/libbfd.a
mingw32-nm: archive.o: File format not recognized
...

$ x86_64-pc-linux-gnu-nm -A /usr/lib/binutils/mingw32/2.18/libbfd.a
/usr/lib/binutils/mingw32/2.18/libbfd.a:archive.o:0000000000000000 r __PRETTY_FUNCTION__.9082
...

My assumption is that this is a bug in the buildscripts of binutils, but of course it could also be a Gentoo specific problem.

Reproducible: Always

Steps to Reproduce:




Portage 2.1.5_rc5 (default-linux/amd64/2007.0/desktop, gcc-4.3.1-pre20080418, glibc-2.7-r2, 2.6.25-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+
Timestamp of tree: Sun, 20 Apr 2008 10:15:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.5.2-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -march=athlon64"
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/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-pipe -O2 -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu"
LINGUAS="de"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/layman/dirtyepic /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apache2 avahi bash-completion berkdb bluetooth cairo cdr cjk cli cracklib crypt cups dbus dri dvb dvd dvdr dvdread emboss encode evo fam ffmpeg firefox flac foomaticdb fortran gdbm gif gimp gpm gtk hal iconv ipod ipv6 isdnlog jpeg kde kdehiddenvisibility kerberos ldap lm_sensors mad midi mikmod mmx mmxext mp3 mp4 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly nsplugin ogg openal openexr opengl openmp pam pch pcre pdf perl php png ppds pppd python qt3 qt3support qt4 quicktime readline reflection ruby samba sasl sdl session speex spell spl sse sse2 ssl subversion svg tcpd tetex theora threads tiff truetype unicode usb vcd visualization vorbis x264 xcb xcomposite xinerama xml xorg xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


[I] cross-mingw32/binutils (2.18-r1(mingw32)[2]@21/04/08): Tools necessary to build programs
[D] cross-mingw32/gcc (4.2.3(mingw32-4.2)[2]@17/02/08 -> ??): The GNU Compiler Collection.
[I] cross-mingw32/mingw-runtime [1] (3.14@16/01/08): Free Win32 runtime and import library definitions
[I] cross-mingw32/w32api [1] (3.11@16/01/08): Free Win32 runtime and import library definitions
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-04-20 22:54:20 UTC
You probably don't have clear what crossdev produces. What you have is a compiler for Linux (CHOST=linux) built on Linux (CBUILD=linux) for MinGW (CTARGET=mingw). So yeah it's expected that the libbfd in it would be the one that contains the Windows Binary formats (CTARGET) and is used in Linux (CHOST).

To have a Windows DLL of libbfd you have to build it with CHOST _and_ CTARGET set to mingw32, which is not what crossdev does.
Comment 2 Dennis Schridde 2008-04-20 23:02:04 UTC
This also affects libiberty, as I just recognized.

-- after reading comments --

Why do I want a Linux libbfd for a Windows target? Is it needed internally by binutils programs like the assembler?

So I guess I need to compile it myself?