I've done some testing and bug fixing using the Solaris build service, thanks very much Dago!
On Mon, 2013-09-16 at 20:52 +0200, Dagobert Michelsen wrote: > I'll get an error compiling it on Solaris 10 Sparc with Sun Studio 12: > > /opt/SUNWspro/bin/cc -D_REENTRANT -pthreads > -I/opt/csw/include/guile/2.0 -I/opt/csw/include -xO3 -m32 > -xarch=sparc -m32 -xarch=sparc -L/opt/csw/lib -o make ar.o arscan.o > commands.o default.o dir.o expand.o file.o function.o getopt.o > getopt1.o implicit.o job.o load.o loadapi.o main.o misc.o output.o > read.o remake.o rule.o signame.o strcache.o variable.o version.o > vpath.o hash.o remote-stub.o guile.o glob/libglob.a > -lkstat /opt/csw/lib/libintl.so -R/opt/csw/lib -L/opt/csw/lib > -lguile-2.0 -lgc -lrt > > ld: fatal: soname option (-h, --soname) is incompatible with > building a dynamic executable > > ld: fatal: flags processing errors > > gmake[2]: *** [make] Error 1 Investigating this I've discovered the problem. The Guile library provided on these systems was compiled with GCC, not the Sun Studio compilers. As a result, the guile-pkg command that configure uses to determine what the linker flags should be to link with Guile are returning GCC linker flags. In particular, the "-pthreads" flag generated here: $ pkg-config --cflags guile-2.0 -D_REENTRANT -pthreads -I/opt/csw/include/guile/2.0 -I/opt/csw/include is a GCC flag that is not valid to the Sun Studio linker, so it interprets that flag as if it were: -p -t -h -r -e -a -d -s Hence, the error about the -h flag. I don't actually have any good ideas about how to fix this problem. Most likely this is something that needs to be raised with the autoconf, pkgconfig, and/or Guile folks. In the meantime if you compile make with GCC instead of Sun Studio it works properly with Guile. You could also supply the GUILE_CFLAGS variable to configure to override the pkg-config output. Of course you could also build Guile with Sun Studio and that would likely work as well (but now perhaps you wouldn't be able to compile with GCC). I also found that for some reason configure is determining that libc contains a GNU gettext implementation which is clearly not true, and thus leaving off the -lintl library causing link errors. Finally, because the GNU libraries are not installed in the standard locations you need to add "LDFLAGS=-R/opt/csw/lib" to the configure line so that GNU make will know where to look for the guile, etc. libraries at runtime. Using LD_LIBRARY_FLAGS is not a good idea because it will break other programs. After working around these issues and my regression test fixes (to be pushed shortly), I am able to build on Solaris 11 with the Sun Studio compiler and get 100% test coverage, including Guile support: 540 Tests in 119 Categories Complete ... No Failures :-) ====================================================================================================== Regression PASSED: GNU Make 3.99.91 (sparc-sun-solaris2.11) built with /opt/solarisstudio12.3/bin/cc ====================================================================================================== _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make