Hi Vladimir, I don't have a workable x86_64 linux box that I can regularly use, so you will either have to provide a patch that I can incorporate into trunk, or hope that someone else comes up with one.
In the past, I have built uClibc on x86_64, and sometimes had to make local patches to the source, but I was never very happy with them and didn't commit them upstream. This is really a uClibc problem -- it might be worth seeing if uClibc has fixed it on their upstream, in which case we could probably just resync the klee-uclibc to that. IIRC, our uclibc was based on 0.9.2, and 0.9.31 is out. - Daniel On Tue, Mar 23, 2010 at 4:47 PM, Vladimir G. Ivanovic <vladimir at acm.org> wrote: > $ cd /usr/local/src > $ tar xzf ../downloads/klee-uclibc-0.01.tgz > $ cd klee-uclibc > $ ./configure --with-llvm=/usr/local/src/llvm-2.6 > $ make defconfig > $ make > ===> > ./extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h > cc1: warning: unrecognized gcc debugging option: N > ?CC ldso/ldso/ldso.oS > ?AS ldso/ldso/x86_64/resolve.oS > ?STRIP -x -R .note -R .comment ldso/ldso/ld64-uClibc_so.a > ?AR cr ldso/ldso/ld64-uClibc_so.a > ?LD ld64-uClibc-0.9.29.so > llvm-ld: Unknown command line argument '-shared'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--warn-common'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--warn-once'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '-z'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '-z'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '-z'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '-e'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '-z'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '-Bsymbolic'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--sort-common'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--discard-locals'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--discard-all'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--no-undefined'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--whole-archive'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > llvm-ld: Unknown command line argument '--no-whole-archive'. ?Try: > '/usr/local/src/llvm-2.6/Release/bin/llvm-ld --help' > make: *** [lib/ld64-uClibc.so] Error 1 > > > OK, so that won't work. Let's start afresh and use gcc: > > $ cd /usr/local/src > $ tar xzf ../downloads/klee-uclibc-0.01.tgz > $ cd klee-uclibc > $ ./configure --with-gcc > $ make defconfig > $ make > ===> > ./extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h > ?CC ldso/ldso/ldso.oS > ?AS ldso/ldso/x86_64/resolve.oS > ?STRIP -x -R .note -R .comment ldso/ldso/ld64-uClibc_so.a > ?AR cr ldso/ldso/ld64-uClibc_so.a > ?LD ld64-uClibc-0.9.29.so > ?CC lib/interp.os > ?CC ldso/libdl/libdl.oS > ?STRIP -x -R .note -R .comment ldso/libdl/libdl_so.a > ?AR cr ldso/libdl/libdl_so.a > ?CC libc/misc/assert/__assert.os > ?CC libc/misc/ctype/isalnum.os > ?CC libc/misc/ctype/isalpha.os > ?... > ?CC libc/inet/in6_addr.os > ?CC libc/inet/ether_addr.os > In file included from /usr/include/asm/posix_types.h:4, > ? ? ? ? ? ? ? ? from /usr/include/linux/posix_types.h:47, > ? ? ? ? ? ? ? ? from /usr/include/linux/types.h:8, > ? ? ? ? ? ? ? ? from /usr/include/linux/if_ether.h:24, > ? ? ? ? ? ? ? ? from ./include/netinet/if_ether.h:26, > ? ? ? ? ? ? ? ? from ./include/netinet/ether.h:26, > ? ? ? ? ? ? ? ? from libc/inet/ether_addr.c:31: > /usr/include/asm/posix_types_64.h:10: error: redefinition of typedef > '__kernel_ino_t' > ./include/bits/kernel_types.h:11: note: previous declaration of > '__kernel_ino_t' was here > /usr/include/asm/posix_types_64.h:11: error: redefinition of typedef > '__kernel_mode_t' > ./include/bits/kernel_types.h:12: note: previous declaration of > '__kernel_mode_t' was here > /usr/include/asm/posix_types_64.h:12: error: redefinition of typedef > '__kernel_nlink_t' > ./include/bits/kernel_types.h:13: note: previous declaration of > '__kernel_nlink_t' was here > /usr/include/asm/posix_types_64.h:13: error: redefinition of typedef > '__kernel_off_t' > ./include/bits/kernel_types.h:14: note: previous declaration of > '__kernel_off_t' was here > /usr/include/asm/posix_types_64.h:14: error: redefinition of typedef > '__kernel_pid_t' > ./include/bits/kernel_types.h:15: note: previous declaration of > '__kernel_pid_t' was here > /usr/include/asm/posix_types_64.h:15: error: redefinition of typedef > '__kernel_ipc_pid_t' > ./include/bits/kernel_types.h:16: note: previous declaration of > '__kernel_ipc_pid_t' was here > /usr/include/asm/posix_types_64.h:16: error: redefinition of typedef > '__kernel_uid_t' > ./include/bits/kernel_types.h:17: note: previous declaration of > '__kernel_uid_t' was here > /usr/include/asm/posix_types_64.h:17: error: redefinition of typedef > '__kernel_gid_t' > ./include/bits/kernel_types.h:18: note: previous declaration of > '__kernel_gid_t' was here > /usr/include/asm/posix_types_64.h:18: error: redefinition of typedef > '__kernel_size_t' > ./include/bits/kernel_types.h:19: note: previous declaration of > '__kernel_size_t' was here > /usr/include/asm/posix_types_64.h:19: error: redefinition of typedef > '__kernel_ssize_t' > ./include/bits/kernel_types.h:20: note: previous declaration of > '__kernel_ssize_t' was here > /usr/include/asm/posix_types_64.h:20: error: redefinition of typedef > '__kernel_ptrdiff_t' > ./include/bits/kernel_types.h:21: note: previous declaration of > '__kernel_ptrdiff_t' was here > /usr/include/asm/posix_types_64.h:21: error: redefinition of typedef > '__kernel_time_t' > ./include/bits/kernel_types.h:22: note: previous declaration of > '__kernel_time_t' was here > /usr/include/asm/posix_types_64.h:22: error: redefinition of typedef > '__kernel_suseconds_t' > ./include/bits/kernel_types.h:23: note: previous declaration of > '__kernel_suseconds_t' was here > /usr/include/asm/posix_types_64.h:23: error: redefinition of typedef > '__kernel_clock_t' > ./include/bits/kernel_types.h:24: note: previous declaration of > '__kernel_clock_t' was here > /usr/include/asm/posix_types_64.h:26: error: redefinition of typedef > '__kernel_daddr_t' > ./include/bits/kernel_types.h:25: note: previous declaration of > '__kernel_daddr_t' was here > /usr/include/asm/posix_types_64.h:27: error: redefinition of typedef > '__kernel_caddr_t' > ./include/bits/kernel_types.h:26: note: previous declaration of > '__kernel_caddr_t' was here > /usr/include/asm/posix_types_64.h:28: error: redefinition of typedef > '__kernel_uid16_t' > ./include/bits/kernel_types.h:27: note: previous declaration of > '__kernel_uid16_t' was here > /usr/include/asm/posix_types_64.h:29: error: redefinition of typedef > '__kernel_gid16_t' > ./include/bits/kernel_types.h:28: note: previous declaration of > '__kernel_gid16_t' was here > /usr/include/asm/posix_types_64.h:32: error: redefinition of typedef > '__kernel_loff_t' > ./include/bits/kernel_types.h:34: note: previous declaration of > '__kernel_loff_t' was here > /usr/include/asm/posix_types_64.h:37: error: conflicting types for > '__kernel_fsid_t' > ./include/bits/kernel_types.h:42: note: previous declaration of > '__kernel_fsid_t' was here > /usr/include/asm/posix_types_64.h:39: error: redefinition of typedef > '__kernel_old_uid_t' > ./include/bits/kernel_types.h:31: note: previous declaration of > '__kernel_old_uid_t' was here > /usr/include/asm/posix_types_64.h:40: error: redefinition of typedef > '__kernel_old_gid_t' > ./include/bits/kernel_types.h:32: note: previous declaration of > '__kernel_old_gid_t' was here > /usr/include/asm/posix_types_64.h:41: error: redefinition of typedef > '__kernel_uid32_t' > ./include/bits/kernel_types.h:29: note: previous declaration of > '__kernel_uid32_t' was here > /usr/include/asm/posix_types_64.h:42: error: redefinition of typedef > '__kernel_gid32_t' > ./include/bits/kernel_types.h:30: note: previous declaration of > '__kernel_gid32_t' was here > /usr/include/asm/posix_types_64.h:44: error: redefinition of typedef > '__kernel_old_dev_t' > ./include/bits/kernel_types.h:33: note: previous declaration of > '__kernel_old_dev_t' was here > make[1]: *** [libc/inet/ether_addr.os] Error 1 > make: *** [lib/libc.so.0] Error 2 > > Searching the archives, I see that these bugs were reported in August 2009 > and again in October 2009, but no fix has been incorporated into klee-uclibc. > > Sigh. > > OK, so create a patch file from the text and try to apply it: > > $ patch --dry-run -p1 <patch > patch: **** Only garbage was found in the patch input. > $ patch --dry-run -n -p1 <patch > can't find file to patch at input line 2 > The text leading up to this was: > -------------------------- > |diff -r klee-uclibc/.config /mnt/u64/home/ddunbar/x86_64/klee-uclibc/.config > -------------------------- > File to patch: .config > patching file .config > Hunk #1 FAILED at 3. > Hunk #2 FAILED at 13. > Hunk #3 FAILED at 27. > Hunk #4 FAILED at 32. > Hunk #5 FAILED at 35. > 5 out of 5 hunks FAILED -- saving rejects to file .config.rej > > Obviously I can (and will) apply the patches manually, but geez, won't every > single person who tries to build klee-uclibc run into the same problem? > > --- Vladimir > > -- > Vladimir G. Ivanovic ? ? ? ? ? ? ? ? ? ? ? ? ? ?http://www.leonora.org > +1 650 450 4101 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? vladimir at acm.org > > > > _______________________________________________ > klee-dev mailing list > klee-dev at keeda.stanford.edu > http://keeda.Stanford.EDU/mailman/listinfo/klee-dev > >
