|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Build failure on Sparc solaris using gcc and binutilsHi all,
on sparc solaris ./configure.in sets VERSION_SCRIPT_FLAGS to "-Wl,-M -Wl," no matter which compiler/linker is used. Unfortunately gnu gcc/ld does not like -M option for symbol files, which causes a build using gcc to fail. Instead good old "--version-script=" is expectd here. Any idea how an additional check for gnu ld to be added to configure.in could look like? Wouldn't it be better to use ld from PATH or any magic variable instead of using hard wired /usr/bin/ld? From configure.in > VERSION_SCRIPT_FLAGS= > $(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ > VERSION_SCRIPT_FLAGS=-Wl,--version-script= > test "`uname`" == "SunOS" && \ > VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," > > if test -n "$VERSION_SCRIPT_FLAGS"; then > ... Maybe this is a no-brainer, but I have absoluteley no knowledge about configure scripts except of using them ;-) Best regards, Matthias ------------ CC=/net/solaris/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/gcc-4.1.1/bin/gcc CXX=/net/solaris/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/gcc-4.1.1/bin/g++ CFLAGS="-O3" ./configure --prefix=/net/solaris/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/libxml2-2.7.6 --without-threads --without-http --without-ftp --without-zlib make /bin/bash ./libtool --tag=CC --mode=link /net/solaris/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/gcc-4.1.1/bin/gcc -O3 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wl,-M -Wl,./libxml2.syms -version-info 9:6:7 -o libxml2.la -rpath /net/solaris/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/libxml2-2.7.6/lib SAX.lo entities.lo encoding.lo error.lo parserInternals.lo parser.lo tree.lo hash.lo list.lo xmlIO.lo xmlmemory.lo uri.lo valid.lo xlink.lo HTMLparser.lo HTMLtree.lo debugXML.lo xpath.lo xpointer.lo xinclude.lo nanohttp.lo nanoftp.lo DOCBparser.lo catalog.lo globals.lo threads.lo c14n.lo xmlstring.lo xmlregexp.lo xmlschemas.lo xmlschemastypes.lo xmlunicode.lo xmlreader.lo relaxng.lo dict.lo SAX2.lo xmlwriter.lo legacy.lo chvalid.lo pattern.lo xmlsave.lo xmlmodule.lo schematron.lo -lm -lsocket -lnsl libtool: link: /net/solaris/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/gcc-4.1.1/bin/gcc -shared .libs/SAX.o .libs/entities.o .libs/encoding.o .libs/error.o .libs/parserInternals.o .libs/parser.o .libs/tree.o .libs/hash.o .libs/list.o .libs/xmlIO.o .libs/xmlmemory.o .libs/uri.o .libs/valid.o .libs/xlink.o .libs/HTMLparser.o .libs/HTMLtree.o .libs/debugXML.o .libs/xpath.o .libs/xpointer.o .libs/xinclude.o .libs/nanohttp.o .libs/nanoftp.o .libs/DOCBparser.o .libs/catalog.o .libs/globals.o .libs/threads.o .libs/c14n.o .libs/xmlstring.o .libs/xmlregexp.o .libs/xmlschemas.o .libs/xmlschemastypes.o .libs/xmlunicode.o .libs/xmlreader.o .libs/relaxng.o .libs/dict.o .libs/SAX2.o .libs/xmlwriter.o .libs/legacy.o .libs/chvalid.o .libs/pattern.o .libs/xmlsave.o .libs/xmlmodule.o .libs/schematron.o -lm -lsocket -lnsl -lc -Wl,-M -Wl,./libxml2.syms -Wl,-soname -Wl,libxml2.so.2 -o .libs/libxml2.so.2.7.6 ./libxml2.syms: file not recognized: File format not recognized collect2: ld returned 1 exit status make[2]: *** [libxml2.la] Error 1 make[2]: Leaving directory `/net/solaris/nobackup/pkg/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/libxml2-2.7.6' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/net/solaris/nobackup/pkg/buildenv/sparc-sun-solaris2.8/gcc-4.1.1/libxml2-2.7.6' -- Matthias Jung Email: matthias.jung@... Phone: +49-30-440306-38 http://www.xtradyne.com | http://www.prismtech.com * XTRADYNE Security Infrastructure - a PRISMTECH Product Line * PrismTech GmbH Schoenhauser Allee 6-7, D-10119 Berlin, Germany Ust.-Id.-Nr.: DE814235971 Handelsregister: Amtsgericht Charlottenburg B HRB 96377 B Geschäftsführer: Keith Raymond Steele _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@... http://mail.gnome.org/mailman/listinfo/xml |
|
|
Re: Build failure on Sparc solaris using gcc and binutilsOn Mon, Oct 19, 2009 at 03:19:15PM +0200, Matthias Jung wrote:
> Hi all, > on sparc solaris ./configure.in sets VERSION_SCRIPT_FLAGS to "-Wl,-M > -Wl," no matter which compiler/linker is used. > Unfortunately gnu gcc/ld does not like -M option for symbol files, which > causes a build using gcc to fail. Instead good old "--version-script=" > is expectd here. > > Any idea how an additional check for gnu ld to be added to configure.in > could look like? > Wouldn't it be better to use ld from PATH or any magic variable instead > of using hard wired /usr/bin/ld? > > From configure.in > > VERSION_SCRIPT_FLAGS= > > $(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ > > VERSION_SCRIPT_FLAGS=-Wl,--version-script= > > test "`uname`" == "SunOS" && \ > > VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," > > > > if test -n "$VERSION_SCRIPT_FLAGS"; then > > ... > > Maybe this is a no-brainer, but I have absoluteley no knowledge about > configure scripts except of using them ;-) I hope someone with a Sun setup can look and propose a configure fix. I'm sure it's doable, but I don't have this platform around. Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@... | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@... http://mail.gnome.org/mailman/listinfo/xml |
|
|
Re: Build failure on Sparc solaris using gcc and binutilsIf a linker supports option --version-script it should be used no matter which operating system is in use. First of all I suggest to change the line: $(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ to: $($LD --help 2>&1 | grep -- --version-script >/dev/null) && \ $LD is obtained correctly from configure script. Second I'd see one possible solution in simply removing the two lines for the Solaris setting ;-) test "`uname`" == "SunOS" && \ VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," This has the following reasons: 1. It makes no assumption about the linker in use. As reported for gnu ld -M is the wrong option. 2. On another machine with Intel Solaris Sun ld (/usr/ccs/bin/ld) is used. This knows -M option but expects a mapping file as argument, which seems to be something different than the symbol file. The result is: libxml build fails on this platform with error "... (symbol has no version assigned)" So my question is: for which linker -M option is intended? With knowing this, there might be a linker specific check instead of a platform specific one. Last: It looks like the variable VERSION_SCRIPT_FLAGS is responsible for activating/deactivating usage of version script. Wouldn't it be nice to control version script usage with a parameter passed to configure? For example --with-version-script. What do you think? My suggestion as long -M ld option is not clear ;-) VERSION_SCRIPT_FLAGS= $($LD --help 2>&1 | grep -- --version-script >/dev/null) && \ VERSION_SCRIPT_FLAGS=-Wl,--version-script= if test -n "$VERSION_SCRIPT_FLAGS"; then USE_VERSION_SCRIPT_TRUE= USE_VERSION_SCRIPT_FALSE='#' else USE_VERSION_SCRIPT_TRUE='#' USE_VERSION_SCRIPT_FALSE= fi Best regards, Matthias Daniel Veillard wrote: On Mon, Oct 19, 2009 at 03:19:15PM +0200, Matthias Jung wrote: -- Matthias Jung Email: matthias.jung@... Phone: +49-30-440306-38 http://www.xtradyne.com | http://www.prismtech.com * XTRADYNE Security Infrastructure - a PRISMTECH Product Line * PrismTech GmbH Schoenhauser Allee 6-7, D-10119 Berlin, Germany Ust.-Id.-Nr.: DE814235971 Handelsregister: Amtsgericht Charlottenburg B HRB 96377 B Geschäftsführer: Keith Raymond Steele _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@... http://mail.gnome.org/mailman/listinfo/xml |
|
|
Re: Build failure on Sparc solaris using gcc and binutilsMatthias Jung wrote:
[SNIP] > My suggestion as long -M ld option is not clear ;-) > > VERSION_SCRIPT_FLAGS= > $($LD --help 2>&1 | grep -- --version-script >/dev/null) && \ > VERSION_SCRIPT_FLAGS=-Wl,--version-script= May be is time project to upgrade libtool to 2.+ version where exist flag with_gnu_ld. > if test -n "$VERSION_SCRIPT_FLAGS"; then > USE_VERSION_SCRIPT_TRUE= > USE_VERSION_SCRIPT_FALSE='#' > else > USE_VERSION_SCRIPT_TRUE='#' > USE_VERSION_SCRIPT_FALSE= > fi Why ? Did you found problem with AM_CONDITIONAL macro ? [SNIP] _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@... http://mail.gnome.org/mailman/listinfo/xml |
|
|
Re: Build failure on Sparc solaris using gcc and binutilsOn Thu, Oct 22, 2009 at 12:26:27AM +0300, Roumen Petrov wrote:
> Matthias Jung wrote: > [SNIP] >> My suggestion as long -M ld option is not clear ;-) >> >> VERSION_SCRIPT_FLAGS= >> $($LD --help 2>&1 | grep -- --version-script >/dev/null) && \ >> VERSION_SCRIPT_FLAGS=-Wl,--version-script= > > > May be is time project to upgrade libtool to 2.+ version where exist > flag with_gnu_ld. Argh, maybe that's the problem, any suggestion on how to best do this ? Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@... | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@... http://mail.gnome.org/mailman/listinfo/xml |
|
|
Re: Build failure on Sparc solaris using gcc and binutilsDaniel Veillard wrote:
> On Thu, Oct 22, 2009 at 12:26:27AM +0300, Roumen Petrov wrote: >> Matthias Jung wrote: >> [SNIP] >>> My suggestion as long -M ld option is not clear ;-) >>> >>> VERSION_SCRIPT_FLAGS= >>> $($LD --help 2>&1 | grep -- --version-script >/dev/null) && \ >>> VERSION_SCRIPT_FLAGS=-Wl,--version-script= >> >> May be is time project to upgrade libtool to 2.+ version where exist >> flag with_gnu_ld. > > Argh, maybe that's the problem, any suggestion on how to best do this ? The last libtool stable: - 2.2.6a (actually 2.2.6 but maintenance issue with tarbal and updated archive is with 2.2.6a in name); - 1.5.26 - the last pre 2x that end 1x versions. Next of mail is a brief list of steps to switch a project to 2.x version (We has to check what is really required for libxml2). 1) Before 2.x version libtool team advise libtool.m4 file to be included in acinclude.m4. This was problem when a project/user try to user more recent libtool version but didn't upgrade acinclude file. For 2x series libtool team advise project to use AC_CONFIG_MACRO_DIR For reference see libtool macro LT_OUTPUT as example: http://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html#index-LT_005fOUTPUT-113 So this is first step to remove libtool.m4 form acinclude.m4 if applicable to project and to add AC_CONFIG_MACRO_DIR([m4]) to configure script. Command libtoolize (2+) will install into specified directory libtool m4-files. 2) libtool 2.x provide backward compatible macros (sounds good). May be current repository provide stable backward compatibility for all projects. Obsolete macros are listed in lt~obsolete.m4. Also see comment in file. To ensure more user friendly switch to 2.x version I would like to suggest switch to new macros from 2x series: LT_INIT and etc. instead to use backward compatible macros. The sample configure script that will work with 1.x and 2.x versions: ================================================= dnl Add libtool support. m4_ifdef( [LT_INIT], [ LT_INIT([win32-dll]) LT_LANG([Windows Resource]) LT_CONFIG_LTDL_DIR([libltdl]) LTDL_INIT # The lt_dladvise_init symbol was added in libtool-2.2 if test "x$with_included_ltdl" != "xyes"; then save_CPPFLAGS="$CPPFLAGS" save_LDFLAGS="$LDFLAGS" CPPFLAGS="$CFLAGS $LTDLINCL" LDFLAGS="$LDFLAGS $LIBLTDL" AC_CHECK_LIB([ltdl], [lt_dladvise_init], [], [AC_MSG_ERROR([installed libltdl is too old])]) LDFLAGS="$save_LDFLAGS" CPPFLAGS="$save_CPPFLAGS" fi ], [ AC_WITH_LTDL AC_LIBLTDL_CONVENIENCE AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_RC AC_PROG_LIBTOOL ] ) ================================================= May be only LT_INIT([win32-dll]) and AC_LIBTOOL_WIN32_DLL+AC_PROG_LIBTOOL is enough for libxml2 - no libtool dynamic loading , no windows resource files. 3) Some configure script may run libtool script at configure time. In 2.x script is generated by AC_OUTPUT so for backward compatibility project may add macro LT_OUTPUT to configure script. 4) May be I miss something. > Daniel > Roumen _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@... http://mail.gnome.org/mailman/listinfo/xml |
| Free embeddable forum powered by Nabble | Forum Help |