Depending on your *nix distribution, it might be easy to have both versions installed. But I guess that's a topic for another list :) Brian On Thu, Aug 27, 2009 at 1:56 PM, Tovrea, George W (US SSA)<george.tovrea@xxxxxxxxxxxxxx> wrote: > You are absolutely correct. Libbz2 is NOT installed in /usr/lib. I suppose if libbz2 is required for this application, I am hosed :-( unless I can get one installed. > > Thanks for the help --- > > -----Original Message----- > From: Brian Budge [mailto:brian.budge@xxxxxxxxx] > Sent: Thursday, August 27, 2009 1:17 PM > To: Tovrea, George W (US SSA) > Cc: gcc-help@xxxxxxxxxxx > Subject: Re: Cannot build 32 bit apps with GCC 4.4.0 > > Are you positive you have the 32 bit version of libbz2 installed? > > On Thu, Aug 27, 2009 at 1:09 PM, Tovrea, George W (US > SSA)<george.tovrea@xxxxxxxxxxxxxx> wrote: >> Yes, with the following result >> >> tovrea@challenger% /home/users/tovrea/local/linux/bin/gcc -m32 -L/usr/lib -L/home/users/tovrea/local/linux/32/lib -L/home/users/tovrea/local/linux/lib/gcc/x86_64-unknown-linux-gnu/4.4.0 -L/home/users/tovrea/local/linux/lib/gcc/x86_64-unknown-linux-gnu/lib64 -o testit testit.o -lz -lbz2 -pthread -lm -lx264 -lm >> /usr/bin/ld: skipping incompatible /usr/lib64/libbz2.so when searching for -lbz2 >> /usr/bin/ld: skipping incompatible /usr/lib64/libbz2.a when searching for -lbz2 >> /usr/bin/ld: cannot find -lbz2 >> collect2: ld returned 1 exit status >> >> -----Original Message----- >> From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On Behalf Of Brian Budge >> Sent: Thursday, August 27, 2009 12:46 PM >> To: Tovrea, George W (US SSA) >> Cc: gcc-help@xxxxxxxxxxx >> Subject: Re: Cannot build 32 bit apps with GCC 4.4.0 >> >> Have you tried tagging -L/usr/lib to your command line? >> >> On Thu, Aug 27, 2009 at 12:40 PM, Tovrea, George W (US >> SSA)<george.tovrea@xxxxxxxxxxxxxx> wrote: >>> System: >>> >>> hostname = challenger >>> uname -m = x86_64 >>> uname -r = 2.6.9-67.ELxenU >>> uname -s = Linux >>> uname -v = #1 SMP Wed Nov 7 14:17:17 EST 2007 >>> /bin/arch = x86_64 >>> >>> For example: >>> >>> libx264.a built as 32 bit >>> >>> Testit.c >>> extern int x264_encoder_open(); >>> int main(void){ x264_encoder_open(); } >>> >>> /home/users/tovrea/local/linux/bin/gcc -m32 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -I/home/users/tovrea/local/linux/32/include -std=c99 -fomit-frame-pointer -pthread -c -o testit.o testit.c >>> >>> Works ok. but >>> >>> /home/users/tovrea/local/linux/bin/gcc -L/home/users/tovrea/local/linux/32/lib -L/home/users/tovrea/local/linux/lib/gcc/x86_64-unknown-linux-gnu/4.4.0 -L/home/users/tovrea/local/linux/lib/gcc/x86_64-unknown-linux-gnu/lib64 -o testit testit.o -lz -lbz2 -pthread -lm -lx264 -lm >>> /usr/bin/ld: skipping incompatible /home/users/tovrea/local/linux/32/lib/libx264.a when searching for -lx264 >>> /usr/bin/ld: cannot find -lx264 >>> >>> And >>> >>> tovrea@challenger%/home/users/tovrea/local/linux/bin/gcc -m32 -L/home/users/tovrea/local/linux/32/lib -L/home/users/tovrea/local/linux/lib/gcc/x86_64-unknown-linux-gnu/4.4.0 -L/home/users/tovrea/local/linux/lib/gcc/x86_64-unknown-linux-gnu/lib64 -o testit testit.o -lz -lbz2 -pthread -lm -lx264 -lm >>> /usr/bin/ld: skipping incompatible /usr/lib64/libbz2.so when searching for -lbz2 >>> /usr/bin/ld: skipping incompatible /usr/lib64/libbz2.a when searching for -lbz2 >>> /usr/bin/ld: cannot find -lbz2 >>> collect2: ld returned 1 exit status >>> >>> What am I doing wrong here? I don't see it. I would expect if I select m32 that gcc would select /usr/lib (32 bit libs) rather than /usr/lib64. >>> >>> Bill Tovrea >>> >>> BAE Systems >>> >>> 16550 West Bernardo Drive >>> San Diego, CA 92127 >>> >>> Telephone: (858) 592-5292 >>> >>> Pager: (888) 971-4964 >>> >>> E-mail: George.Tovrea@xxxxxxxxxxxxxx >>> >>> >>> >> >