compile error with apr ( apr_snprintf.c )

52 views
Skip to first unread message

Javier Camuñas

unread,
Nov 8, 2010, 8:08:58 AM11/8/10
to mod-pagespeed-discuss
Hi again. I`ve problems building in 64bit box.

Some info about the box:
uname -a
Linux kernelpanic 2.6.32-5-xen-amd64 #1 SMP Tue Jun 1 06:38:33 UTC
2010 x86_64 GNU/Linux


# make BUILDTYPE=Release
ACTION Extracting last change to /usr/local/src/mod_pagespeed/src/
out/Release/obj/gen/build/LASTCHANGE out/Release/obj/gen/build/
LASTCHANGE.always
CC(target) out/Release/obj.target/apr/third_party/apache/apr/src/
strings/apr_snprintf.o
third_party/apache/apr/src/strings/apr_snprintf.c: In function
‘conv_os_thread_t’:
third_party/apache/apr/src/strings/apr_snprintf.c:500: error:
duplicate case value
third_party/apache/apr/src/strings/apr_snprintf.c:498: error:
previously used here
third_party/apache/apr/src/strings/apr_snprintf.c: In function
‘conv_os_thread_t_hex’:
third_party/apache/apr/src/strings/apr_snprintf.c:671: error:
duplicate case value
third_party/apache/apr/src/strings/apr_snprintf.c:669: error:
previously used here
make: *** [out/Release/obj.target/apr/third_party/apache/apr/src/
strings/apr_snprintf.o] Error

I've executed several times gclient sync --force without success.

Thanks

Joshua Marantz

unread,
Nov 8, 2010, 8:16:44 AM11/8/10
to mod-pagesp...@googlegroups.com
Hi Javier,

This problem is in the Apache code (the apr library specifically).  We are building that ourselves when we make our 64-bit distribution; indeed most of us develop on 64-bit boxes.  So we'll need to figure out what's different about your build environment from ours.

Can you check 2 more details for us:

1. Can you type 'which gcc' and 'gcc -v' so we know which versions you have installed?
2. Can you verify that you ran 'gclient update --force' from the same box that you tried to compile from?  I'm sure you did but I just want to verify.

-Josh

Javier Camuñas

unread,
Nov 8, 2010, 10:18:05 AM11/8/10
to mod-pagesp...@googlegroups.com
On Mon, Nov 8, 2010 at 2:16 PM, Joshua Marantz <jmar...@google.com> wrote:
Hi Javier,

This problem is in the Apache code (the apr library specifically).  We are building that ourselves when we make our 64-bit distribution; indeed most of us develop on 64-bit boxes.  So we'll need to figure out what's different about your build environment from ours.

Can you check 2 more details for us:

1. Can you type 'which gcc' and 'gcc -v' so we know which versions you have installed?

 Debian Lenny

 gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1)

 
2. Can you verify that you ran 'gclient update --force' from the same box that you tried to compile from?  I'm sure you did but I just want to verify.

I ran update and error remains the same.
 

Libo Song

unread,
Nov 8, 2010, 3:11:34 PM11/8/10
to mod-pagesp...@googlegroups.com
Hi Javier,

Can you build the following code, run it and report the result? It tests
your machine's integer size. Thanks.


#include <stdio.h>

int main() {
int int_size = sizeof(int);
int ll_size = sizeof(long long);
printf("int is %d bytes, long long is %d bytes.", int_size, ll_size);

return 0;

Javier Camuñas

unread,
Nov 8, 2010, 3:27:37 PM11/8/10
to mod-pagesp...@googlegroups.com
Here we go!

int is 4 bytes, long long is 8 bytes.

Javier Camuñas

unread,
Nov 13, 2010, 11:02:09 AM11/13/10
to mod-pagesp...@googlegroups.com
Hi Libo

It was my fault. I created by mistake a xen image with 64bit kernel but 386 architecture by default

I run
xen-create-image --hostname=test --size=5Gb --swap=1Gb --memory=128M --mac=AA:1A:A1:AA:AA:FF  --role=udev --ip 192.168.2.98

insted of

xen-create-image --hostname=test --size=5Gb --swap=1Gb --memory=128M --mac=AA:1A:A1:AA:AA:FF -arch=amd64  --role=udev --ip 192.168.2.98 --force

Now the target looks fine
test:~# gcc -v
Using built-in specs.
Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/
share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu


Of course is in xen scope. This will not happen again to me :-)


2010/11/8 Javier Camuñas <kam...@gmail.com>

Richard Rabbat

unread,
Nov 13, 2010, 11:53:34 AM11/13/10
to mod-pagesp...@googlegroups.com
Javier,

any reason to build from source vs. the package?
Richard
Reply all
Reply to author
Forward
0 new messages