Check at compile time that architecture is the same as at config time #171

Closed
GoogleCodeExporter opened this Issue Apr 6, 2015 · 5 comments

Comments

Projects
None yet
1 participant
From Hajo/Odium/andre on the discussion list

Hello,

I got new error at compiling:

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] Fehler 1


what to do now? i watched this thread:
http://groups.google.com/group/mod-pagespeed-discuss/browse_thread/thread/da6084
0fad3b1fe2?tvc=2
my machine is non virtual older suse 10.1 with gcc 4.1.2

gcc -v
Using built-in specs.
Target: i586-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --
with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/
share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-
languages=c,c++,objc,fortran,obj-c++,java,ada --enable-
checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --
enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib --
with-system-zlib --enable-shared --enable-__cxa_atexit --enable-
libstdcxx-allocator=new --program-suffix= --enable-version-specific-
runtime-libs --without-system-libunwind --with-cpu=generic --host=i586-
suse-linux
Thread model: posix
gcc version 4.1.2 20070115 (prerelease) (SUSE Linux)

What to do now?
Thanks,
Hajo

Original issue reported on code.google.com by sligocki@google.com on 30 Dec 2010 at 10:00

This is a problem in the APR library, the relevant section of code is:

    497     switch(sizeof(u.tid)) {
    498     case sizeof(apr_int32_t):
    499         return conv_10(u.u32, TRUE, &is_negative, buf_end, len);
    500     case sizeof(apr_int64_t):
    501         return conv_10_quad(u.u64, TRUE, &is_negative, buf_end, len);
    502     default:
    503         /* not implemented; stick 0 in the buffer */
    504         return conv_10(0, TRUE, &is_negative, buf_end, len);
    505     }

It appears these two are the same size on your system. We get them from 
pre-configured files:

third_party/apache/apr/gen/arch/mac/ia32/include/apr.h
third_party/apache/apr/gen/arch/linux/ia32/include/apr.h
third_party/apache/apr/gen/arch/linux/x64/include/apr.h

Which define them as:

third_party/apache/apr/gen/arch/mac/ia32/include/apr.h:
typedef  short           apr_int16_t;
typedef  int             apr_int32_t;
typedef  long long            apr_int64_t;

third_party/apache/apr/gen/arch/linux/ia32/include/apr.h:
typedef  short           apr_int16_t;
typedef  int             apr_int32_t;
typedef  long long            apr_int64_t;

third_party/apache/apr/gen/arch/linux/x64/include/apr.h:
typedef  short           apr_int16_t;
typedef  int             apr_int32_t;
typedef  long            apr_int64_t;



Did you use gclient on a 64-bit machine before compiling on a 32-bit machine? 
That could cause this problem.

Also, did you actually have a problem with using python2.4 or did it just 
complain that the version was too old?

Thanks,
-Shawn

Original comment by sligocki@google.com on 30 Dec 2010 at 10:06

  • Changed state: RequestClarification
We should check at compile time if the architecture is different than at config 
time.

Original comment by sligocki@google.com on 30 Dec 2010 at 10:11

Changed to architecture check enhancement.

It would also be nice to be able to separate source download from 
configuration. I think this can be done with gclient update to download and 
then gclient runhooks to config, but it would be worth investigating that that 
works.

Original comment by sligocki@google.com on 5 Jan 2011 at 3:15

  • Changed title: Check at compile time that architecture is the same as at config time
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

Original comment by sligocki@google.com on 11 Jan 2011 at 9:53

  • Changed state: Accepted

Original comment by sligocki@google.com on 3 Jul 2013 at 9:57

  • Changed state: WontFix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment