X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 8 Mar 2010 19:49:12 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Cygwin build scripts in perl Message-ID: <20100309004912.GA19988@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <616667 DOT 61173 DOT qm AT web88303 DOT mail DOT re4 DOT yahoo DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <616667.61173.qm@web88303.mail.re4.yahoo.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Mon, Mar 08, 2010 at 07:15:20AM -0800, Ilguiz Latypov wrote: > >>>In particular, mkimport ran objcopy against "ftruncate.o" in a >>>temporary directory, but I believe the expected filename argument was >>>supposed to be "t-ftruncate.o". This is only my conjecture as I do not >>>know the purpose and the intention of the implementation with these >>>scripts. > >>While it is very possible that my code could have bugs, the objcopy >>commands in the code exit on error so, if there were problems with the >>commands no one would be able to build cygwin. I don't see any objcopy >>errors when I build Cygwin on either linux or Windows. > >I suspect that an assumption in mkimport does not always hold true. It >appears that the script assumes existence of .o members of the >input library cygdll.a for each object symbol being replaced. > > if (!defined($fn = $symfile{$_sym})) { > $fn = "$sym.o"; > $text{$fn} = $_sym; > } No, your assumption is wrong. It really is an inexplicable assumption given that you have pasted an "if" statement which should make it fairly clear what is going on here. If you are really interested in understanding the code, the perl debugger can show you what's happening. >My linker created cygdll.a where all *.o members were in the form >"d00[0-9]{4}.o" As they should be. >I guess the difference is in the GNU compiler version. I am using gcc >4.3.4-3 with --version showing "4.3.4 20090804 (release) 1". (Just in >case, my binutils are 2.19.51-1 with --version showing >"2.19.51.20090704"). And... your guess is also wrong. >Let me take my original blind guess back. It probably resulted in a >wrong import library. I wonder if such mistakes like mine could be >caught by checking the contents of the generated import library. I assume that you're still trying to use an old non-cygwin version or perl. You need to stop assuming that you've found a bug when you try to use mkimport in a nonstandard fashion. Lots of people are running this script so, while it is possible, and maybe even likely, that there is a bug in it somewhere, the notion that it routinely doesn't create a proper import library is clearly false given the fact that the cygwin release and cygwin snapshots exist. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple