J'essaye de convertir du code gpl (pas le mien!) De C++ en C afin que je puisse l'utiliser dans un projet c-only. Je l'ai lu LLVM et suis excité, mais je suis en cours d'exécution dans une erreur de liens que je ne sais pas comment résoudre:Erreur en essayant de lier le code C++ en utilisant llvm 4.2.1
l'erreur est:
Intrinsic prototype has incorrect number of arguments!
void (i8*, i8*, i64, i32, i1)* @llvm.memmove.p0i8.p0i8.i64
Broken module found, compilation aborted!
Stack dump:
0. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
1. Running pass 'Module Verifier' on function '@_ZNSt15__copy_backwardILb1ESt26random_access_iterator_tagE8__copy_bIxEEPT_PKS3_S6_S4_'
Toute personne jamais vu ça avant? Une idée de ce qui pourrait le causer?
Voici les commandes que j'ai utilisé pour en arriver là:
dhcp-100-140:src joeltucci$ llvm-g++ msb.C -c -emit-llvm
dhcp-100-140:src joeltucci$ llvm-g++ rabincmd.C -c -emit-llvm
In file included from rabincmd.C:27:
rabinpoly.h: In member function ‘u_int64_t rabinpoly::append8(u_int64_t, u_char) const’:
rabinpoly.h:56: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
rabincmd.C: In function ‘void printChunkContents(u_int64_t, const unsigned char*, int)’:
rabincmd.C:91: warning: too few arguments for format
rabincmd.C: In member function ‘virtual void ExtractChunkProcessor::internalCompleteChunk(u_int64_t, u_int64_t)’:
rabincmd.C:547: warning: deprecated conversion from string constant to ‘char*’
rabincmd.C:551: warning: deprecated conversion from string constant to ‘char*’
dhcp-100-140:src joeltucci$ llvm -ld m
mkrabincmd.sh msb.C msb.o
mkverboseRabin.sh msb.h
dhcp-100-140:src joeltucci$ llvm -ld *.o -o program
-bash: llvm: command not found
dhcp-100-140:src joeltucci$ llvm-ld *.o -o program
-bash: llvm-ld: command not found
dhcp-100-140:src joeltucci$ llvm-
llvm-cpp-4.2 llvm-g++ llvm-g++-4.2 llvm-gcc llvm-gcc-4.2
dhcp-100-140:src joeltucci$ llvm-g++ *.o -o program
collect2: ld terminated with signal 6 [Abort trap]
Intrinsic prototype has incorrect number of arguments!
void (i8*, i8*, i64, i32, i1)* @llvm.memmove.p0i8.p0i8.i64
Broken module found, compilation aborted!
Stack dump:
0. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
1. Running pass 'Module Verifier' on function '@_ZNSt15__copy_backwardILb1ESt26random_access_iterator_tagE8__copy_bIxEEPT_PKS3_S6_S4_'
dhcp-100-140:src joeltucci$ llvm-gcc --version
i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2332.3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dhcp-100-140:src joeltucci$
dhcp-100-140:src joeltucci$
dhcp-100-140:src joeltucci$
dhcp-100-140:src joeltucci$ llvm-g++ *.o -o program
llvm-g++ llvm-g++-4.2
dhcp-100-140:src joeltucci$ llvm-gcc-4.2 --version
i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2332.3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.