Я пытаюсь преобразовать некоторый код gpl (не мой!) Из C ++ в C, чтобы я мог использовать его в проекте c-only.Я читал про llvm и был взволнован, но я сталкиваюсь с ошибкой компоновщика, которую я не знаю, как исправить:
ошибка:
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-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.