Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On Wed, 2014-10-29 at 19:00 +, Emil Velikov wrote: > On 27/10/14 21:03, Jan Vesely wrote: > > On Mon, 2014-10-27 at 20:22 +, Emil Velikov wrote: > >> On 27/10/14 18:05, Jan Vesely wrote: > >>> On Mon, 2014-10-27 at 02:24 +, Emil Velikov wrote: > On 26/10/14 19:36, Jan Vesely wrote: > > On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: > >> On 24/10/14 17:03, Jan Vesely wrote: > >>> -Wl,--exclude-libs prevents automatic export of symbols > >>> > >>> > >>> CC: Kai Wasserbach > >>> CC: Emil Velikov > >>> Signed-off-by: Jan Vesely > >>> --- > >>> > >>> Kai, > >>> can you try this patch with your setup, and check whether LLVM > >>> symbols are > >>> exported from mesa library? (and it's still working) > >>> > >>> Emil, > >>> would it help to have --exclude-libs ALL enabled globally? > >>> > >> Haven't really looked up on the documentation about it, yet there > >> should > >> be no (unneeded) exported symbols thanks to the version scripts. > >> As such I'm not entirely sure what this patch (attempts to) resolve :( > > > > you are right. I don't know why I thought it was still a problem. > > In that case the attached patch should fix compiling with llvm static > > libs (#70410) > > > For future patches please add the full link in the commit message > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70410 > > Afaics the bug mentioned has a slightly different patch, which brings > the question - do we need to append to the existing LLVM_LIBS, or can we > overwrite them ? Either way it would be nice if we can get a tested-by > or two :) > >>> > >>> Hi, > >>> > >>> I looked at this again. LLVM cmake links system-libs as either PUBLIC or > >>> INTERFACE [0]. > >>> it means my patch is incorrect, and we should link against system-libs > >>> even if we use llvm-shared-libs. > >>> you can add my R-b to the patch by K. Sobiecky that is attached to the > >>> bug.[1] > >>> > >> Sigh... "cmake why you so PoS ?" > >> > >> On a more mature note: > >> I do not see why would we need it to link against those libraries for > >> shared linking. If their libs are broken (have unresolved symbols), and > >> we need this hack to get them working then maybe, but > >> ... looking at line 151 - # FIXME: Should this be really PUBLIC? > >> Answer: PRIVATE for shared libs, PUBLIC for static ones. > >> > >> Using PUBLIC causes all the users to recursively link against those > >> deps. Leading to over-linking and opening the door for serious issues. > > > > looks like misdesign on llvm side. they use public to bring systemlibs > > to other llvm libs, while ignore private deps elsewhere (like libffi). > > I'd try to send a patch, but my last attempt to get Alexander's rtti > > patch in is stuck for 9 months... > > > Yes, dealing with build systems is a job no-one wants to do, and I fear > most people underestimate it. Please let them know and be persistent > otherwise they might will end up abusing it too much :) just FYI the llvm cmake part got fixed in r221530 and r221531. > > > anyway, since we only need those libs in static builds, do you want me > > to repost the patch with bug reference and Kai's tested by? > > > There is no problem. I've picked it up, added the tags + cc'd > mesa-stable, as I would expect a few more people willing to use mesa > with static linked llvm. > > Thanks > Emil > > > jan > > > >> > >> > >> -Emil > >> > >> P.S. Both their automake + cmake builds seems _quite_ bad. > >> autoconf/Readme has a nice documentation of it :) > >> > >> > >>> jan > >>> > >>> > >>> [0] lib/Support/CMakeLists.txt:150 > >>> [1] https://bugs.freedesktop.org/attachment.cgi?id=91764 > > Thanks > Emil > > > jan > > > >> > >> -Emil > >> > >>> jan > >>> > >>> configure.ac | 10 +- > >>> 1 file changed, 9 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/configure.ac b/configure.ac > >>> index 3c76deb..b4b4b13 100644 > >>> --- a/configure.ac > >>> +++ b/configure.ac > >>> @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then > >>> dnl already added all of these objects to LLVM_LIBS. > >>> fi > >>> else > >>> -AC_MSG_WARN([Building mesa with staticly linked LLVM may > >>> cause compilation issues]) > >>> +AC_MSG_WARN([Building mesa with statically linked LLVM may > >>> cause compilation issues]) > >>> + dnl Don't export symbols automatically > >>> + dnl TODO: Do we want to list llvm libs explicitly here? > >>> + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" > >>> + dnl We need to link to llvm system libs when using static libs > >>> + dnl However, only llvm 3.5+ provides --system-libs > >>> + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; > >
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On 27/10/14 21:03, Jan Vesely wrote: > On Mon, 2014-10-27 at 20:22 +, Emil Velikov wrote: >> On 27/10/14 18:05, Jan Vesely wrote: >>> On Mon, 2014-10-27 at 02:24 +, Emil Velikov wrote: On 26/10/14 19:36, Jan Vesely wrote: > On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: >> On 24/10/14 17:03, Jan Vesely wrote: >>> -Wl,--exclude-libs prevents automatic export of symbols >>> >>> >>> CC: Kai Wasserbach >>> CC: Emil Velikov >>> Signed-off-by: Jan Vesely >>> --- >>> >>> Kai, >>> can you try this patch with your setup, and check whether LLVM symbols >>> are >>> exported from mesa library? (and it's still working) >>> >>> Emil, >>> would it help to have --exclude-libs ALL enabled globally? >>> >> Haven't really looked up on the documentation about it, yet there should >> be no (unneeded) exported symbols thanks to the version scripts. >> As such I'm not entirely sure what this patch (attempts to) resolve :( > > you are right. I don't know why I thought it was still a problem. > In that case the attached patch should fix compiling with llvm static > libs (#70410) > For future patches please add the full link in the commit message Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70410 Afaics the bug mentioned has a slightly different patch, which brings the question - do we need to append to the existing LLVM_LIBS, or can we overwrite them ? Either way it would be nice if we can get a tested-by or two :) >>> >>> Hi, >>> >>> I looked at this again. LLVM cmake links system-libs as either PUBLIC or >>> INTERFACE [0]. >>> it means my patch is incorrect, and we should link against system-libs >>> even if we use llvm-shared-libs. >>> you can add my R-b to the patch by K. Sobiecky that is attached to the >>> bug.[1] >>> >> Sigh... "cmake why you so PoS ?" >> >> On a more mature note: >> I do not see why would we need it to link against those libraries for >> shared linking. If their libs are broken (have unresolved symbols), and >> we need this hack to get them working then maybe, but >> ... looking at line 151 - # FIXME: Should this be really PUBLIC? >> Answer: PRIVATE for shared libs, PUBLIC for static ones. >> >> Using PUBLIC causes all the users to recursively link against those >> deps. Leading to over-linking and opening the door for serious issues. > > looks like misdesign on llvm side. they use public to bring systemlibs > to other llvm libs, while ignore private deps elsewhere (like libffi). > I'd try to send a patch, but my last attempt to get Alexander's rtti > patch in is stuck for 9 months... > Yes, dealing with build systems is a job no-one wants to do, and I fear most people underestimate it. Please let them know and be persistent otherwise they might will end up abusing it too much :) > anyway, since we only need those libs in static builds, do you want me > to repost the patch with bug reference and Kai's tested by? > There is no problem. I've picked it up, added the tags + cc'd mesa-stable, as I would expect a few more people willing to use mesa with static linked llvm. Thanks Emil > jan > >> >> >> -Emil >> >> P.S. Both their automake + cmake builds seems _quite_ bad. >> autoconf/Readme has a nice documentation of it :) >> >> >>> jan >>> >>> >>> [0] lib/Support/CMakeLists.txt:150 >>> [1] https://bugs.freedesktop.org/attachment.cgi?id=91764 Thanks Emil > jan > >> >> -Emil >> >>> jan >>> >>> configure.ac | 10 +- >>> 1 file changed, 9 insertions(+), 1 deletion(-) >>> >>> diff --git a/configure.ac b/configure.ac >>> index 3c76deb..b4b4b13 100644 >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then >>> dnl already added all of these objects to LLVM_LIBS. >>> fi >>> else >>> -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause >>> compilation issues]) >>> +AC_MSG_WARN([Building mesa with statically linked LLVM may >>> cause compilation issues]) >>> + dnl Don't export symbols automatically >>> + dnl TODO: Do we want to list llvm libs explicitly here? >>> + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" >>> + dnl We need to link to llvm system libs when using static libs >>> + dnl However, only llvm 3.5+ provides --system-libs >>> + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; >>> then >>> + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" >>> + fi >>> fi >>> fi >>> >>> >> > >>> >> > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
Hi Jan, Jan Vesely wrote on 26.10.2014 20:36: > On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: >> On 24/10/14 17:03, Jan Vesely wrote: >>> -Wl,--exclude-libs prevents automatic export of symbols >>> >>> >>> CC: Kai Wasserbach >>> CC: Emil Velikov >>> Signed-off-by: Jan Vesely >>> --- >>> >>> Kai, >>> can you try this patch with your setup, and check whether LLVM symbols are >>> exported from mesa library? (and it's still working) >>> >>> Emil, >>> would it help to have --exclude-libs ALL enabled globally? >>> >> Haven't really looked up on the documentation about it, yet there should >> be no (unneeded) exported symbols thanks to the version scripts. >> As such I'm not entirely sure what this patch (attempts to) resolve :( > > you are right. I don't know why I thought it was still a problem. > In that case the attached patch should fix compiling with llvm static > libs (#70410) this patch on top of attachment 108315 from bug 85380 gives a successful build with current Git HEAD (1a170980a0) and LLVM r220648 from SVN. You can have my Tested-by: Kai Wasserbäch for both. Cheers, Kai mesa.amd64.upl.log.xz Description: application/xz signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On Mon, 2014-10-27 at 20:22 +, Emil Velikov wrote: > On 27/10/14 18:05, Jan Vesely wrote: > > On Mon, 2014-10-27 at 02:24 +, Emil Velikov wrote: > >> On 26/10/14 19:36, Jan Vesely wrote: > >>> On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: > On 24/10/14 17:03, Jan Vesely wrote: > > -Wl,--exclude-libs prevents automatic export of symbols > > > > > > CC: Kai Wasserbach > > CC: Emil Velikov > > Signed-off-by: Jan Vesely > > --- > > > > Kai, > > can you try this patch with your setup, and check whether LLVM symbols > > are > > exported from mesa library? (and it's still working) > > > > Emil, > > would it help to have --exclude-libs ALL enabled globally? > > > Haven't really looked up on the documentation about it, yet there should > be no (unneeded) exported symbols thanks to the version scripts. > As such I'm not entirely sure what this patch (attempts to) resolve :( > >>> > >>> you are right. I don't know why I thought it was still a problem. > >>> In that case the attached patch should fix compiling with llvm static > >>> libs (#70410) > >>> > >> For future patches please add the full link in the commit message > >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70410 > >> > >> Afaics the bug mentioned has a slightly different patch, which brings > >> the question - do we need to append to the existing LLVM_LIBS, or can we > >> overwrite them ? Either way it would be nice if we can get a tested-by > >> or two :) > > > > Hi, > > > > I looked at this again. LLVM cmake links system-libs as either PUBLIC or > > INTERFACE [0]. > > it means my patch is incorrect, and we should link against system-libs > > even if we use llvm-shared-libs. > > you can add my R-b to the patch by K. Sobiecky that is attached to the > > bug.[1] > > > Sigh... "cmake why you so PoS ?" > > On a more mature note: > I do not see why would we need it to link against those libraries for > shared linking. If their libs are broken (have unresolved symbols), and > we need this hack to get them working then maybe, but > ... looking at line 151 - # FIXME: Should this be really PUBLIC? > Answer: PRIVATE for shared libs, PUBLIC for static ones. > > Using PUBLIC causes all the users to recursively link against those > deps. Leading to over-linking and opening the door for serious issues. looks like misdesign on llvm side. they use public to bring systemlibs to other llvm libs, while ignore private deps elsewhere (like libffi). I'd try to send a patch, but my last attempt to get Alexander's rtti patch in is stuck for 9 months... anyway, since we only need those libs in static builds, do you want me to repost the patch with bug reference and Kai's tested by? jan > > > -Emil > > P.S. Both their automake + cmake builds seems _quite_ bad. > autoconf/Readme has a nice documentation of it :) > > > > jan > > > > > > [0] lib/Support/CMakeLists.txt:150 > > [1] https://bugs.freedesktop.org/attachment.cgi?id=91764 > >> > >> Thanks > >> Emil > >> > >>> jan > >>> > > -Emil > > > jan > > > > configure.ac | 10 +- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/configure.ac b/configure.ac > > index 3c76deb..b4b4b13 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then > > dnl already added all of these objects to LLVM_LIBS. > > fi > > else > > -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause > > compilation issues]) > > +AC_MSG_WARN([Building mesa with statically linked LLVM may > > cause compilation issues]) > > + dnl Don't export symbols automatically > > + dnl TODO: Do we want to list llvm libs explicitly here? > > + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" > > + dnl We need to link to llvm system libs when using static libs > > + dnl However, only llvm 3.5+ provides --system-libs > > + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; > > then > > + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" > > + fi > > fi > > fi > > > > > > >>> > >> > > > -- Jan Vesely signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On 27/10/14 18:05, Jan Vesely wrote: > On Mon, 2014-10-27 at 02:24 +, Emil Velikov wrote: >> On 26/10/14 19:36, Jan Vesely wrote: >>> On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: On 24/10/14 17:03, Jan Vesely wrote: > -Wl,--exclude-libs prevents automatic export of symbols > > > CC: Kai Wasserbach > CC: Emil Velikov > Signed-off-by: Jan Vesely > --- > > Kai, > can you try this patch with your setup, and check whether LLVM symbols are > exported from mesa library? (and it's still working) > > Emil, > would it help to have --exclude-libs ALL enabled globally? > Haven't really looked up on the documentation about it, yet there should be no (unneeded) exported symbols thanks to the version scripts. As such I'm not entirely sure what this patch (attempts to) resolve :( >>> >>> you are right. I don't know why I thought it was still a problem. >>> In that case the attached patch should fix compiling with llvm static >>> libs (#70410) >>> >> For future patches please add the full link in the commit message >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70410 >> >> Afaics the bug mentioned has a slightly different patch, which brings >> the question - do we need to append to the existing LLVM_LIBS, or can we >> overwrite them ? Either way it would be nice if we can get a tested-by >> or two :) > > Hi, > > I looked at this again. LLVM cmake links system-libs as either PUBLIC or > INTERFACE [0]. > it means my patch is incorrect, and we should link against system-libs > even if we use llvm-shared-libs. > you can add my R-b to the patch by K. Sobiecky that is attached to the > bug.[1] > Sigh... "cmake why you so PoS ?" On a more mature note: I do not see why would we need it to link against those libraries for shared linking. If their libs are broken (have unresolved symbols), and we need this hack to get them working then maybe, but ... looking at line 151 - # FIXME: Should this be really PUBLIC? Answer: PRIVATE for shared libs, PUBLIC for static ones. Using PUBLIC causes all the users to recursively link against those deps. Leading to over-linking and opening the door for serious issues. -Emil P.S. Both their automake + cmake builds seems _quite_ bad. autoconf/Readme has a nice documentation of it :) > jan > > > [0] lib/Support/CMakeLists.txt:150 > [1] https://bugs.freedesktop.org/attachment.cgi?id=91764 >> >> Thanks >> Emil >> >>> jan >>> -Emil > jan > > configure.ac | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 3c76deb..b4b4b13 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then > dnl already added all of these objects to LLVM_LIBS. > fi > else > -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause > compilation issues]) > +AC_MSG_WARN([Building mesa with statically linked LLVM may cause > compilation issues]) > + dnl Don't export symbols automatically > + dnl TODO: Do we want to list llvm libs explicitly here? > + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" > + dnl We need to link to llvm system libs when using static libs > + dnl However, only llvm 3.5+ provides --system-libs > + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then > + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" > + fi > fi > fi > > >>> >> > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On Mon, 2014-10-27 at 02:24 +, Emil Velikov wrote: > On 26/10/14 19:36, Jan Vesely wrote: > > On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: > >> On 24/10/14 17:03, Jan Vesely wrote: > >>> -Wl,--exclude-libs prevents automatic export of symbols > >>> > >>> > >>> CC: Kai Wasserbach > >>> CC: Emil Velikov > >>> Signed-off-by: Jan Vesely > >>> --- > >>> > >>> Kai, > >>> can you try this patch with your setup, and check whether LLVM symbols are > >>> exported from mesa library? (and it's still working) > >>> > >>> Emil, > >>> would it help to have --exclude-libs ALL enabled globally? > >>> > >> Haven't really looked up on the documentation about it, yet there should > >> be no (unneeded) exported symbols thanks to the version scripts. > >> As such I'm not entirely sure what this patch (attempts to) resolve :( > > > > you are right. I don't know why I thought it was still a problem. > > In that case the attached patch should fix compiling with llvm static > > libs (#70410) > > > For future patches please add the full link in the commit message > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70410 > > Afaics the bug mentioned has a slightly different patch, which brings > the question - do we need to append to the existing LLVM_LIBS, or can we > overwrite them ? Either way it would be nice if we can get a tested-by > or two :) Hi, I looked at this again. LLVM cmake links system-libs as either PUBLIC or INTERFACE [0]. it means my patch is incorrect, and we should link against system-libs even if we use llvm-shared-libs. you can add my R-b to the patch by K. Sobiecky that is attached to the bug.[1] jan [0] lib/Support/CMakeLists.txt:150 [1] https://bugs.freedesktop.org/attachment.cgi?id=91764 > > Thanks > Emil > > > jan > > > >> > >> -Emil > >> > >>> jan > >>> > >>> configure.ac | 10 +- > >>> 1 file changed, 9 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/configure.ac b/configure.ac > >>> index 3c76deb..b4b4b13 100644 > >>> --- a/configure.ac > >>> +++ b/configure.ac > >>> @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then > >>> dnl already added all of these objects to LLVM_LIBS. > >>> fi > >>> else > >>> -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause > >>> compilation issues]) > >>> +AC_MSG_WARN([Building mesa with statically linked LLVM may cause > >>> compilation issues]) > >>> + dnl Don't export symbols automatically > >>> + dnl TODO: Do we want to list llvm libs explicitly here? > >>> + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" > >>> + dnl We need to link to llvm system libs when using static libs > >>> + dnl However, only llvm 3.5+ provides --system-libs > >>> + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then > >>> + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" > >>> + fi > >>> fi > >>> fi > >>> > >>> > >> > > > -- Jan Vesely signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On 27 October 2014 02:24, Emil Velikov wrote: > Afaics the bug mentioned has a slightly different patch, which brings > the question - do we need to append to the existing LLVM_LIBS, or can we > overwrite them ? Not sure where I was looking - ignore the above question. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On 26/10/14 19:36, Jan Vesely wrote: > On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: >> On 24/10/14 17:03, Jan Vesely wrote: >>> -Wl,--exclude-libs prevents automatic export of symbols >>> >>> >>> CC: Kai Wasserbach >>> CC: Emil Velikov >>> Signed-off-by: Jan Vesely >>> --- >>> >>> Kai, >>> can you try this patch with your setup, and check whether LLVM symbols are >>> exported from mesa library? (and it's still working) >>> >>> Emil, >>> would it help to have --exclude-libs ALL enabled globally? >>> >> Haven't really looked up on the documentation about it, yet there should >> be no (unneeded) exported symbols thanks to the version scripts. >> As such I'm not entirely sure what this patch (attempts to) resolve :( > > you are right. I don't know why I thought it was still a problem. > In that case the attached patch should fix compiling with llvm static > libs (#70410) > For future patches please add the full link in the commit message Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70410 Afaics the bug mentioned has a slightly different patch, which brings the question - do we need to append to the existing LLVM_LIBS, or can we overwrite them ? Either way it would be nice if we can get a tested-by or two :) Thanks Emil > jan > >> >> -Emil >> >>> jan >>> >>> configure.ac | 10 +- >>> 1 file changed, 9 insertions(+), 1 deletion(-) >>> >>> diff --git a/configure.ac b/configure.ac >>> index 3c76deb..b4b4b13 100644 >>> --- a/configure.ac >>> +++ b/configure.ac >>> @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then >>> dnl already added all of these objects to LLVM_LIBS. >>> fi >>> else >>> -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause >>> compilation issues]) >>> +AC_MSG_WARN([Building mesa with statically linked LLVM may cause >>> compilation issues]) >>> + dnl Don't export symbols automatically >>> + dnl TODO: Do we want to list llvm libs explicitly here? >>> + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" >>> + dnl We need to link to llvm system libs when using static libs >>> + dnl However, only llvm 3.5+ provides --system-libs >>> + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then >>> + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" >>> + fi >>> fi >>> fi >>> >>> >> > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
j6FKeCGoTAkAkNnN4gJeu3cyJDJs02u Oj83ttbyXf0x0Tvyzgo6g/nqJbWUQPn7/6PvqIHRhyXylxigUEXu+8q1aoJ3VsWI1Db2 e4vOkQjbXp5GtbVxExaE+zkZnLmc/0+n5A+BeRDJ7T9Da44RKrW+QqOaQUGQdaDKRAWj Z83g== X-Gm-Message-State: ALoCoQmssjbT76QLQMYDrFPuhC0x4bT5YnzP053cLgEO5n5almn40uxwu5GLY1Jm/+vZrJxBnB9H X-Received: by 10.140.106.138 with SMTP id e10mr7423483qgf.71.1414170184055; Fri, 24 Oct 2014 10:03:04 -0700 (PDT) Received: from adriatix.rutgers.edu ([198.151.130.146]) by mx.google.com with ESMTPSA id m13sm4595462qav.40.2014.10.24.10.03.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Oct 2014 10:03:03 -0700 (PDT) Sender: Jan Vesely From: Jan Vesely To: mesa-dev@lists.freedesktop.org Cc: Kai Wasserbach , Emil Velikov Subject: [Mesa-dev][PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm Date: Fri, 24 Oct 2014 13:03:02 -0400 Message-Id: <1414170182-17303-1-git-send-email-jan.ves...@rutgers.edu> X-Mailer: git-send-email 1.9.3 -Wl,--exclude-libs prevents automatic export of symbols CC: Kai Wasserbach CC: Emil Velikov Signed-off-by: Jan Vesely --- Kai, can you try this patch with your setup, and check whether LLVM symbols are exported from mesa library? (and it's still working) Emil, would it help to have --exclude-libs ALL enabled globally? jan configure.ac | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/configure.ac +++ b/configure.ac @@ -2007,7 +2007,15 @@ if test "x$MESA_LLVM" != x0; then dnl already added all of these objects to LLVM_LIBS. fi else -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause compilation issues]) +AC_MSG_WARN([Building mesa with statically linked LLVM may cause compilation issues]) + dnl Don't export symbols automatically + dnl TODO: Do we want to list llvm libs explicitly here? + LLVM_LDFLAGS+=" -Wl,--exclude-libs ALL" + dnl We need to link to llvm system libs when using static libs + dnl However, only llvm 3.5+ provides --system-libs + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" + fi fi fi signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On Fri, 2014-10-24 at 23:54 +, Emil Velikov wrote: > On 24/10/14 17:03, Jan Vesely wrote: > > -Wl,--exclude-libs prevents automatic export of symbols > > > > > > CC: Kai Wasserbach > > CC: Emil Velikov > > Signed-off-by: Jan Vesely > > --- > > > > Kai, > > can you try this patch with your setup, and check whether LLVM symbols are > > exported from mesa library? (and it's still working) > > > > Emil, > > would it help to have --exclude-libs ALL enabled globally? > > > Haven't really looked up on the documentation about it, yet there should > be no (unneeded) exported symbols thanks to the version scripts. > As such I'm not entirely sure what this patch (attempts to) resolve :( you are right. I don't know why I thought it was still a problem. In that case the attached patch should fix compiling with llvm static libs (#70410) jan > > -Emil > > > jan > > > > configure.ac | 10 +- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/configure.ac b/configure.ac > > index 3c76deb..b4b4b13 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then > > dnl already added all of these objects to LLVM_LIBS. > > fi > > else > > -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause > > compilation issues]) > > +AC_MSG_WARN([Building mesa with statically linked LLVM may cause > > compilation issues]) > > + dnl Don't export symbols automatically > > + dnl TODO: Do we want to list llvm libs explicitly here? > > + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" > > + dnl We need to link to llvm system libs when using static libs > > + dnl However, only llvm 3.5+ provides --system-libs > > + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then > > + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" > > + fi > > fi > > fi > > > > > -- Jan Vesely From 1cf52d23a3e3bda69c83e436e2109da896d51436 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Thu, 23 Oct 2014 17:17:07 -0400 Subject: [Mesa-dev][PATCH v2 1/1] configure: include llvm systemlibs when using static llvm v2: drop -WL,--exclude-libs, it's not necessary fix tabs/spaces Signed-off-by: Jan Vesely --- configure.ac | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3c76deb..14204e5 100644 --- a/configure.ac +++ b/configure.ac @@ -1981,7 +1981,12 @@ if test "x$MESA_LLVM" != x0; then dnl already added all of these objects to LLVM_LIBS. fi else -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause compilation issues]) +AC_MSG_WARN([Building mesa with statically linked LLVM may cause compilation issues]) +dnl We need to link to llvm system libs when using static libs +dnl However, only llvm 3.5+ provides --system-libs +if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then +LLVM_LIBS="$LLVM_LIBS `$LLVM_CONFIG --system-libs`" +fi fi fi -- 1.9.3 signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On 24/10/14 17:03, Jan Vesely wrote: > -Wl,--exclude-libs prevents automatic export of symbols > > > CC: Kai Wasserbach > CC: Emil Velikov > Signed-off-by: Jan Vesely > --- > > Kai, > can you try this patch with your setup, and check whether LLVM symbols are > exported from mesa library? (and it's still working) > > Emil, > would it help to have --exclude-libs ALL enabled globally? > Haven't really looked up on the documentation about it, yet there should be no (unneeded) exported symbols thanks to the version scripts. As such I'm not entirely sure what this patch (attempts to) resolve :( -Emil > jan > > configure.ac | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/configure.ac b/configure.ac > index 3c76deb..b4b4b13 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then > dnl already added all of these objects to LLVM_LIBS. > fi > else > -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause > compilation issues]) > +AC_MSG_WARN([Building mesa with statically linked LLVM may cause > compilation issues]) > + dnl Don't export symbols automatically > + dnl TODO: Do we want to list llvm libs explicitly here? > + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" > + dnl We need to link to llvm system libs when using static libs > + dnl However, only llvm 3.5+ provides --system-libs > + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then > + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" > + fi > fi > fi > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On Fri, 2014-10-24 at 23:48 +0200, Kai Wasserbäch wrote: > Hi Jan, > Jan Vesely wrote on 24.10.2014 23:30: > > On Fri, 2014-10-24 at 22:42 +0200, Kai Wasserbäch wrote: > >> Jan Vesely wrote on 24.10.2014 19:03: > >>> -Wl,--exclude-libs prevents automatic export of symbols > >>> > >>> > >>> CC: Kai Wasserbach > >>> CC: Emil Velikov > >>> Signed-off-by: Jan Vesely > >>> --- > >>> > >>> Kai, > >>> can you try this patch with your setup, and check whether LLVM symbols are > >>> exported from mesa library? (and it's still working) > >> > >> with this patch applied on top of attachment 108315, I get the following > >> build > > > > yeah, that's because the correct form should be "-Wl,--exclude-libs > > ALL", > > sorry about that > > this still fails with (though I might have done something wrong in changing > the > patch): thanks for testing, the patch is ok. looks like i'll need to setup a static build and investigate this better. thanks again, jan > > //usrusr//binbin//ld:ld :cannot cannotfind findrelro : relro:No Nosuch > > suchfile fileor ordirectory > > directory > > /usr/bin/ld: cannot find relro: No such file or directory > > /usr/bin/ld: cannot find relro: No such file or directory > > /usr/bin/ld: cannot find relro: No such file or directory > > /usr/bin/ld: cannot find relro: No such file or directory > > collect2: error: ld returned 1 exit status > > collect2: error: ld returned 1 exit status > > collect2: error: ld returned 1 exit status > > collect2: error: ld returned 1 exit status > > collect2: error: ld returned 1 exit status > > collect2: error: ld returned 1 exit status > > Makefile:900: recipe for target 'pipe_swrast.la' failed > > make[4]: *** [pipe_swrast.la] Error 1 > > make[4]: *** Waiting for unfinished jobs > > Makefile:888: recipe for target 'pipe_nouveau.la' failed > > make[4]: *** [pipe_nouveau.la] Error 1 > > Makefile:903: recipe for target 'pipe_vmwgfx.la' failed > > make[4]: *** [pipe_vmwgfx.la] Error 1 > > Makefile:897: recipe for target 'pipe_radeonsi.la' failed > > make[4]: *** [pipe_radeonsi.la] Error 1 > > Makefile:891: recipe for target 'pipe_r300.la' failed > > make[4]: *** [pipe_r300.la] Error 1 > > Makefile:894: recipe for target 'pipe_r600.la' failed > > make[4]: *** [pipe_r600.la] Error 1 > > make[4]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src/gallium/targets/pipe-loader' > > Makefile:558: recipe for target 'all-recursive' failed > > make[3]: *** [all-recursive] Error 1 > > make[3]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src/gallium' > > Makefile:521: recipe for target 'all-recursive' failed > > make[2]: *** [all-recursive] Error 1 > > make[2]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src' > > Makefile:589: recipe for target 'all-recursive' failed > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri' > > debian/rules:204: recipe for target > > 'debian/stamp/x86_64-linux-gnu-build-dri' failed > > make: *** [debian/stamp/x86_64-linux-gnu-build-dri] Error 2 > > dpkg-buildpackage: error: debian/rules build gave error exit status 2 > > E: Failed autobuilding of package > > I've attached the full build log and the updated patch. > > Cheers, > Kai -- Jan Vesely signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
On Fri, 2014-10-24 at 22:42 +0200, Kai Wasserbäch wrote: > Hi Jan, > Jan Vesely wrote on 24.10.2014 19:03: > > -Wl,--exclude-libs prevents automatic export of symbols > > > > > > CC: Kai Wasserbach > > CC: Emil Velikov > > Signed-off-by: Jan Vesely > > --- > > > > Kai, > > can you try this patch with your setup, and check whether LLVM symbols are > > exported from mesa library? (and it's still working) > > with this patch applied on top of attachment 108315, I get the following build yeah, that's because the correct form should be "-Wl,--exclude-libs ALL", sorry about that > error: > > /usr/bin/ld: cannot find exclude-libs: No such file or directory > > collect2: error: ld returned 1 exit status > > Makefile:894: recipe for target 'pipe_r600.la' failed > > make[4]: *** [pipe_r600.la] Error 1 > > make[4]: *** Waiting for unfinished jobs > > /usr/bin/ld: cannot find exclude-libs: No such file or directory > > collect2: error: ld returned 1 exit status > > Makefile:900: recipe for target 'pipe_swrast.la' failed > > make[4]: *** [pipe_swrast.la] Error 1 > > /usr/bin/ld: cannot find exclude-libs: No such file or directory > > collect2: error: ld returned 1 exit status > > Makefile:903: recipe for target 'pipe_vmwgfx.la' failed > > make[4]: *** [pipe_vmwgfx.la] Error 1 > > /usr/bin/ld: cannot find exclude-libs: No such file or directory > > collect2: error: ld returned 1 exit status > > Makefile:897: recipe for target 'pipe_radeonsi.la' failed > > make[4]: *** [pipe_radeonsi.la] Error 1 > > /usr/bin/ld: cannot find exclude-libs: No such file or directory > > collect2: error: ld returned 1 exit status > > Makefile:888: recipe for target 'pipe_nouveau.la' failed > > make[4]: *** [pipe_nouveau.la] Error 1 > > /usr/bin/ld: cannot find exclude-libs: No such file or directory > > collect2: error: ld returned 1 exit status > > Makefile:891: recipe for target 'pipe_r300.la' failed > > make[4]: *** [pipe_r300.la] Error 1 > > make[4]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src/gallium/targets/pipe-loader' > > Makefile:558: recipe for target 'all-recursive' failed > > make[3]: *** [all-recursive] Error 1 > > make[3]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src/gallium' > > Makefile:521: recipe for target 'all-recursive' failed > > make[2]: *** [all-recursive] Error 1 > > make[2]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src' > > Makefile:589: recipe for target 'all-recursive' failed > > make[1]: *** [all-recursive] Error 1 > > make[1]: Leaving directory > > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri' > > debian/rules:204: recipe for target > > 'debian/stamp/x86_64-linux-gnu-build-dri' failed > > make: *** [debian/stamp/x86_64-linux-gnu-build-dri] Error 2 > > dpkg-buildpackage: error: debian/rules build gave error exit status 2 > > You can find the full build log attached to this e-mail. > > Cheers, > Kai -- Jan Vesely signature.asc Description: This is a digitally signed message part ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
Hi Jan, Jan Vesely wrote on 24.10.2014 19:03: > -Wl,--exclude-libs prevents automatic export of symbols > > > CC: Kai Wasserbach > CC: Emil Velikov > Signed-off-by: Jan Vesely > --- > > Kai, > can you try this patch with your setup, and check whether LLVM symbols are > exported from mesa library? (and it's still working) with this patch applied on top of attachment 108315, I get the following build error: > /usr/bin/ld: cannot find exclude-libs: No such file or directory > collect2: error: ld returned 1 exit status > Makefile:894: recipe for target 'pipe_r600.la' failed > make[4]: *** [pipe_r600.la] Error 1 > make[4]: *** Waiting for unfinished jobs > /usr/bin/ld: cannot find exclude-libs: No such file or directory > collect2: error: ld returned 1 exit status > Makefile:900: recipe for target 'pipe_swrast.la' failed > make[4]: *** [pipe_swrast.la] Error 1 > /usr/bin/ld: cannot find exclude-libs: No such file or directory > collect2: error: ld returned 1 exit status > Makefile:903: recipe for target 'pipe_vmwgfx.la' failed > make[4]: *** [pipe_vmwgfx.la] Error 1 > /usr/bin/ld: cannot find exclude-libs: No such file or directory > collect2: error: ld returned 1 exit status > Makefile:897: recipe for target 'pipe_radeonsi.la' failed > make[4]: *** [pipe_radeonsi.la] Error 1 > /usr/bin/ld: cannot find exclude-libs: No such file or directory > collect2: error: ld returned 1 exit status > Makefile:888: recipe for target 'pipe_nouveau.la' failed > make[4]: *** [pipe_nouveau.la] Error 1 > /usr/bin/ld: cannot find exclude-libs: No such file or directory > collect2: error: ld returned 1 exit status > Makefile:891: recipe for target 'pipe_r300.la' failed > make[4]: *** [pipe_r300.la] Error 1 > make[4]: Leaving directory > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src/gallium/targets/pipe-loader' > Makefile:558: recipe for target 'all-recursive' failed > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src/gallium' > Makefile:521: recipe for target 'all-recursive' failed > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri/src' > Makefile:589: recipe for target 'all-recursive' failed > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory > '/tmp/buildd/mesa-10.4~20141024.1.git5fc0e11053/build/dri' > debian/rules:204: recipe for target 'debian/stamp/x86_64-linux-gnu-build-dri' > failed > make: *** [debian/stamp/x86_64-linux-gnu-build-dri] Error 2 > dpkg-buildpackage: error: debian/rules build gave error exit status 2 You can find the full build log attached to this e-mail. Cheers, Kai mesa.amd64.priv.log.xz Description: application/xz signature.asc Description: OpenPGP digital signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH WIP 1/1] configure: include llvm systemlibs when using static llvm
-Wl,--exclude-libs prevents automatic export of symbols CC: Kai Wasserbach CC: Emil Velikov Signed-off-by: Jan Vesely --- Kai, can you try this patch with your setup, and check whether LLVM symbols are exported from mesa library? (and it's still working) Emil, would it help to have --exclude-libs ALL enabled globally? jan configure.ac | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3c76deb..b4b4b13 100644 --- a/configure.ac +++ b/configure.ac @@ -1981,7 +1981,15 @@ if test "x$MESA_LLVM" != x0; then dnl already added all of these objects to LLVM_LIBS. fi else -AC_MSG_WARN([Building mesa with staticly linked LLVM may cause compilation issues]) +AC_MSG_WARN([Building mesa with statically linked LLVM may cause compilation issues]) + dnl Don't export symbols automatically + dnl TODO: Do we want to list llvm libs explicitly here? + LLVM_LDFLAGS+=" -Wl,exclude-libs ALL" + dnl We need to link to llvm system libs when using static libs + dnl However, only llvm 3.5+ provides --system-libs + if test $LLVM_VERSION_MAJOR -eq 3 -a $LLVM_VERSION_MINOR -ge 5; then + LLVM_LIBS+=" `$LLVM_CONFIG --system-libs`" + fi fi fi -- 1.9.3 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev