Solved: 4.4.0.1 build error on libstdc++ on solaris/illumos
Because our default gcc is 4.4.7 on XStreamOS, but I'm building with gcc 4.7, installed as an added option under /usr/gcc/4.7, I had to patch solaris.mk to link there, so here is the patch I'm using. What do you suggest in this case? --- libreoffice-4.4.0.1/solenv/gbuild/platform/solaris.mk Sat Jan 17 10:36:18 2015 +++ libreoffice-4.4.0.1/solenv/gbuild/platform/solaris.mk.new Tue Jan 20 12:33:59 2015 @@ -65,6 +65,7 @@ endif gb_LinkTarget_LDFLAGS += \ + -L$(SYSBASE)/usr/gcc/4.7/lib \ -L$(SYSBASE)/lib \ -L$(SYSBASE)/usr/lib \ -Wl,-z,combreloc \ @@ -83,11 +84,11 @@ endif -ifneq ($(gb_DEBUGLEVEL),0) -gb_LINKEROPTFLAGS := -else -gb_LINKEROPTFLAGS := -Wl,-O1 -endif +#ifneq ($(gb_DEBUGLEVEL),0) +#gb_LINKEROPTFLAGS := +#else +#gb_LINKEROPTFLAGS := -Wl,-O1 +#endif ifeq ($(gb_SYMBOL),$(true)) gb_LINKERSTRIPDEBUGFLAGS := @@ -198,6 +199,7 @@ -lm \ -lnsl \ -lsocket \ + -lstdc++ \ gb_Library_FILENAMES := \ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \ Da: Gabriele Bulfon A: Richard PALO Norbert Thiebaud Cc: Michael Stahl libreoffice Data: 19 gennaio 2015 13.30.25 CET Oggetto: 4.4.0.1 build error on libstdc++ on solaris/illumos Ok, now build goes on. Tried to figure out this, looks like libstdc++ is not correctly linked: Undefined first referenced symbol in file std::basic_string , std::allocator ::basic_string(std::basic_string , std::allocator ) /sources/sonicle/xstream-desktop-gate/components/libreoffice/libreoffice/libreoffice-4.4.0.2/workdir/CxxObject/l10ntools/source/idxdict/idxdict.o ld: fatal: symbolreferencing errors. No output written to /sources/sonicle/xstream-desktop-gate/components/libreoffice/libreoffice/libreoffice-4.4.0.2/workdir/LinkTarget/Executable/idxdict collect2: error: ld returned 1 exit status -- Da: Richard PALO A: gbul...@sonicle.com Norbert Thiebaud Cc: Michael Stahl libreoffice Data: 18 gennaio 2015 22.56.51 CET Oggetto: Re: 4.4.0.1 build error on sal/types.h on solaris/illumos -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 18/01/15 21:33, Gabriele Bulfon a écrit : Ok, I commented out these on Solaris.mk: #ifneq ($(gb_DEBUGLEVEL),0) #gb_LINKEROPTFLAGS := #else #gb_LINKEROPTFLAGS := -Wl,-O1 #endif will let you know :) -- Da: Norbert Thiebaud A: gbul...@sonicle.com Cc: Michael Stahl libreoffice Richard PALO Data: 18 gennaio 2015 20.15.22 CET Oggetto: Re: 4.4.0.1 build error on sal/types.h on solaris/illumos On Sun, Jan 18, 2015 at 12:18 PM, Gabriele Bulfon wrote: Ok, I checked and it looks fine, so solaris.mk should be taken. Also config.log shows correct variables for OS, CPU and COM. What actually happens is during make, after it has downloaded and extracted various stuff. The last one is translations file. Then it goes on building concat-deps, and linking fails: [build C ] solenv/bin/concat-deps.c [build LNK] Executable/concat-deps ld: fatal: unrecognized option '-O' ld: fatal: unrecognized option '-1' ld: fatal: use the -z help option for usage information collect2: error: ld returned 1 exit status Maybe just concat-deps have problems linking with wrong options on Solaris? Yes it is quite possible... concat-deps is a small utility I wrote to speed up the original perl-based one... and I'm quite sure I never tried to link it on Solaris. Otoh concat-deps is built using the standard gbuild mechanism for that: see solenv/Executable_concat-deps.mk so it is more likely that the problem is generic and that concat-deps just happen to be the first one to be linked. BTW, is there any way to issue gmake and let it show what command LNK is doing? It tried forcing a -n but I did not get the command debugged verbose=t make Norbert Yeah, this should go as not valid for solaris ld. Apparently comes from here: commit 3c4cd1deaf71d0d800957b3580d426c721bf7844 Author: Jonathan Adams Date: Fri Mar 16 21:50:37 2012 +0100 gbuild: switch solaris.mk to GCC -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJUvCwiAAoJECAB22fHtp27MBMH/2IYZRT44q8six0NjeXYkG6B vDe0AJund3FTcN/t9zT0bpFx9mPCCdVxWbqqdv0CFKYQrfSLhPRaksuWrAnK1mOI Nl5vcDxI8D0ls6N1c40ZIAcpI3mOeY1Xye6rpKwYJSjWxqOZHxgWEMMvIrzd9Jxb wnChiTHrDj4ljX1QCPWLxJQB0+e3gXrFmcLvQSEhIPslGPou4i14ur3tf2vVwk0a FZzCoiYfCnUil7vQJHA8vUtbVASMxX4sJ6iYOfD0K/Z+11c4PwF4xZZtZCtG6Rek qLd/Yz/OhqIg2POqJeaDL8S9fYOfrWUgfKuwcFhqBgqDQMknQH8DSeJt6IPAea0= =ZdNh -END PGP SIGNATURE- ___LibreOffice mailing listLibreOffice@lists.freedesktop.orghttp://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Solved: 4.4.0.1 build error on libstdc++ on solaris/illumos
On 20.01.2015 13:38, Gabriele Bulfon wrote: Because our default gcc is 4.4.7 on XStreamOS, but I'm building with gcc 4.7, installed as an added option under /usr/gcc/4.7, I had to patch solaris.mk to link there, so here is the patch I'm using. What do you suggest in this case? i find it a bit odd that you need to link libstdc++ explicitly, shouldn't g++ do that by itself? perhaps there is some mistake in your setup, but i've never built gcc myself so no idea what could go wrong... ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Solved: 4.4.0.1 build error on libstdc++ on solaris/illumos
I thought the same. But maybe g++ thinks it's going to run gnu ld, while it's going to run sun ld. Secondly, I surely had to add /usr/gcc/4.7/lib to the link path, but maybe I can avoid specifying -lstdc++, maybe... I'll try and send you feedback :) -- Da: Michael Stahl A: libreoffice@lists.freedesktop.org Data: 20 gennaio 2015 18.02.27 CET Oggetto: Re: Solved: 4.4.0.1 build error on libstdc++ on solaris/illumos On 20.01.2015 13:38, Gabriele Bulfon wrote: Because our default gcc is 4.4.7 on XStreamOS, but I'm building with gcc 4.7, installed as an added option under /usr/gcc/4.7, I had to patch solaris.mk to link there, so here is the patch I'm using. What do you suggest in this case? i find it a bit odd that you need to link libstdc++ explicitly, shouldn't g++ do that by itself? perhaps there is some mistake in your setup, but i've never built gcc myself so no idea what could go wrong... ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Solved: 4.4.0.1 build error on libstdc++ on solaris/illumos
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 20/01/15 18:07, Gabriele Bulfon a écrit : I thought the same. But maybe g++ thinks it's going to run gnu ld, while it's going to run sun ld. Secondly, I surely had to add /usr/gcc/4.7/lib to the link path, but maybe I can avoid specifying -lstdc++, maybe... I'll try and send you feedback :) These last mods seem a bit overdone... Using pkgsrc, gcc is in (my case) /opt/local/gcc49... builds have most everything in the path or passed in. there is/are perhaps other things steering things awry. what is your $PATH ( and $(SYSBASE) in LO )? I haven't seen this type of problem (at least not with 4.3.5). -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJUvpfCAAoJECAB22fHtp27bxYIAKt2j7IPo3JespCXTdstBgE+ 9hcS3cKMMDMSeSlk/q4MaLFLII2++a2pSix62Z4EQhsfTIgm5/3aQ3Vuap9ntEzH /6Tf27oaaul4HXb5zBYb37j9A7L7CX62eesGCZkUlzUV4OSEi6riGiPk6ssrQM30 eIU4rgoCNGl0JLV7o7mUtFT517A1Mc8nI7WoGBkI6yDvjowTfCumMYPZJA4zqXBx UIu5j9Pj7lEHt9jpoDmsfz7UnCg8/F3p6ECssPFjuPcVB/WTDEpFa1RWFoAmlz6u HMAIEaKylYi7D2UShC/2rtlctTdfCfdS7Ayz47miXo9lTnmZmHLX4JodLDswCJE= =cqr9 -END PGP SIGNATURE- ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
4.4.0.1 build error on libstdc++ on solaris/illumos
Ok, now build goes on. Tried to figure out this, looks like libstdc++ is not correctly linked: Undefined first referenced symbol in file std::basic_string , std::allocator ::basic_string(std::basic_string , std::allocator ) /sources/sonicle/xstream-desktop-gate/components/libreoffice/libreoffice/libreoffice-4.4.0.2/workdir/CxxObject/l10ntools/source/idxdict/idxdict.o ld: fatal: symbolreferencing errors. No output written to /sources/sonicle/xstream-desktop-gate/components/libreoffice/libreoffice/libreoffice-4.4.0.2/workdir/LinkTarget/Executable/idxdict collect2: error: ld returned 1 exit status -- Da: Richard PALO A: gbul...@sonicle.com Norbert Thiebaud Cc: Michael Stahl libreoffice Data: 18 gennaio 2015 22.56.51 CET Oggetto: Re: 4.4.0.1 build error on sal/types.h on solaris/illumos -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Le 18/01/15 21:33, Gabriele Bulfon a écrit : Ok, I commented out these on Solaris.mk: #ifneq ($(gb_DEBUGLEVEL),0) #gb_LINKEROPTFLAGS := #else #gb_LINKEROPTFLAGS := -Wl,-O1 #endif will let you know :) -- Da: Norbert Thiebaud A: gbul...@sonicle.com Cc: Michael Stahl libreoffice Richard PALO Data: 18 gennaio 2015 20.15.22 CET Oggetto: Re: 4.4.0.1 build error on sal/types.h on solaris/illumos On Sun, Jan 18, 2015 at 12:18 PM, Gabriele Bulfon wrote: Ok, I checked and it looks fine, so solaris.mk should be taken. Also config.log shows correct variables for OS, CPU and COM. What actually happens is during make, after it has downloaded and extracted various stuff. The last one is translations file. Then it goes on building concat-deps, and linking fails: [build C ] solenv/bin/concat-deps.c [build LNK] Executable/concat-deps ld: fatal: unrecognized option '-O' ld: fatal: unrecognized option '-1' ld: fatal: use the -z help option for usage information collect2: error: ld returned 1 exit status Maybe just concat-deps have problems linking with wrong options on Solaris? Yes it is quite possible... concat-deps is a small utility I wrote to speed up the original perl-based one... and I'm quite sure I never tried to link it on Solaris. Otoh concat-deps is built using the standard gbuild mechanism for that: see solenv/Executable_concat-deps.mk so it is more likely that the problem is generic and that concat-deps just happen to be the first one to be linked. BTW, is there any way to issue gmake and let it show what command LNK is doing? It tried forcing a -n but I did not get the command debugged verbose=t make Norbert Yeah, this should go as not valid for solaris ld. Apparently comes from here: commit 3c4cd1deaf71d0d800957b3580d426c721bf7844 Author: Jonathan Adams Date: Fri Mar 16 21:50:37 2012 +0100 gbuild: switch solaris.mk to GCC -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJUvCwiAAoJECAB22fHtp27MBMH/2IYZRT44q8six0NjeXYkG6B vDe0AJund3FTcN/t9zT0bpFx9mPCCdVxWbqqdv0CFKYQrfSLhPRaksuWrAnK1mOI Nl5vcDxI8D0ls6N1c40ZIAcpI3mOeY1Xye6rpKwYJSjWxqOZHxgWEMMvIrzd9Jxb wnChiTHrDj4ljX1QCPWLxJQB0+e3gXrFmcLvQSEhIPslGPou4i14ur3tf2vVwk0a FZzCoiYfCnUil7vQJHA8vUtbVASMxX4sJ6iYOfD0K/Z+11c4PwF4xZZtZCtG6Rek qLd/Yz/OhqIg2POqJeaDL8S9fYOfrWUgfKuwcFhqBgqDQMknQH8DSeJt6IPAea0= =ZdNh -END PGP SIGNATURE- ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice