X-Spam-Check-By: sourceware.org Message-ID: <448055A2.198C9D5F@dessent.net> Date: Fri, 02 Jun 2006 08:13:38 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Ed Hartnett CC: cygwin AT cygwin DOT com, libtool AT gnu DOT org Subject: Re: trying to build with MinGW under cygwin, but no luck, can't find dllcrt2.o References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Ed Hartnett wrote: First, a note: the Cygwin list generally does not like to field questions about -mno-cygwin because when doing so you are using another project's toolchain, and so it's kind of off-topic. However, I think your problem is actually build-environment related and not gcc related, so I will continue, with reply-to set to the libtool list. > I am trying to build my libtool-based library package on Cygwin, with > the -mno-cygwin option. > > However, I am getting the following problem: > > libtool: link: cc -shared .libs/attr.o .libs/ncx.o .libs/putget.o > .libs/dim.o .libs/error.o .libs/libvers.o .libs/nc.o .libs/string.o > .libs/v1hpg.o .libs/var.o .libs/posixio.o -Wl,--whole-archive > ./.libs/libnetcdf2.a ../fortran/.libs/libnetcdff.a > -Wl,--no-whole-archive -mno-cygwin -o .libs/cygnetcdf-1.dll > -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker > .libs/libnetcdf.dll.a > /usr/bin/ld: dllcrt2.o: No such file: No such file or directory > collect2: ld returned 1 exit status > make[2]: *** [libnetcdf.la] Error 1 > make[2]: Leaving directory `/cygdrive/c/netcdf-3/libsrc' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/cygdrive/c/netcdf-3' > make: *** [all] Error 2 > > I am trying to figure out what is wrong. Does anyone have an easy > answer for me? Something here looks rather broken. First, a non-cygwin DLL should never be named "cygnetcdf-1.dll" because the prefix "cyg" is specifically used for this purpose, i.e. so that they are never found by non-Cygwin apps. A mingw DLL should be named libnetcdf-1.dll. So this makes me think libtool is confused and thinks you're trying to build a native package. Second, dllcrt2.o is a mingw startup file and should be present in /usr/lib/mingw. If not then you certainly have an installation problem. Confirm that you can compile and link a hello world program with "gcc -mno-cygwin" before continuing. It would help if you would post more details, such as how you configured the package. When trying to build a mingw package under Cygwin you are in effect cross compiling, so the configury should probably look something like the following, although there are many ways to skin a cat: ./configure --host=i686-pc-mingw32 --build=i686-pc-cygwin CC="gcc -mno-cygwin" (And if you use C++ then CXX="g++ -mno-cygwin", and so on.) Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/