<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - cannot find map header on ubuntu12.04 using clang3.4"
href="http://llvm.org/bugs/show_bug.cgi?id=19839">19839</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>cannot find map header on ubuntu12.04 using clang3.4
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.4
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Headers
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>gdsyzxzcx@126.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I am trying to compile maloader <<a href="https://github.com/shinh/maloader">https://github.com/shinh/maloader</a>> using
clang-3.4 on Ubuntu 12.04 (precise) amd64. The clang-3.4 were installed by apt
as instructed <<a href="http://llvm.org/apt/">http://llvm.org/apt/</a>>. Here is my building process.
#################################################
$ git clone <a href="https://github.com/shinh/maloader.git">https://github.com/shinh/maloader.git</a>
$ cd maloader
$ export USE_LIBCXX=1
$ make
clang -g -Iinclude -Wall -MMD -fno-omit-frame-pointer -O -m64 -stdlib=libc++
-DUSE_LIBCXX -fPIC -c -o libmac/mac.o libmac/mac.c
clang: warning: argument unused during compilation: '-stdlib=libc++'
clang -shared libmac/mac.o libmac/strmode.c -g -Iinclude -Wall -MMD
-fno-omit-frame-pointer -O -m64 -stdlib=libc++ -DUSE_LIBCXX -fPIC -o libmac.so
-m64
clang: warning: argument unused during compilation: '-stdlib=libc++'
clang++ -g -Iinclude -Wall -MMD -fno-omit-frame-pointer -O -m64 -stdlib=libc++
-DUSE_LIBCXX -W -Werror -c -o extract.o extract.cc
extract.cc:38:10: fatal error: 'map' file not found
#include <map>
^
1 error generated.
make: *** [extract.o] Error 1
#################################################
I don't think this is related to the upstream maloader source, since map.h
should be in path.
I have installed gcc-4.8, which has the correspondent header at
/usr/include/c++/4.8/profile/map.h
But when I modified the CFLAGS from
GCCFLAGS+=-g -Iinclude -Wall -MMD -fno-omit-frame-pointer -O $(GCC_EXTRA_FLAGS)
to
GCCFLAGS+=-g -Iinclude -I/usr/include/c++/4.8
-I/usr/include/x86_64-linux-gnu/c++/4.8 -Wall -MMD -fno-omit-frame-pointer -O
$(GCC_EXTRA_FLAGS)
It cannot be linked:
################################################
$ make clean
rm -f *.o *.d */*.o */*.d libmac.so extract macho2elf ld-mac
$ make
clang -g -Iinclude -I/usr/include/c++/4.8
-I/usr/include/x86_64-linux-gnu/c++/4.8 -Wall -MMD -fno-omit-frame-pointer -O
-m64 -stdlib=libc++ -DUSE_LIBCXX -fPIC -c -o libmac/mac.o libmac/mac.c
clang: warning: argument unused during compilation: '-stdlib=libc++'
clang -shared libmac/mac.o libmac/strmode.c -g -Iinclude -I/usr/include/c++/4.8
-I/usr/include/x86_64-linux-gnu/c++/4.8 -Wall -MMD -fno-omit-frame-pointer -O
-m64 -stdlib=libc++ -DUSE_LIBCXX -fPIC -o libmac.so -m64
clang: warning: argument unused during compilation: '-stdlib=libc++'
clang++ -g -Iinclude -I/usr/include/c++/4.8
-I/usr/include/x86_64-linux-gnu/c++/4.8 -Wall -MMD -fno-omit-frame-pointer -O
-m64 -stdlib=libc++ -DUSE_LIBCXX -W -Werror -c -o extract.o extract.cc
clang++ -g -Iinclude -I/usr/include/c++/4.8
-I/usr/include/x86_64-linux-gnu/c++/4.8 -Wall -MMD -fno-omit-frame-pointer -O
-m64 -stdlib=libc++ -DUSE_LIBCXX -W -Werror -c -o fat.o fat.cc
clang++ extract.o fat.o -o extract -g -I. -W -Wall -m64 -lc++ -lsupc++
/usr/bin/ld: cannot find -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [extract] Error 1
################################################</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>