[llvm-commits] [Cygwin] No runtime lib profile patch

Aaron Gray aaronngray.lists at googlemail.com
Wed Jan 13 08:34:42 PST 2010


Hi,

I am getting the following build error on doing a full build on LLVM
on Cygwin :-

make[2]: Entering directory `/home/ang/build/llvm/runtime/libprofile'
llvm[2]: Linking Debug Loadable Module profile_rt.dll
/usr/bin/ld: warning: cannot find entry symbol __cygwin_dll_entry at 12; defaulting
 to 67941000
/home/ang/build/llvm/runtime/libprofile/Debug/BasicBlockTracing.o: In function `
BBTraceAtExitHandler':
/home/ang/svn/llvm-93000/runtime/libprofile/BasicBlockTracing.c:35: undefined re
ference to `_free'
/home/ang/build/llvm/runtime/libprofile/Debug/BasicBlockTracing.o: In function `
llvm_start_basic_block_tracing':
/home/ang/svn/llvm-93000/runtime/libprofile/BasicBlockTracing.c:59: undefined re
ference to `_malloc'
/home/ang/svn/llvm-93000/runtime/libprofile/BasicBlockTracing.c:64: undefined re
ference to `_atexit'
/home/ang/build/llvm/runtime/libprofile/Debug/CommonProfiling.o: In function `sa
ve_arguments':
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:44: undefined refe
rence to `_memmove'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:47: undefined refe
rence to `_strcmp'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:49: undefined refe
rence to `_puts'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:51: undefined refe
rence to `_strdup'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:52: undefined refe
rence to `_memmove'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:56: undefined refe
rence to `_printf'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:39: undefined refe
rence to `_strncmp'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:61: undefined refe
rence to `_strlen'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:63: undefined refe
rence to `_malloc'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:65: undefined refe
rence to `_strlen'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:66: undefined refe
rence to `_memcpy'
/home/ang/build/llvm/runtime/libprofile/Debug/CommonProfiling.o: In function `wr
ite_profiling_data':
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:91: undefined refe
rence to `_open'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:93: undefined refe
rence to `_fprintf'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:95: undefined refe
rence to `_perror'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:103: undefined ref
erence to `_write'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:104: undefined ref
erence to `_write'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:105: undefined ref
erence to `_write'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:108: undefined ref
erence to `_write'
/home/ang/svn/llvm-93000/runtime/libprofile/CommonProfiling.c:114: undefined ref
erence to `_write'
/home/ang/build/llvm/runtime/libprofile/Debug/CommonProfiling.o:/home/ang/svn/ll
vm-93000/runtime/libprofile/CommonProfiling.c:115: more undefined references to
`_write' follow
/home/ang/build/llvm/runtime/libprofile/Debug/EdgeProfiling.o: In function `llvm
_start_edge_profiling':
/home/ang/svn/llvm-93000/runtime/libprofile/EdgeProfiling.c:43: undefined refere
nce to `_atexit'
/home/ang/build/llvm/runtime/libprofile/Debug/OptimalEdgeProfiling.o: In functio
n `llvm_start_opt_edge_profiling':
/home/ang/svn/llvm-93000/runtime/libprofile/OptimalEdgeProfiling.c:43: undefined
 reference to `_atexit'
/usr/lib/libpthread.a(t-d000053.o):(.text+0x2): undefined reference to `__imp___
_getreent'
collect2: ld returned 1 exit status
make[2]: *** [/home/ang/build/llvm/Debug/lib/profile_rt.dll] Error 1
make[2]: Leaving directory `/home/ang/build/llvm/runtime/libprofile'
make[1]: *** [libprofile/.makeall] Error 2
make[1]: Leaving directory `/home/ang/build/llvm/runtime'
make: *** [all] Error 1

I have done a quick patch to omit building of this library for Cygwin
as I am not sure if or how to solve this build on Cygwin.

Index: runtime/Makefile
===================================================================
--- runtime/Makefile	(revision 93262)
+++ runtime/Makefile	(working copy)
@@ -20,8 +20,12 @@
 PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
 endif

+ifeq ($(OS), Cygwin)
+PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
+endif
+
 endif

 include $(LEVEL)/Makefile.common

 install::

Hoping someone more experienced can take a look at this.

Many thanks,

Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CygwinNoLibProfile.patch
Type: application/octet-stream
Size: 404 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100113/db85b94b/attachment.obj>


More information about the llvm-commits mailing list