[parsec-users] Issues in building bodytrack and x264 (32 bit build on 64 bit)

Joseph Greathouse jlgreath at umich.edu
Wed Jan 26 11:02:42 EST 2011


On 1/24/2011 7:27 PM, viswanathan v wrote:
> Hi,
> I am having issues in building two benchmarks as 32 bit installations on a
> 64 bit ubuntu machine. Rest of the benchmarks have compiled successfully in
> this configuration.
>
> The error with *bodytrack* is
> config.status: creating Makefile
> *sed: file ./confstat5kt25L/subs-2.sed line 7: unterminated `s' command*
> config.status: creating FlexImageLib/Makefile
> sed: file ./confstat5kt25L/subs-2.sed line 7: unterminated `s' command
> config.status: creating TrackingBenchmark/Makefile
> sed: file ./confstat5kt25L/subs-2.sed line 7: unterminated `s' command
> config.status: creating TrackingBenchmark/threads/Makefile
> sed: file ./confstat5kt25L/subs-2.sed line 7: unterminated `s' command
> config.status: creating config.h
> config.status: executing depfiles commands
>
> As a result the Makefile doesn't get created and hence the installation
> fails
>
>
> The error with *x264 *is
> /usr/bin/ar rc libx264.a common/mc.o common/predict.o common/pixel.o
> common/macroblock.o common/frame.o common/dct.o common/cpu.o common/cabac.o
> common/common.o common/mdate.o common/set.o common/quant.o common/vlc.o
> encoder/analyse.o encoder/me.o encoder/ratecontrol.o encoder/set.o
> encoder/macroblock.o encoder/cabac.o encoder/cavlc.o encoder/encoder.o
> /usr/bin/ranlib libx264.a
> /usr/bin/gcc -m32 -o x264 x264.o matroska.o muxers.o libx264.a -L/usr/lib32
> -L/usr/lib -L/usr/lib32 -L/usr/lib  -lm -lpthread -s
> libx264.a(cpu.o): In function `x264_cpu_detect':
> cpu.c:(.text+0x4f): *undefined reference to `x264_cpu_cpuid'*
> cpu.c:(.text+0x90): undefined reference to `x264_cpu_cpuid'
> cpu.c:(.text+0x126): undefined reference to `x264_cpu_cpuid'
> cpu.c:(.text+0x1a2): undefined reference to `x264_cpu_cpuid'
> cpu.c:(.text+0x218): undefined reference to `x264_cpu_cpuid'
>
>
> the output files for both the builds are attached in this mail.
>
> Can someone help me out with this?
>
>
> Many thanks,
> Viswa.

Looking through your output file for x264 shows that the Makefile is 
passing "-m32" into GCC while also passing "-DARCH_X86_64".  I would 
wager this is causing problems.

The configure scripts will set up -DARCH_X86_64 if they detect that you 
are running on a 64-bit system. In the set of changes I listed in my 
previous mail about compiling 32-on-64 PARSEC, I fooled the config.guess 
script by forcing uname to return i686 instead of x86_64.  This makes 
the configure script set -DARCH_X86.

You can force x264 to configure itself for 32-bit by opening 
./pkgs/apps/x264/src/configure and replacing the line 
'host=`./config.sub $host`' on line 179 with 
'host="i686-unknown-linux-gnu"'.  You could also manually pass in a 
--host command line option to configure, but you would end up modifying 
parsecmgmt to do this; I found quick hacks were easier. :)

As for your problems compiling bodytrack, line 7 of subs-2.sed also 
appears to be related to the automatic detection of the system 
architecture (i.e. on my x86_64 system it is 
"s, at build@,x86_64-unknown-linux-gnu,;t t").  I'm going to take a guess 
that you have a problem with the uname script; maybe it's not returning 
anything, and it's causing this sed file to be generated with an 
improperly terminated line.

What is the output of "uname -a" on the system you're trying to run this 
compilation on?  If you're following the directions I sent previously, 
did you make my recommended changes to uname? If so, did you test the 
script? Looking at the mailing list, I appear to have forgotten the # in 
first line, "#!/bin/sh", so if you copied & pasted, it may not run 
correctly.

-Joe
-- 
Joseph Lee Greathouse
Ph.D. Candidate
Electrical Engineering and Computer Science, University of Michigan


More information about the parsec-users mailing list