#923 GCC + Solaris linker = install failure

open
None
5
2014-07-28
2013-10-11
No

The best toolchain on Solaris SPARC is gcc + Solaris ld. Using this combination, "make share" fails since it uses GNU ld syntax:

make -j1 shared
make[3]: Entering directory /export/home/drkirkby/sage-5.13.beta0/spkg/build/atlas-3.10.1.p5/ATLAS-build/lib' make[3]: warning: -jN forced in submake: disabling jobserver mode. make -j1 TRYALL outso=libsatlas.so \ libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib" make[4]: Entering directory/export/home/drkirkby/sage-5.13.beta0/spkg/build/atlas-3.10.1.p5/ATLAS-build/lib'
if make -j1 GCCTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm -lgcc" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and all libs" ; \ elif make -j1 LDTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm -lgcc" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt ld and all sys libs" ; \ elif make -j1 GCCTRY_norp outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm -lgcc" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and all libs and no rpath" ; \ elif make -j1 GCCTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lc -lm -lgcc" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and all C libs" ; \ elif make -j1 LDTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lc -lm -lgcc" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt ld and -lc -lgcc" ; \ elif make -j1 GCCTRY_norp outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lc -lm -lgcc" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and all C libs and no rpath" ; \ elif make -j1 GCCTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and all libs except -lgcc" ; \ elif make -j1 LDTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt all libs except -lgcc" ; \ elif make -j1 GCCTRY_norp outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and all libs except -lgcc, no rpath" ; \ elif make -j1 GCCTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lc -lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and -lc" ; \ elif make -j1 LDTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lc -lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt ld and -lc" ; \ elif make -j1 GCCTRY_norp outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lc -lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt gcc and -lc, no rpath" ; \ elif make -j1 LDTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt ld" ; \ elif make -j1 GCCTRY_norp outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lkernel32" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib"; then \ echo "libsatlas.so built wt fortran and kernel32, no rpath" ; \ else \ make -j1 GCCTRY outso="libsatlas.so" libas="liblapack.a libf77blas.a libcblas.a libatlas.a" \ LIBS="-lm" LIBINSTdir="/export/home/drkirkby/sage-5.13.beta0/local/lib" ; \ fi
make[5]: Entering directory /export/home/drkirkby/sage-5.13.beta0/spkg/build/atlas-3.10.1.p5/ATLAS-build/lib' gcc -fPIC -m32 -shared -o libsatlas.so \ -Wl,"rpath-link /export/home/drkirkby/sage-5.13.beta0/local/lib" \ -Wl,--whole-archive liblapack.a libf77blas.a libcblas.a libatlas.a -Wl,--no-whole-archive -L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm -lgcc /usr/ccs/bin/ld: illegal option -- whole-archive /usr/ccs/bin/ld: illegal option -- no-whole-archive usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s) [-64] enforce a 64-bit link-edit [-a] create an absolute file [-b] do not do special PIC relocations in a.out [-B direct] specifydirect' bindings for executable when run
[-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] useepsym' as entry point address
[-f name] specify library for which this file is an auxiliary
filter
[-F name] specify library for which this file is a filter
[-G] create a shared object
[-h name] use name' as internal shared object identifier [-i] ignore LD_LIBRARY_PATH setting [-I name] usename' as path of interpreter
[-l x] search for libx.so or libx.a
[-L path] search for libraries in directory path' [-m] print memory map [-M mapfile] use processing directives contained inmapfile'
[-N string] create a dynamic dependency for string' [-o outfile] name the output fileoutfile'
[-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] create a relocatable object
[-R path] specify a library search path to be used at run time
[-s] 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] create an undefined symbol symname' [-V] print version information [-Y P,dirlist] usedirlist' 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]
extract all member files, only members that resolve
undefined tor tentative symbols, or allow extraction of
archive members to resolvetweak references from
archive files
[-z combreloc] combine multiple relocation sections
[-z nocompstrtab]
disable compression of string tables
[-z defs] 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 finiarray=function]
name of function to be appended to the .finiarray
[-z groupperm | nogroupperm]
enable|disable setting of group permissions
on dynamic dependencies
[-z ignore | record]
ignore|record unused dynamic dependencies
[-z initarray=function]
name of function to be appended to the .initarray
[-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 multiply-defined symbols [-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 nopartial] expand any partially initialized symbols [-z noversion] don't record any version sections [-z now] mark object as requiring non-lazy binding [-z origin] mark object as requiring $ORIGIN processing [-z preinitarray=function] name of function to be appended to the .preinitarray [-z redlocsym] reduce local syms in .symtab to a minimum [-z rescan] rescan archive list until no further member extraction occurs [-z text] disallow output relocations against text [-z textoff] allow output relocations against text [-z textwarn] warn if there are relocations against text [-z verbose] generate warnings for suspicious processings collect2: ld returned 1 exit status make[5]: *** [GCCTRY] Error 1 make[5]: Leaving directory/export/home/drkirkby/sage-5.13.beta0/spkg/build/atlas-3.10.1.p5/ATLAS-build/lib'
make[5]: Entering directory `/export/home/drkirkby/sage-5.13.beta0/spkg/build/atlas-3.10.1.p5/ATLAS-build/lib'
ld -shared -soname /export/home/drkirkby/sage-5.13.beta0/local/lib/libsatlas.so -o libsatlas.so \ -rpath-link /export/home/drkirkby/sage-5.13.beta0/local/lib \ --whole-archive liblapack.a libf77blas.a libcblas.a libatlas.a --no-whole-archive -L/usr/local/gcc-4.5.0/lib/gcc/sparc-sun-solaris2.10/4.5.0/../../.. -lgfortran -lc -lm -lgcc
ld: fatal: file /export/home/drkirkby/sage-5.13.beta0/local/lib/libsatlas.so: open failed: No such file or directory
make[5]: *** [LDTRY] Error 1

There follow a few more attempts but they all fail due to invalid ld options

Discussion

  • R. Clint Whaley

    R. Clint Whaley - 2014-07-09
    • assigned_to: R. Clint Whaley
     
  • R. Clint Whaley

    R. Clint Whaley - 2014-07-09

    I don't know how to support this; I no longer have access to solaris (though I could probably get it if I asked around, maybe from the sage guys!). Do you have a suggestion?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks