Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 192079

Summary: sys-libs/db-4.5.20_p2 fails to compile w/ binutils-2.17.50.0.12
Product: Gentoo Linux Reporter: Giorgio <giorgio>
Component: [OLD] Core systemAssignee: HPPA Porters <hppa>
Status: RESOLVED NEEDINFO    
Severity: normal CC: toolchain
Priority: High    
Version: unspecified   
Hardware: HPPA   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Full build log
config.log
Build log of sys-devel/binutils-2.17.50.0.12

Description Giorgio 2007-09-11 08:58:03 UTC
sys-libs/db-4.5.20_p2 fails to compile saying "C compiler cannot create executables"

Reproducible: Always

Steps to Reproduce:
1.Simply try to emerge -v sys-libs/db
2.
3.

Actual Results:  
Checks fails aborting the emerge

Expected Results:  
Compile successfully

Portage 2.1.2.12 (default-linux/hppa/2006.1, gcc-4.1.2, glibc-2.3.6-r5, 2.6.22-hppa parisc64)
=================================================================
System uname: 2.6.22-hppa parisc64 PA8600 (PCX-W+)
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 10 Sep 2007 22:00:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17.50.0.12
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="hppa"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-O2 -pipe -march=2.0 -mschedule=8000 -fomit-frame-pointer"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=2.0 -mschedule=8000 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 berkdb bitmap-fonts bzip2 cli cracklib crypt cups firefox foomaticdb fortran gdbm gpm hal hppa iconv imlib isdnlog kde libwww midi mudflap mysql ncurses nls openmp pam pcre perl php pic png pppd python qt readline reflection session spell spl ssl tcpd truetype-fonts type1-fonts unicode vhosts xml2 xorg zlib" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Giorgio 2007-09-11 09:01:52 UTC
Created attachment 130568 [details]
Full build log

GENTOO_VM=  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-09-11 09:10:32 UTC
!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/sys-libs/db-4.5.20_p2/work/db-4.5.20/build_unix/config.log
Comment 3 Giorgio 2007-09-11 09:28:49 UTC
Created attachment 130569 [details]
config.log
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-09-11 09:37:57 UTC
configure:4177: checking for C compiler default output file name
configure:4204: hppa2.0-unknown-linux-gnu-gcc -O2 -pipe -march=2.0 -mschedule=8000 -fomit-frame-pointer  -D_GNU_SOURCE -D_REENTRANT  -Wl,--default-symver conftest.c  >&5
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.2/../../../../hppa2.0-unknown-linux-gnu/bin/ld: unrecognized option '--default-symver'
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.2/../../../../hppa2.0-unknown-linux-gnu/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2007-09-11 14:13:06 UTC
Sadly, Gentoo/HPPA doesn't (yet, ever?) support 64-bit operating systems.
Comment 6 SpanKY gentoo-dev 2007-09-11 17:13:21 UTC
we'll support a 64bit userland on hppa once binutils/gcc supports it

however, i dont think that's related here
Comment 7 SpanKY gentoo-dev 2007-09-11 17:14:14 UTC
Giorgio: post the output of `ld --help` and try this:
echo 'int main(){}' > test.c
gcc -Wl,--default-symver test.c
hppa2.0-unknown-linux-gnu-gcc -Wl,--default-symver test.c
Comment 8 Giorgio 2007-09-11 20:44:53 UTC
Here's the output as requested...

Usage: ld [options] file...
Options:
  -a KEYWORD                  Shared library control for HP/UX compatibility
  -A ARCH, --architecture ARCH
                              Set architecture
  -b TARGET, --format TARGET  Specify target for following input files
  -c FILE, --mri-script FILE  Read MRI format linker script
  -d, -dc, -dp                Force common symbols to be defined
  -e ADDRESS, --entry ADDRESS Set start address
  -E, --export-dynamic        Export all dynamic symbols
  -EB                         Link big-endian objects
  -EL                         Link little-endian objects
  -f SHLIB, --auxiliary SHLIB Auxiliary filter for shared object symbol table
  -F SHLIB, --filter SHLIB    Filter for shared object symbol table
  -g                          Ignored
  -G SIZE, --gpsize SIZE      Small data size (if no size, same as --shared)
  -h FILENAME, -soname FILENAME
                              Set internal name of shared library
  -I PROGRAM, --dynamic-linker PROGRAM
                              Set PROGRAM as the dynamic linker to use
  -l LIBNAME, --library LIBNAME
                              Search for library LIBNAME
  -L DIRECTORY, --library-path DIRECTORY
                              Add DIRECTORY to library search path
  -m EMULATION                Set emulation
  -M, --print-map             Print map file on standard output
  -n, --nmagic                Do not page align data
  -N, --omagic                Do not page align data, do not make text readonly
  --no-omagic                 Page align data, make text readonly
  -o FILE, --output FILE      Set output file name
  -O                          Optimize output file
  -Qy                         Ignored for SVR4 compatibility
  -q, --emit-relocs           Generate relocations in final output
  -r, -i, --relocatable       Generate relocatable output
  -R FILE, --just-symbols FILE
                              Just link symbols (if directory, same as --rpath)
  -s, --strip-all             Strip all symbols
  -S, --strip-debug           Strip debugging symbols
  --strip-discarded           Strip symbols in discarded sections
  --no-strip-discarded        Do not strip symbols in discarded sections
  -t, --trace                 Trace file opens
  -T FILE, --script FILE      Read linker script
  -u SYMBOL, --undefined SYMBOL
                              Start with undefined reference to SYMBOL
  --unique [=SECTION]         Don't merge input [SECTION | orphan] sections
  -Ur                         Build global constructor/destructor tables
  -v, --version               Print version information
  -V                          Print version and emulation information
  -x, --discard-all           Discard all local symbols
  -X, --discard-locals        Discard temporary local symbols (default)
  --discard-none              Don't discard any local symbols
  -y SYMBOL, --trace-symbol SYMBOL
                              Trace mentions of SYMBOL
  -Y PATH                     Default search path for Solaris compatibility
  -(, --start-group           Start a group
  -), --end-group             End a group
  --accept-unknown-input-arch Accept input files whose architecture cannot be determined
  --no-accept-unknown-input-arch
                              Reject input files whose architecture is unknown
  -assert KEYWORD             Ignored for SunOS compatibility
  -Bdynamic, -dy, -call_shared
                              Link against shared libraries
  -Bstatic, -dn, -non_shared, -static
                              Do not link against shared libraries
  -Bsymbolic                  Bind global references locally
  --check-sections            Check section addresses for overlaps (default)
  --no-check-sections         Do not check section addresses for overlaps
  --cref                      Output cross reference table
  --defsym SYMBOL=EXPRESSION  Define a symbol
  --demangle [=STYLE]         Demangle symbol names [using STYLE]
  --demangler DSO:FUNCTION    Set DSO and demangler function
  --embedded-relocs           Generate embedded relocs
  -fini SYMBOL                Call SYMBOL at unload-time
  --force-exe-suffix          Force generation of file with .exe suffix
  --gc-sections               Remove unused sections (on some targets)
  --no-gc-sections            Don't remove unused sections (default)
  --hash-size=<NUMBER>        Set default hash table size close to <NUMBER>
  --help                      Print option help
  -init SYMBOL                Call SYMBOL at load-time
  -Map FILE                   Write a map file
  --no-define-common          Do not define Common storage
  --no-demangle               Do not demangle symbol names
  --no-keep-memory            Use less memory and more disk I/O
  --no-undefined              Do not allow unresolved references in object files
  --allow-shlib-undefined     Allow unresolved references in shared libaries
  --no-allow-shlib-undefined  Do not allow unresolved references in shared libs
  --allow-multiple-definition Allow multiple definitions
  --no-undefined-version      Disallow undefined version
  --no-warn-mismatch          Don't warn about mismatched input files
  --no-whole-archive          Turn off --whole-archive
  --noinhibit-exec            Create an output file even if errors occur
  -nostdlib                   Only use library directories specified on
                                the command line
  --oformat TARGET            Specify target of output file
  -qmagic                     Ignored for Linux compatibility
  --reduce-memory-overheads   Reduce memory overheads, possibly taking much longer
  --relax                     Relax branches on certain targets
  --retain-symbols-file FILE  Keep only symbols listed in FILE
  -rpath PATH                 Set runtime shared library search path
  -rpath-link PATH            Set link time shared library search path
  -shared, -Bshareable        Create a shared library
  -pie, --pic-executable      Create a position independent executable
  --sort-common               Sort common symbols by size
  --spare-dynamic-tags COUNT  How many tags to reserve in .dynamic section
  --split-by-file [=SIZE]     Split output sections every SIZE octets
  --split-by-reloc [=COUNT]   Split output sections every COUNT relocs
  --stats                     Print memory usage statistics
  --target-help               Display target specific options
  --task-link SYMBOL          Do task level linking
  --traditional-format        Use same format as native linker
  --section-start SECTION=ADDRESS
                              Set address of named section
  -Tbss ADDRESS               Set address of .bss section
  -Tdata ADDRESS              Set address of .data section
  -Ttext ADDRESS              Set address of .text section
  --unresolved-symbols=<method>
                              How to handle unresolved symbols.  <method> is:
                                ignore-all, report-all, ignore-in-object-files,
                                ignore-in-shared-libs
  --verbose                   Output lots of information during link
  --version-script FILE       Read version information script
  --version-exports-section SYMBOL
                              Take export symbols list from .exports, using
                                SYMBOL as the version.
  --warn-common               Warn about duplicate common symbols
  --warn-constructors         Warn if global constructors/destructors are seen
  --warn-multiple-gp          Warn if the multiple GP values are used
  --warn-once                 Warn only once per undefined symbol
  --warn-section-align        Warn if start of section changes due to alignment
  --warn-unresolved-symbols   Report unresolved symbols as warnings
  --error-unresolved-symbols  Report unresolved symbols as errors
  --fatal-warnings            Treat warnings as errors
  --whole-archive             Include all objects from following archives
  --add-needed                Set DT_NEEDED tags for DT_NEEDED entries in
                                following dynamic libs
  --no-add-needed             Do not set DT_NEEDED tags for DT_NEEDED entries
                                in following dynamic libs
  --as-needed                 Only set DT_NEEDED for following dynamic libs if used
  --no-as-needed              Always set DT_NEEDED for following dynamic libs
  --warn-textrel              Warn if object has DT_TEXTREL
  --wrap SYMBOL               Use wrapper functions for SYMBOL
ld: supported targets: elf32-hppa-linux elf32-hppa elf32-little elf32-big srec symbolsrec tekhex binary ihex
ld: supported emulations: hppalinux
ld: emulation specific options:
hppalinux: 
  -Bgroup               Selects group name lookup rules for DSO
  --disable-new-dtags   Disable new dynamic tags
  --enable-new-dtags    Enable new dynamic tags
  --eh-frame-hdr        Create .eh_frame_hdr section
  -z combreloc          Merge dynamic relocs into one section and sort
  -z defs               Report unresolved symbols in object files.
  -z execstack          Mark executable as requiring executable stack
  -z execheap           Mark executable as requiring executable heap
  -z initfirst          Mark DSO to be initialized first at runtime
  -z interpose          Mark object to interpose all DSOs but executable
  -z loadfltr           Mark object requiring immediate process
  -z muldefs            Allow multiple definitions
  -z nocombreloc        Don't merge dynamic relocs into one section
  -z nocopyreloc        Don't create copy relocs
  -z nodefaultlib       Mark object not to use default search paths
  -z nodelete           Mark DSO non-deletable at runtime
  -z nodlopen           Mark DSO not available to dlopen
  -z nodump             Mark DSO not available to dldump
  -z noexecstack        Mark executable as not requiring executable stack
  -z noexecheap Mark executable as not requiring executable heap
  -z norelro            Don't create RELRO program header
  -z now                Mark object non-lazy runtime binding
  -z origin             Mark object requiring immediate $ORIGIN processing
                          at runtime
  -z relro              Create RELRO program header
  -z KEYWORD            Ignored for Solaris compatibility
  --multi-subspace      Generate import and export stubs to support
                          multiple sub-space shared libraries
  --stub-group-size=N   Maximum size of a group of input sections that can be
                          handled by one stub section.  A negative value
                          locates all stubs before their branches (with a
                          group size of -N), while a positive value allows
                          two groups of input sections, one before, and one
                          after each stub section.  Values of +/-1 indicate
                          the linker should choose suitable defaults.


Supported demangler style: {none,auto,gnu,lucid,arm,hp,edg,gnu-v3,java,gnat,compaq}

Report bugs to <URL:http://www.sourceware.org/bugzilla/> and hjl@lucon.org

And here the test.c results

[root@paguru ~]# gcc -Wl,--default-symver test.c
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.2/../../../../hppa2.0-unknown-linux-gnu/bin/ld: unrecognized option '--default-symver'
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.2/../../../../hppa2.0-unknown-linux-gnu/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
[root@paguru ~]# hppa2.0-unknown-linux-gnu-gcc -Wl,--default-symver test.c
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.2/../../../../hppa2.0-unknown-linux-gnu/bin/ld: unrecognized option '--default-symver'
/usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.1.2/../../../../hppa2.0-unknown-linux-gnu/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status


Comment 9 SpanKY gentoo-dev 2007-09-12 00:54:10 UTC
something is really screwed with your binutils ... that code is not conditional, it should always be built into your ld

post the full build log of binutils as an attachment
Comment 10 Giorgio 2007-09-12 10:19:39 UTC
Created attachment 130687 [details]
Build log of sys-devel/binutils-2.17.50.0.12
Comment 11 SpanKY gentoo-dev 2007-10-07 01:50:21 UTC
dont know what to tell you ... output looks fine, but again, the code is not conditional afaict: (ld/lexsup.c)
...
  OPTION_NO_UNDEFINED_VERSION,
  OPTION_DEFAULT_SYMVER,
  OPTION_DEFAULT_IMPORTED_SYMVER,
...
  { {"no-undefined-version", no_argument, NULL, OPTION_NO_UNDEFINED_VERSION},
    '\0', NULL, N_("Disallow undefined version"), TWO_DASHES },
  { {"default-symver", no_argument, NULL, OPTION_DEFAULT_SYMVER},
    '\0', NULL, N_("Create default symbol version"), TWO_DASHES },
  { {"default-imported-symver", no_argument, NULL,
      OPTION_DEFAULT_IMPORTED_SYMVER},
...
      break;
    case OPTION_DEFAULT_SYMVER:
      link_info.create_default_symver = TRUE;
...

so if you have the surrounding options, you should have --default-symver ... about the only way i could figure it out is if i debugged it on your machine, or you looked into it ...
Comment 12 Giorgio 2007-10-08 00:12:18 UTC
Thanks all for your help.
SpanKY you were right, something was really screwed with my binutils:

#binutils-config -l
 [1] hppa2.0-unknown-linux-gnu-2.15.92.0.2 *
 [2] hppa2.0-unknown-linux-gnu-2.17.50.0.12

 [3] hppa64-unknown-linux-gnu-2.17 *

but

# equery l binutils
[ Searching for package 'binutils' in all categories among: ]
 * installed packages
[I--] [ -] sys-devel/binutils-2.17.50.0.12 (0)
[I--] [  ] sys-devel/binutils-config-1.9-r4 (0)
[I--] [ -] sys-devel/binutils-hppa64-2.17 (hppa64-unknown-linux-gnu)

After having set the correct binutils profile I can now successfully compile sys-libs/db-4.5.20_p2