From: Jeff S. <why...@ya...> - 2010-03-12 14:48:12
|
> This change: > > commit d888bbc45a84946cafb4f4d2c89681a580cd89bc > Author: Brian Paul <br...@vm...> > Date: Tue Nov 17 13:39:13 2009 -0700 > > progs/xdemos: added -lX11 -lpthread for GNU gold linker > > breaks the build if you are building under a specific path prefix > (say, /opt/XORG) and you have an existing X11 installation in the > usual location (/usr, etc.) I found the same problem and sent a patch to this list a few hours ago to address it: "[PATCH] Add -L$(libdir) for xdemos and egl so that the right libX11 is found" -- Jeff Smith |
From: Dan N. <dbn...@gm...> - 2010-03-12 15:33:06
|
On Fri, Mar 12, 2010 at 6:48 AM, Jeff Smith <why...@ya...> wrote: >> This change: >> >> commit d888bbc45a84946cafb4f4d2c89681a580cd89bc >> Author: Brian Paul <br...@vm...> >> Date: Tue Nov 17 13:39:13 2009 -0700 >> >> progs/xdemos: added -lX11 -lpthread for GNU gold linker >> >> breaks the build if you are building under a specific path prefix >> (say, /opt/XORG) and you have an existing X11 installation in the >> usual location (/usr, etc.) > > I found the same problem and sent a patch to this list a few hours ago to address it: > > "[PATCH] Add -L$(libdir) for xdemos and egl so that the right libX11 is found" That's not really the right thing, though. You're assuming that I have libX11 in the same libdir as I'm installing to and I want to use it. The fact is that configure uses pkg-config to check for x11 and other libraries needed to link the demos. It certainly was working before without requiring hardcoding things into the Makefiles. -- Dan |
From: Brian P. <br...@vm...> - 2010-03-12 16:15:48
|
Dan Nicholson wrote: >On Fri, Mar 12, 2010 at 6:48 AM, Jeff Smith <why...@ya...> wrote: >>> This change: >>> >>> commit d888bbc45a84946cafb4f4d2c89681a580cd89bc >>> Author: Brian Paul <br...@vm...> >>> Date: Tue Nov 17 13:39:13 2009 -0700 >>> >>> progs/xdemos: added -lX11 -lpthread for GNU gold linker >>> >>> breaks the build if you are building under a specific path prefix >>> (say, /opt/XORG) and you have an existing X11 installation in the >>> usual location (/usr, etc.) >> >> I found the same problem and sent a patch to this list a few hours ago to address it: >> >> "[PATCH] Add -L$(libdir) for xdemos and egl so that the right libX11 is found" > >That's not really the right thing, though. You're assuming that I have >libX11 in the same libdir as I'm installing to and I want to use it. >The fact is that configure uses pkg-config to check for x11 and other >libraries needed to link the demos. It certainly was working before >without requiring hardcoding things into the Makefiles. Oops, I didn't see your reply, Dan. I already committed Jeff's patch. If you have better fix, please revert. -Brian |
From: Dan N. <dbn...@gm...> - 2010-03-12 16:51:37
|
On Fri, Mar 12, 2010 at 8:13 AM, Brian Paul <br...@vm...> wrote: > Dan Nicholson wrote: >>On Fri, Mar 12, 2010 at 6:48 AM, Jeff Smith <why...@ya...> wrote: >>>> This change: >>>> >>>> commit d888bbc45a84946cafb4f4d2c89681a580cd89bc >>>> Author: Brian Paul <br...@vm...> >>>> Date: Tue Nov 17 13:39:13 2009 -0700 >>>> >>>> progs/xdemos: added -lX11 -lpthread for GNU gold linker >>>> >>>> breaks the build if you are building under a specific path prefix >>>> (say, /opt/XORG) and you have an existing X11 installation in the >>>> usual location (/usr, etc.) >>> >>> I found the same problem and sent a patch to this list a few hours ago to address it: >>> >>> "[PATCH] Add -L$(libdir) for xdemos and egl so that the right libX11 is found" >> >>That's not really the right thing, though. You're assuming that I have >>libX11 in the same libdir as I'm installing to and I want to use it. >>The fact is that configure uses pkg-config to check for x11 and other >>libraries needed to link the demos. It certainly was working before >>without requiring hardcoding things into the Makefiles. > > Oops, I didn't see your reply, Dan. I already committed Jeff's patch. If you have better fix, please revert. No problem. I'll look at it a little later and see if there's more of a general fix from autoconf. I imagine it's not the last time we'll see build breakage in the demos. -- Dan |
From: Jeff S. <why...@ya...> - 2010-03-13 01:25:14
|
>From: Dan Nicholson <dbn...@gm...> >To: Brian Paul <br...@vm...> >Cc: Jeff Smith <why...@ya...>; David Miller <da...@da...>; "mes...@li..." <mes...@li...> >Sent: Fri, March 12, 2010 10:51:29 AM >Subject: Re: [Mesa3d-dev] xdemos build breakage... > >>>That's not really the right thing, though. You're assuming that I have >>>libX11 in the same libdir as I'm installing to and I want to use it. >>>The fact is that configure uses pkg-config to check for x11 and other >>>libraries needed to link the demos. It certainly was working before >>>without requiring hardcoding things into the Makefiles. >> >> Oops, I didn't see your reply, Dan. I already committed Jeff's patch. If you have better fix, please revert. > >No problem. I'll look at it a little later and see if there's more of >a general fix from autoconf. I imagine it's not the last time we'll >see build breakage in the demos. > >-- >Dan Dan, Can you please review this patch? I believe it handles the case described. -- Jeff |
From: Dan N. <dbn...@gm...> - 2010-03-13 19:18:13
|
On Fri, Mar 12, 2010 at 5:25 PM, Jeff Smith <why...@ya...> wrote: >>From: Dan Nicholson <dbn...@gm...> > >>To: Brian Paul <br...@vm...> >>Cc: Jeff Smith <why...@ya...>; David Miller <da...@da...>; "mes...@li..." <mes...@li...> >>Sent: Fri, March 12, 2010 10:51:29 AM >>Subject: Re: [Mesa3d-dev] xdemos build breakage... >> >>>>That's not really the right thing, though. You're assuming that I have >>>>libX11 in the same libdir as I'm installing to and I want to use it. >>>>The fact is that configure uses pkg-config to check for x11 and other >>>>libraries needed to link the demos. It certainly was working before >>>>without requiring hardcoding things into the Makefiles. >>> >>> Oops, I didn't see your reply, Dan. I already committed Jeff's patch. If you have better fix, please revert. >> >>No problem. I'll look at it a little later and see if there's more of >>a general fix from autoconf. I imagine it's not the last time we'll >>see build breakage in the demos. >> >>-- >>Dan > > > Dan, > Can you please review this patch? I believe it handles the case described. Yeah, I think this is a better way to handle it. Still not 100% foolproof, and we've still got -lpthread kludged in there, but this should work for more people. Some comments below. diff --git a/configs/autoconf.in b/configs/autoconf.in index bf34f3b..66c1ee4 100644 --- a/configs/autoconf.in +++ b/configs/autoconf.in @@ -24,6 +24,8 @@ RADEON_CFLAGS = @RADEON_CFLAGS@ RADEON_LDFLAGS = @RADEON_LDFLAGS@ INTEL_LIBS = @INTEL_LIBS@ INTEL_CFLAGS = @INTEL_CFLAGS@ +X11_LIBS = @X11_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ # Assembler MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ diff --git a/configure.ac b/configure.ac index c5ff8dc..ccc3107 100644 --- a/configure.ac +++ b/configure.ac @@ -547,8 +547,16 @@ else x11_pkgconfig=no fi dnl Use the autoconf macro if no pkg-config files -if test "$x11_pkgconfig" = no; then +if test "$x11_pkgconfig" = yes; then + PKG_CHECK_MODULES([X11], [x11]) +else AC_PATH_XTRA + if test -z "$X11_CFLAGS"; then + X11_CFLAGS="$X_CFLAGS" + fi + if test -z "$X11_LIBS"; then + X11_LIBS="$X_LIBS -lX11" + fi fi If we just use X_{CFLAGS,LIBS}, then we don't have to do the dance with X11_{CFLAGS,LIBS} and it will work for manual overrides whether people have pkg-config or not. So, I'd suggest changing the first argument to PKG_CHECK_MODULES to just X and using X_{CFLAGS,LIBS} everywhere else. -- Dan |
From: Dan N. <dbn...@gm...> - 2010-03-13 20:02:28
|
On Sat, Mar 13, 2010 at 11:18 AM, Dan Nicholson <dbn...@gm...> wrote: > On Fri, Mar 12, 2010 at 5:25 PM, Jeff Smith <why...@ya...> wrote: >>>From: Dan Nicholson <dbn...@gm...> >> >>>To: Brian Paul <br...@vm...> >>>Cc: Jeff Smith <why...@ya...>; David Miller <da...@da...>; "mes...@li..." <mes...@li...> >>>Sent: Fri, March 12, 2010 10:51:29 AM >>>Subject: Re: [Mesa3d-dev] xdemos build breakage... >>> >>>>>That's not really the right thing, though. You're assuming that I have >>>>>libX11 in the same libdir as I'm installing to and I want to use it. >>>>>The fact is that configure uses pkg-config to check for x11 and other >>>>>libraries needed to link the demos. It certainly was working before >>>>>without requiring hardcoding things into the Makefiles. >>>> >>>> Oops, I didn't see your reply, Dan. I already committed Jeff's patch. If you have better fix, please revert. >>> >>>No problem. I'll look at it a little later and see if there's more of >>>a general fix from autoconf. I imagine it's not the last time we'll >>>see build breakage in the demos. >>> >>>-- >>>Dan >> >> >> Dan, >> Can you please review this patch? I believe it handles the case described. > > Yeah, I think this is a better way to handle it. Still not 100% > foolproof, and we've still got -lpthread kludged in there, but this > should work for more people. Some comments below. > > diff --git a/configs/autoconf.in b/configs/autoconf.in > index bf34f3b..66c1ee4 100644 > --- a/configs/autoconf.in > +++ b/configs/autoconf.in > @@ -24,6 +24,8 @@ RADEON_CFLAGS = @RADEON_CFLAGS@ > RADEON_LDFLAGS = @RADEON_LDFLAGS@ > INTEL_LIBS = @INTEL_LIBS@ > INTEL_CFLAGS = @INTEL_CFLAGS@ > +X11_LIBS = @X11_LIBS@ > +X11_CFLAGS = @X11_CFLAGS@ > > # Assembler > MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ > diff --git a/configure.ac b/configure.ac > index c5ff8dc..ccc3107 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -547,8 +547,16 @@ else > x11_pkgconfig=no > fi > dnl Use the autoconf macro if no pkg-config files > -if test "$x11_pkgconfig" = no; then > +if test "$x11_pkgconfig" = yes; then > + PKG_CHECK_MODULES([X11], [x11]) > +else > AC_PATH_XTRA > + if test -z "$X11_CFLAGS"; then > + X11_CFLAGS="$X_CFLAGS" > + fi > + if test -z "$X11_LIBS"; then > + X11_LIBS="$X_LIBS -lX11" > + fi > fi > > If we just use X_{CFLAGS,LIBS}, then we don't have to do the dance > with X11_{CFLAGS,LIBS} and it will work for manual overrides whether > people have pkg-config or not. So, I'd suggest changing the first > argument to PKG_CHECK_MODULES to just X and using X_{CFLAGS,LIBS} > everywhere else. I went ahead and committed the patch with these changes since I needed it for something else. See 8d86d395dcf6a5f192b6987485bb7aef49f1fefc. Thanks. -- Dan |
From: Jeff S. <why...@ya...> - 2010-03-14 04:20:43
|
>From: Dan Nicholson <dbn...@gm...> >To: Jeff Smith <why...@ya...> >Cc: Brian Paul <br...@vm...>; David Miller <da...@da...>; "mes...@li..." <mes...@li...> >Sent: Sat, March 13, 2010 2:02:17 PM >Subject: Re: [Mesa3d-dev] xdemos build breakage... > >> If we just use X_{CFLAGS,LIBS}, then we don't have to do the dance >> with X11_{CFLAGS,LIBS} and it will work for manual overrides whether >> people have pkg-config or not. So, I'd suggest changing the first >> argument to PKG_CHECK_MODULES to just X and using X_{CFLAGS,LIBS} >> everywhere else. > >I went ahead and committed the patch with these changes since I needed >it for something else. See 8d86d395dcf6a5f192b6987485bb7aef49f1fefc. Except that AC_PATH_XTRA returns X_LIBS without '-lX11', while PKG_CHECK_MODULES returns X_LIBS with it. In the attached patch I add '-lX11' to the former. Of course, with '-lX11' as part of X_LIBS, the explicit '-lX11' can be removed from the places that use X_LIBS. -- Jeff |
From: Julien C. <jcr...@de...> - 2010-03-15 12:25:19
|
On Sat, Mar 13, 2010 at 20:20:36 -0800, Jeff Smith wrote: > Except that AC_PATH_XTRA returns X_LIBS without '-lX11', while > PKG_CHECK_MODULES returns X_LIBS with it. In the attached patch > I add '-lX11' to the former. Of course, with '-lX11' as part of X_LIBS, the > explicit '-lX11' can be removed from the places that use X_LIBS. > If this wants -lX11, then it should use AC_PATH_X, not AC_PATH_XTRA, though? Cheers, Julien |
From: Dan N. <dbn...@gm...> - 2010-03-15 12:59:35
|
On Mon, Mar 15, 2010 at 5:24 AM, Julien Cristau <jcr...@de...> wrote: > On Sat, Mar 13, 2010 at 20:20:36 -0800, Jeff Smith wrote: >> Except that AC_PATH_XTRA returns X_LIBS without '-lX11', while >> PKG_CHECK_MODULES returns X_LIBS with it. In the attached patch >> I add '-lX11' to the former. Of course, with '-lX11' as part of X_LIBS, the >> explicit '-lX11' can be removed from the places that use X_LIBS. >> > If this wants -lX11, then it should use AC_PATH_X, not AC_PATH_XTRA, > though? AC_PATH_XTRA is just AC_PATH_X with some additional crap to make compiling/linking X programs work on various platforms. I think Jeff is right. I'd forgotten that AC_PATH_X* doesn't actually add the -lX11 to the X_LIBS variable. Jeff, it should get swapped back around to what you had in your patch and a s/X_\(CFLAGS\|LIBS\)/X11_\1/g across the rest of the files. I can put that together a little later if you don't have time to make another patch on master. -- Dan |
From: Jeff S. <why...@ya...> - 2010-03-15 15:21:33
|
>> Except that AC_PATH_XTRA returns X_LIBS without '-lX11', while >> PKG_CHECK_MODULES returns X_LIBS with it. In the attached patch >> I add '-lX11' to the former. Of course, with '-lX11' as part of X_LIBS, the >> explicit '-lX11' can be removed from the places that use X_LIBS. > >Jeff, it should get swapped back around to what you had in your patch >and a s/X_\(CFLAGS\|LIBS\)/X11_\1/g across the rest of the files. I >can put that together a little later if you don't have time to make >another patch on master. > >-- >Dan You can go ahead and do that yourself, if it's all the same to you. I am busy elsewhere today. -- Jeff |