Multiple definitions of _floor_log2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple definitions of _floor_log2

Seth Copen Goldstein
I am trying to build the llvm-gcc frontend.  I think I have followed the
directions correctly.
I am using cygwin on XP SP2 (uname -a reports: CYGWIN_NT-5.1 pad7
1.5.25(0.156/4/2) 2007-12-14 19:21 i686 Cygwin)
gcc --version reports: gcc (GCC) 3.4.4 (cygming special, gdc 0.12, using
dmd 0.125)
Since there is no binary for llvm-gcc I am following the directions in
the tar file for the 4.2 version.

- I built llvm (but not the optimized version)
- I untarred the src for llvm-gcc4.2-2.1, made the proper directories
and ran

../llvm-gcc4.2-2.1.source/configure
--prefix=/seth/courses/745/srcs/llvm-gcc/install  \
  --enable-llvm=$LLVMOBJDIR --enable-languages=c,c++$EXTRALANGS
--enable-checking

and then make

It chugs along for quite some time and then gets the following when
trying to link cc1-dummy.exe:

libbackend.a(toplev.o): In function `floor_log2':
/seth/courses/745/srcs/llvm-gcc/obj/gcc/../../llvm-gcc4.2-2.1.source/gcc
/toplev.c:578: multiple definition of `_floor_log2'
llvm-main.o:/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algob
ase.h:(.text$floor_log2[_floor_log2]+0x0): first defined here
libbackend.a(toplev.o): In function `exact_log2':
/seth/courses/745/srcs/llvm-gcc/obj/gcc/../../llvm-gcc4.2-2.1.source/gcc
/toplev.c:637: multiple definition of `_exact_log2'
llvm-main.o:/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algob
ase.h:(.text$exact_log2[_exact_log2]+0x0): first defined here

------- the actual command line is:
c++   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-Wmissing-format-attribute -fno-common   -DHAVE_CONFIG_H  -o
cc1-dummy.exe c-lang.o stub-objc.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
cygwin2.o c-gimplify.o tree-mudflap.o c-pretty-print.o c-omp.o
dummy-checksum.o \
          llvm-main.o tree-browser.o libbackend.a ../libcpp/libcpp.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMBitReader.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMBitWriter.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/LLVMX86.o
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMipo.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMSelectionDAG.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMCodeGen.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMScalarOpts.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMTransformUtils.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMipa.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMAnalysis.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMTarget.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMCore.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMSupport.a
/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib/libLLVMSystem.a
../libcpp/libcpp.a -lintl -liconv ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a
-L/seth/courses/745/srcs/llvm/llvm-2.1/Release/lib  -lpthread -lltdl -lm



Any help would be appreciated.


-seth

---------------
[hidden email]                    7122 Wean Hall
www.cs.cmu.edu/~seth               School of Computer Science
phone: 412-268-3828                Carnegie Mellon University
fax:   412-268-4801                Pittsburgh, PA 15213


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Multiple definitions of _floor_log2

Anton Korobeynikov
Hello, Seth

> Any help would be appreciated.
Well, at least you should check, where and how floor_log2 is defined in
your system libstdc++

--
WBR, Anton Korobeynikov
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev