>>Dear All, I have been trying for days but still cannot break this barrier. May I get your help? I have compiled llvm-2.1 successfully and make install. When I proceed with llvm-gcc-4.2-2.1, however, I keep getting linking error as attached. Some functions with totally different content conflict with each other in linking process. That is a Linux box (Debian, with 2.6.23-1 Kernel) and I have already tried combinations of --disable-shared and/or --disable-multilib. It get stuck at the same point. Thanks to Chris, I just realized Java is not supported but have no idea how to disable it. I have read the README.LLVM and got no clue. (Maybe my English is not good enough - I am not native speaker.) Once again, thank you all for the great work. Idea of LLVM is really attractive to forget about. Regards, Kinson --- /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/prev- gcc/xgcc -B/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/prev-gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -g - O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing- prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style- definition -Wmissing-format-attribute -DHAVE_CONFIG_H -o jc1 \ java/parse.o java/class.o java/decl.o java/expr.o java/ constants.o java/lang.o java/typeck.o java/except.o java/verify-glue.o java/verify-impl.o java/zextract.o java/jcf-io.o java/win32-host.o java/jcf-parse.o java/mangle.o java/mangle_name.o java/builtins.o java/ resource.o java/jcf-write.o java/buffer.o java/check-init.o java/jcf- depend.o java/jcf-path.o java/boehm.o java/java-gimplify.o main.o libbackend.a ../libcpp/libcpp.a attribs.o stub-objc.o stub-c.o -L../ zlib -lz ../libcpp/libcpp.a ../libiberty/libiberty.a ../ libdecnumber/libdecnumber.a /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/prev- gcc/xgcc -B/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/prev-gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -g - O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing- prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style- definition -Wmissing-format-attribute -DHAVE_CONFIG_H -o cc1obj- dummy \ objc/objc-lang.o objc/objc-act.o attribs.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c- opts.o c-format.o c-semantics.o c-incpath.o cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-objc-common.o c-dump.o c-pch.o c-parser.o c- gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \ main.o libbackend.a ../libcpp/libcpp.a ../libcpp/ libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a build/genchecksum cc1-dummy > cc1-checksum.c build/genchecksum cc1obj-dummy > cc1obj-checksum.c attribs.o: In function `decl_attributes': /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ gcc/../.././gcc/attribs.c:138: multiple definition of `decl_attributes' java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/gcc/../.././gcc/java/lang.c:844: first defined here stub-objc.o: In function `objc_is_class_name': /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ gcc/../.././gcc/stub-objc.c:34: multiple definition of `objc_is_class_name' java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/gcc/../.././gcc/java/lang.c:856: first defined here stub-objc.o: In function `objc_v2_component_ref_field_offset': /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ gcc/../.././gcc/stub-objc.c:474: multiple definition of `objc_v2_component_ref_field_offset' java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/gcc/../.././gcc/java/lang.c:880: first defined here stub-objc.o: In function `objc_v2_bitfield_ivar_bitpos': /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ gcc/../.././gcc/stub-objc.c:480: multiple definition of `objc_v2_bitfield_ivar_bitpos' java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/gcc/../.././gcc/java/lang.c:872: first defined here stub-objc.o: In function `objc_method_decl': /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ gcc/../.././gcc/stub-objc.c:494: multiple definition of `objc_method_decl' java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/gcc/../.././gcc/java/lang.c:863: first defined here stub-objc.o: In function `objc_create_init_utf16_var': /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ gcc/../.././gcc/stub-objc.c:576: multiple definition of `objc_create_init_utf16_var' java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/gcc/../.././gcc/java/lang.c:888: first defined here stub-objc.o: In function `objc_anonymous_local_objc_name': /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ gcc/../.././gcc/stub-objc.c:583: multiple definition of `objc_anonymous_local_objc_name' java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- linux-gnu/gcc/../.././gcc/java/lang.c:895: first defined here
You need to pass a --enable-languages=c,c++ to the initial configure invocation. --Owen On Feb 2, 2008, at 3:25 AM, Kinson Chan 陳傑信 wrote:>>> > > Dear All, > > I have been trying for days but still cannot break this barrier. May I > get your help? > > I have compiled llvm-2.1 successfully and make install. When I proceed > with llvm-gcc-4.2-2.1, however, I keep getting linking error as > attached. Some functions with totally different content conflict with > each other in linking process. > > That is a Linux box (Debian, with 2.6.23-1 Kernel) and I have already > tried combinations of --disable-shared and/or --disable-multilib. It > get stuck at the same point. > > Thanks to Chris, I just realized Java is not supported but have no > idea how to disable it. I have read the README.LLVM and got no clue. > (Maybe my English is not good enough - I am not native speaker.) > > Once again, thank you all for the great work. Idea of LLVM is really > attractive to forget about. > > Regards, > Kinson > > --- > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/prev- > gcc/xgcc -B/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/prev-gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -g - > O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing- > prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style- > definition -Wmissing-format-attribute -DHAVE_CONFIG_H -o jc1 \ > java/parse.o java/class.o java/decl.o java/expr.o java/ > constants.o java/lang.o java/typeck.o java/except.o java/verify-glue.o > java/verify-impl.o java/zextract.o java/jcf-io.o java/win32-host.o > java/jcf-parse.o java/mangle.o java/mangle_name.o java/builtins.o > java/ > resource.o java/jcf-write.o java/buffer.o java/check-init.o java/jcf- > depend.o java/jcf-path.o java/boehm.o java/java-gimplify.o main.o > libbackend.a ../libcpp/libcpp.a attribs.o stub-objc.o stub-c.o -L../ > zlib -lz ../libcpp/libcpp.a ../libiberty/libiberty.a ../ > libdecnumber/libdecnumber.a > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/prev- > gcc/xgcc -B/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/prev-gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/ -g - > O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing- > prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style- > definition -Wmissing-format-attribute -DHAVE_CONFIG_H -o cc1obj- > dummy \ > objc/objc-lang.o objc/objc-act.o attribs.o c-errors.o c-lex.o > c-pragma.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c- > opts.o c-format.o c-semantics.o c-incpath.o cppdefault.o c-ppoutput.o > c-cppbuiltin.o prefix.o c-objc-common.o c-dump.o c-pch.o c-parser.o > c- > gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o dummy-checksum.o \ > main.o libbackend.a ../libcpp/libcpp.a ../libcpp/ > libcpp.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a > build/genchecksum cc1-dummy > cc1-checksum.c > build/genchecksum cc1obj-dummy > cc1obj-checksum.c > attribs.o: In function `decl_attributes': > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ > gcc/../.././gcc/attribs.c:138: multiple definition of > `decl_attributes' > java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/gcc/../.././gcc/java/lang.c:844: first defined here > stub-objc.o: In function `objc_is_class_name': > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ > gcc/../.././gcc/stub-objc.c:34: multiple definition of > `objc_is_class_name' > java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/gcc/../.././gcc/java/lang.c:856: first defined here > stub-objc.o: In function `objc_v2_component_ref_field_offset': > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ > gcc/../.././gcc/stub-objc.c:474: multiple definition of > `objc_v2_component_ref_field_offset' > java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/gcc/../.././gcc/java/lang.c:880: first defined here > stub-objc.o: In function `objc_v2_bitfield_ivar_bitpos': > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ > gcc/../.././gcc/stub-objc.c:480: multiple definition of > `objc_v2_bitfield_ivar_bitpos' > java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/gcc/../.././gcc/java/lang.c:872: first defined here > stub-objc.o: In function `objc_method_decl': > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ > gcc/../.././gcc/stub-objc.c:494: multiple definition of > `objc_method_decl' > java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/gcc/../.././gcc/java/lang.c:863: first defined here > stub-objc.o: In function `objc_create_init_utf16_var': > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ > gcc/../.././gcc/stub-objc.c:576: multiple definition of > `objc_create_init_utf16_var' > java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/gcc/../.././gcc/java/lang.c:888: first defined here > stub-objc.o: In function `objc_anonymous_local_objc_name': > /home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown-linux-gnu/ > gcc/../.././gcc/stub-objc.c:583: multiple definition of > `objc_anonymous_local_objc_name' > java/lang.o:/home/kchan/llvm-gcc4.2-2.1.source/host-x86_64-unknown- > linux-gnu/gcc/../.././gcc/java/lang.c:895: first defined here > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2555 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080202/76f47f19/attachment.bin>
Try configuring with --disable-multilib Ciao, Duncan.
On Saturday 02, Kinson Chan 陳傑信 wrote:> That is a Linux box (Debian, with 2.6.23-1 Kernel) and I have already > tried combinations of --disable-shared and/or --disable-multilib. It > get stuck at the same point.>From the make messages it looks like you are compiling on x86_64 linux. I hadlots of problems compile llvm-gcc-4.2 from svn on x86_64. Just today I got it to work by diabling bootstrap with "--diable-bootstrap". It might also be needed to compile the 2.1 release version of llvm-gcc-4.2 Here is my configure command: ../llvm-gcc-4.2/configure --prefix=/opt/llvm --enable-llvm=/opt/llvm-top/build.llvm-2.1/ --enable-languages=c,c++ --enable-checking --disable-shared --disable-multilib --disable-bootstrap That is for a debug build. I haven't try a relase build yet, but it should only require removing the "--enable-checking" option. Also there is a bug about this problem: http://llvm.org/bugs/show_bug.cgi?id=1711 I added comments to that bug and a patch to get the latest svn revision to build on Linux x86_64. I am using Gentoo Linux with kernel 2.6.23 and gcc 4.2.2 -- Robert G. Jakabosky
Seemingly Similar Threads
- [LLVMdev] Persisting Problem Compiling llvm-gcc 4.2
- [LLVMdev] llvm-gcc4.2-2.4 build failure in /gcc/java/lang.c
- [LLVMdev] build the llvm-gcc from source, error occur.
- [LLVMdev] Persisting Problem Compiling llvm-gcc 4.2
- [LLVMdev] llvm-gcc fails to build libgcc when built with itself