[LLVMbugs] [Bug 5657] New: Cygwin build fails due to missing library
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Dec 1 05:38:32 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=5657
Summary: Cygwin build fails due to missing library
Product: Build scripts
Version: trunk
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Makefiles
AssignedTo: unassignedbugs at nondot.org
ReportedBy: julien.etienne at gmail.com
CC: llvmbugs at cs.uiuc.edu
Hello,
Using an up to date cygwin installation (updated the 01/12/2009), I am getting
the following build error:
ld: warning: cannot find entry symbol __cygwin_dll_entry at 12; defaulting to
63cc1000
Step to reproduce:
1- Get an up to date cygwin
2- Check out the llvm trunk (current rev is 90219)
3- Create the build directory: "mkdir build-cygwin"
4- Go in this directory and configure: "cd build-cygwin && ../configure"
5- Launch the build: "make -j3"
The build fails with the following message:
make[1]: Entering directory
`/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime'
make[2]: Entering directory
`/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile'
llvm[2]: Compiling BasicBlockTracing.c for Debug build (PIC)
llvm[2]: Compiling BlockProfiling.c for Debug build (PIC)
llvm[2]: Compiling CommonProfiling.c for Debug build (PIC)
llvm[2]: Compiling EdgeProfiling.c for Debug build (PIC)
llvm[2]: Compiling FunctionProfiling.c for Debug build (PIC)
llvm[2]: Compiling OptimalEdgeProfiling.c for Debug build (PIC)
llvm[2]: Linking Debug Loadable Module profile_rt.dll
/usr/lib/gcc/i686-pc-cygwin/4.3.2/../../../../i686-pc-cygwin/bin/ld: warning:
cannot find entry symbol __cygwin_dll_entry at 12; defaulting to 63cc1000
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/BasicBlockTracing.o:
In function `BBTraceAtExitHandler':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/BasicBlockTracing.c:35:
undefined reference to `_free'
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/BasicBlockTracing.o:
In function `llvm_start_basic_block_tracing':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/BasicBlockTracing.c:59:
undefined reference to `_malloc'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/BasicBlockTracing.c:64:
undefined reference to `_atexit'
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/BlockProfiling.o:
In function `llvm_start_block_profiling':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/BlockProfiling.c:43:
undefined reference to `_atexit'
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/CommonProfiling.o:
In function `save_arguments':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:44:
undefined reference to `_memmove'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:47:
undefined reference to `_strcmp'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:49:
undefined reference to `_puts'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:51:
undefined reference to `_strdup'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:52:
undefined reference to `_memmove'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:56:
undefined reference to `_printf'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:39:
undefined reference to `_strncmp'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:61:
undefined reference to `_strlen'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:63:
undefined reference to `_malloc'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:65:
undefined reference to `_strlen'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:66:
undefined reference to `_memcpy'
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/CommonProfiling.o:
In function `write_profiling_data':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:91:
undefined reference to `_open'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:93:
undefined reference to `_fprintf'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:95:
undefined reference to `_perror'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:103:
undefined reference to `_write'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:104:
undefined reference to `_write'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:105:
undefined reference to `_write'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:108:
undefined reference to `_write'
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:114:
undefined reference to `_write'
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/CommonProfiling.o:/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/CommonProfiling.c:115:
more undefined references to `_write' follow
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/EdgeProfiling.o:
In function `llvm_start_edge_profiling':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/EdgeProfiling.c:43:
undefined reference to `_atexit'
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/FunctionProfiling.o:
In function `llvm_start_func_profiling':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/FunctionProfiling.c:40:
undefined reference to `_atexit'
/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile/Debug/OptimalEdgeProfiling.o:
In function `llvm_start_opt_edge_profiling':
/cygdrive/d/Documents/src/llvm-svn/runtime/libprofile/OptimalEdgeProfiling.c:43:
undefined reference to `_atexit'
collect2: ld returned 1 exit status
make[2]: ***
[/cygdrive/d/Documents/src/llvm-svn/build-cygwin/Debug/lib/profile_rt.dll]
Error 1
make[2]: Leaving directory
`/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime/libprofile'
make[1]: *** [libprofile/.makeall] Error 2
make[1]: Leaving directory
`/cygdrive/d/Documents/src/llvm-svn/build-cygwin/runtime'
make: *** [all] Error 1
Looking at the error and the link command line shows that the "-nostdlib"
option is triggering the issue. I am not sure at which level this setting must
be changed but the following patch (cygwin specific) did work for me and fixed
the issue:
svn diff Makefile.rules
Index: Makefile.rules
===================================================================
--- Makefile.rules (revision 90219)
+++ Makefile.rules (working copy)
@@ -554,7 +554,7 @@
endif
else
ifeq ($(HOST_OS),Cygwin)
- SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \
+ SharedLinkOptions=-shared -Wl,--export-all-symbols \
-Wl,--enable-auto-import -Wl,--enable-auto-image-base
else
SharedLinkOptions=-shared
I now have llvm install under cygwin and for the moment I experienced no issue.
Best Regards,
Julien
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list