[CMake] CMake 2.4.2 Cygwin shouldn't have -ldl

Brandon J. Van Every bvanevery at gmail.com
Thu Jun 1 02:48:22 EDT 2006


I built a CMake 2.4.2 for Cygwin from sources.  I used the "Unix 
linefeed" download, cmake-2.4.2.tar.gz.  I used an earlier Cygwin CMake 
package to build it.  Now I am using this Cygwin CCMake 2.4.2 to 
generate my Chicken build.  When it comes time to link a .dll, it fails 
with:

Linking C shared library libchicken.dll
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: 
cannot find
 -ldl
collect2: ld returned 1 exit status
make[2]: *** [libchicken.dll] Error 1
make[1]: *** [CMakeFiles/libchicken.dir/all] Error 2
make: *** [all] Error 2

I Googled and found a post on cygwin.org that says this is a Linuxism.  
Cygwin is not supposed to have any -ldl.  In fact, neither are some 
other Unixes, like FreeBSD for instance.  The following 2 posts clarify 
the issue:
http://www.cygwin.com/ml/cygwin/2003-07/msg00731.html
http://www.cygwin.com/ml/cygwin/2003-07/msg00732.html

Is there a way I can build CMake 2.4.2 on Cygwin to get correct 
behavior, like some kind of self-recompile, or is it a deeper bug than 
that?  In any event, I think having a correct 2.4.2 package in the 
Cygwin distro is adviseable.


Cheers,
Brandon Van Every



More information about the CMake mailing list