This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin build scripts in perl


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 <SYMBOL>.o members of the
>input library cygdll.a for each object symbol <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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]