On Fri, Feb 26, 2010 at 04:53:48PM +0200, Török Edwin wrote: > On 2010-02-26 16:50, Dan Nicholson wrote: > >> gcc array.o shaderutil.o readtex.o -L../../lib32 -lglut -lGLEW -lGLU > >> -lGL -lm -m32 -o array > > > > These programs aren't in progs/glsl. Are you sure this is solving your > > problem? Can you just show me the make output for the failed run? > > They are, I use git master, on this commit: > commit e5c691f445e1c02e6e2f75b817b13d7024f7a3a6 > Author: Vinson Lee <v...@vmware.com> > Date: Fri Feb 26 00:17:03 2010 -0800 > > r300/compiler: Assert that array index is not negative. > > ls -l progs/glsl/shaderutil.c progs/glsl/array.c > -rw-r--r-- 1 edwin edwin 4838 Feb 23 22:26 progs/glsl/array.c > > make[1]: Entering directory `/home/edwin/mesa/progs/glsl' > cp ../../progs/util/extfuncs.h . > cp ../../progs/util/shaderutil.h . > cp ../../progs/util/readtex.h . > gcc -I../../include -g -O2 -Wall -Wmissing-prototypes -std=c99 > -ffast-math -fvisibility=hidden -fno-strict-aliasing -m32 -fPIC -m32 > -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE > -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_USE_TLS -DPTHREADS > -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING > -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -c -o array.o array.c > cp ../../progs/util/shaderutil.c . > gcc -I../../include -g -O2 -Wall -Wmissing-prototypes -std=c99 > -ffast-math -fvisibility=hidden -fno-strict-aliasing -m32 -fPIC -m32 > -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE > -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_USE_TLS -DPTHREADS > -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING > -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -c -o shaderutil.o shaderutil.c > cp ../../progs/util/readtex.c . > gcc -I../../include -g -O2 -Wall -Wmissing-prototypes -std=c99 > -ffast-math -fvisibility=hidden -fno-strict-aliasing -m32 -fPIC -m32 > -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE > -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_USE_TLS -DPTHREADS > -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING > -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -c -o readtex.o readtex.c > gcc array.o shaderutil.o readtex.o -L../../lib32 -lglut -lGLEW -lGLU > -lGL -lm -o array > /usr/bin/ld: skipping incompatible ../../lib32/libglut.so when searching > for -lglut > /usr/bin/ld: cannot find -lglut > collect2: ld returned 1 exit status > make[1]: *** [array] Error 1 > make[1]: Leaving directory `/home/edwin/mesa/progs/glsl'
Can you try the patch below? I think this fixes the issue more generally. -- Dan >From bf51ca551c4e4b994d15f3d6b374c5e5b21ece4e Mon Sep 17 00:00:00 2001 From: Dan Nicholson <dbn.li...@gmail.com> Date: Fri, 26 Feb 2010 10:01:37 -0800 Subject: [PATCH] progs/glsl: Ensure CFLAGS are passed during linking Commit ab6825b3e3fd04564b7840e945fa32b0a7b3c0c2 fixed an issue where the architecture option -m32 wasn't being passed to the compiler when linking .o files. This would only fix the issue with user's building with the hacky --enable-32-bit. The right way to fix this is to pass CFLAGS to the linker, which the GNU make builtin rules unfortunately don't do. Signed-off-by: Dan Nicholson <dbn.li...@gmail.com> --- progs/glsl/Makefile | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile index aaa54cb..3b5a595 100644 --- a/progs/glsl/Makefile +++ b/progs/glsl/Makefile @@ -16,7 +16,7 @@ LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLEW_LIB) -l$(GLU_LIB) \ # using : to avoid APP_CC pointing to CC loop CC := $(APP_CC) CFLAGS := -I$(INCDIR) $(CFLAGS) -LDLIBS = $(LIBS) $(ARCH_FLAGS) +LDLIBS = $(LIBS) PROG_SOURCES = \ array.c \ @@ -69,6 +69,9 @@ $(PROG_OBJS): $(UTIL_HEADERS) $(PROGS): $(UTIL_OBJS) +.o: + $(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@ + clean: -rm -f $(PROGS) -rm -f *.o *~ -- 1.6.6.1 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev