#4973: building ghc7.0.1.20110217 under x86 solaris fails
-------------------------+--------------------------------------------------
Reporter: maeder | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 7.0.2
Component: Compiler | Version: 7.0.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Solaris | Blocking:
Architecture: x86 | Failure: Building GHC failed
-------------------------+--------------------------------------------------
Comment(by kgardas):
Replying to [comment:3 igloo]:
> Karel, do you know why this works for you? Do you use the GNU ld or
something?
I'm using Solaris 11 Express here, it provides more modern ld:
{{{
$ which ld
/usr/bin/ld
$ ld --version
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1726
$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-
ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)
$ ls -la /usr/ccs/bin/ld
lrwxrwxrwx 1 root root 12 Nov 26 12:12 /usr/ccs/bin/ld ->
../../bin/ld
$ ld --help
usage: ld [-3:6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VW:Y:?]
file(s)
[-32] enforce a 32-bit link-edit
[-64] enforce a 64-bit link-edit
[-a] create an absolute file
[-b] do not do special PIC relocations in a.out
[-B direct | nodirect]
establish direct bindings, or inhibit direct
binding
to, the object being created
[-B dynamic | static]
search for shared libraries|archives
[-B eliminate] eliminate unqualified global symbols from the
symbol table
[-B group] relocate object from within group
[-B local] reduce unqualified global symbols to local
[-B reduce] process symbol reductions
[-B symbolic] bind external references to definitions when
creating
shared objects
[-c name] record configuration file 'name'
[-C] demangle C++ symbol name diagnostics
[-d y | n] operate in dynamic|static mode
[-D token,...] print diagnostic messages
[-e epsym], [--entry epsym]
use 'epsym' as entry point address
[-f name], [--auxiliary name]
specify library for which this file is an
auxiliary
filter
[-F name], [--filter name]
specify library for which this file is a filter
[-G], [-shared]
create a shared object
[-h name], [--soname name]
use 'name' as internal shared object identifier
[-i] ignore LD_LIBRARY_PATH setting
[-I name] use 'name' as path of interpreter
[-l x], [--library x]
search for libx.so or libx.a
[-L path], [--library-path path]
search for libraries in directory 'path'
[-m] print memory map
[-M mapfile] use processing directives contained in 'mapfile'
[-N string] create a dynamic dependency for 'string'
[-o outfile], [--output outfile]
name the output file 'outfile'
[-p auditlib] identify audit library to accompany this object
[-P auditlib] identify audit library for processing the
dependencies
of this object
[-Q y | n] do|do not place version information in output file
[-r], [--relocatable]
create a relocatable object
[-R path], [-rpath path]
specify a library search path to be used at run
time
[-s], [--strip-all]
strip any symbol and debugging information
[-S supportlib]
specify a link-edit support library
[-t] do not warn of multiply-defined symbols that have
different sizes or alignments
[-u symname], [--undefined symname]
create an undefined symbol 'symname'
[-V], [--version]
print version information
[-Y P,dirlist] use 'dirlist' as a default path when searching for
libraries
[-z absexec] when building an executable absolute symbols
referenced in dynamic objects are promoted to
the executable
[-z allextract | defaultextract | weakextract],
[--whole-archive | --no-whole-archive]
extract all member files, only members that
resolve
undefined or tentative symbols, or allow
extraction of
archive members to resolve weak references from
archive files
[-z altexec64] execute the 64-bit link-editor
[-z combreloc | nocombreloc]
combine|do not combine multiple relocation
sections
[-z deferred | nodeferred]
enable|disable deferred identification of shared
object
dependencies
[-z defs], [--no-undefined]
disallow undefined symbol references
[-z direct | nodirect]
enable|disable direct binding to shared object
dependencies
[-z endfiltee] marks a filtee such that it will terminate a
filters
search
[-z fatal-warnings | nofatal-warnings],
[--fatal-warnings | --no-fatal-warnings]
enable|disable treatment of warnings as fatal
[-z finiarray=function]
name of function to be appended to the .fini_array
[-z groupperm | nogroupperm]
enable|disable setting of group permissions
on dynamic dependencies
[-z guidance | -z guidance=item1,item2,...]
enable guidance warnings. items: noall, nodefs,
nodirect, nolazyload, nomapfile, notext, nounused
[-z help], [--help]
print this usage message
[-z ignore | record]
ignore|record unused dynamic dependencies
[-z initarray=function]
name of function to be appended to the .init_array
[-z initfirst] mark object to indicate that its .init section
should
be executed before the .init section of any other
objects
[-z interpose] dynamic object is to be an 'interposer' on direct
bindings
[-z lazyload | nolazyload]
enable|disable delayed loading of shared object
dependencies
[-z ld32=arg1,arg2,...]
define arguments applicable to the 32-bit class of
ld(1)
[-z ld64=arg1,arg2,...]
define arguments applicable to the 64-bit class of
ld(1)
[-z loadfltr] mark filter as requiring immediate loading of its
filtees at runtime
[-z muldefs], [--allow-multiple-definition]
allow multiply-defined symbols
[-z nocompstrtab]
disable compression of string tables
[-z nodefs] allow undefined symbol references
[-z nodefaultlib]
mark object to ignore any default library search
path
[-z nodelete] mark object as non-deletable
[-z nodlopen] mark object as non-dlopen()'able
[-z nodump] mark object as non-dldump()'able
[-z noldynsym] do not add a .SUNW_ldynsym section
[-z now] mark object as requiring non-lazy binding
[-z nopartial] expand any partially initialized symbols
[-z noversion] do not record any version sections
[-z origin] mark object as requiring $ORIGIN processing
[-z preinitarray=function]
name of function to be appended to the
.preinit_array
[-z redlocsym] reduce local syms in .symtab to a minimum
[-z relaxreloc] relax rules used for relocations against COMDAT
sections
[-z rescan] after processing all arguments, rescan archive
list
until no further member extraction occurs
[-z rescan-now] immediately rescan archive list until
no further member extraction occurs
[-z rescan-start archives... -z rescan-end],
[--start-group archives... --end-group], [-( archives... -)]
rescan specified archive group upon reaching
the end of the group, until no further
member extraction occurs
[-z symbolcap] convert object capabilities to symbol capabilities
[-z target=platform]
target machine for cross linking
[-z text] disallow output relocations against text
[-z textoff] allow output relocations against text
[-z textwarn] warn if there are relocations against text
[-z wrap=symbol], [-wrap=symbol], [--wrap=symbol]
wrap symbol references
[-z verbose] generate warnings for suspicious processings
$
}}}
As you can see in my patch I've not tinkered with soname machinery and yet
it works for me. My wild guess is that either ghc is using soname
functionality by using gcc and gcc is used to use --soname or ghc does it
on its own, and then we shall hack ghc to use `-h' instead of `--soname'
on solaris. See my ld's --help output cut:
{{{
$ ld --help 2>&1|ggrep -C 1 soname
create a shared object
[-h name], [--soname name]
use 'name' as internal shared object identifier
}}}
and compare this with Christian 5.10:
{{{
[-h name] use `name' as internal shared object identifier
}}}
Please let me know if I shall attempt to do this or you will do it
yourself. I would done this in configure.ac machinery if done by myself.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4973#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs