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: [BUG ?] Failed to rebuild Cygwin

On 7/31/2013 18:47, Corinna Vinschen wrote:
> On Jul 31 12:28, Corinna Vinschen wrote:
>> On Jul 31 18:13, JonY wrote:
>>> On 7/31/2013 17:59, Corinna Vinschen wrote:
>>>> On Jul 31 12:55, Pavel Fedin wrote:
>>>>> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o: In function
>>>>> `__tmainCRTStartup':
>>>>> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/crt/crtexe.c:285:
>>>>> undefined reference to `_set_invalid_parameter_handler'
>>>>> /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libmingwex.a(lib64_libming
>>>>> wex_a-mingw_pformat.o): In function `__pformat_exponent_digits':
>>>>> /usr/src/debug/mingw64-x86_64-runtime-3.0b_svn5935-1/stdio/mingw_pformat.c:1
>>>>> 76: undefined reference to `_get_output_format'
>>>>> collect2: error: ld returned 1 exit status
>>>>> Makefile:143: recipe for target `cygwin-console-helper.exe' failed
>>>>> make[3]: *** [cygwin-console-helper.exe] Error 1
>>>>> --- cut ---
>>>>>  Likely some MinGW CRT bug ?
>>>> This also occurs on Fedora right now.
>>>> AFAICS, the culprit is that the latest Cygwin w32api package doesn't
>>>> match the files from mingw-crt for some reason.
>>>> The build uses -L/usr/lib/w32api (-L/usr/i686-pc-cygwin/lib/w32api when
>>>> cross building on Fedora), so the libs are taken from the w32api-runtime
>>>> package.  However, the compiler uses the default crt file
>>>> /usr/i686-w64-mingw32/sys-root/mingw/lib/../lib/crt2.o which is provided
>>>> by the mingw-crt package.
>>>> This is a bug in Cygwin's Makefile since you should never use the w32api
>>>> stuff for mingw executables, only for Cygwin executables, but still...
>>>> JonY, do you have an idea why the mingw-crt differs that much from the
>>>> w32api stuff that the above error occurs?
>>> Likely, because _set_invalid_parameter_handler was a stub in mingwex
>>> that loads msvcrt.dll, it was disabled as a quickfix, as it was using
>>> mingw-w64 stdlib.h directly. I did not think Cygwin win32api might need it.
>>> The build should be fixed on trunk, I will roll out a new release soon.
>> Cool, thanks!
> Erm... hang on.  On second thought, I'm not sure that this is a bug.
> The actual bug here was clearly in the Cygwin utils Makefile.
> In fact, since w32api should only be used by Cygwin executables, why
> should w32api provide libmingwex.a at all?  Linking a Cygwin executable
> against libmingwex doesn't sound like the right thing to do.  Shouldn't
> rather libmingwex.a just go from w32api?

Can you see what happens if libmingwex.a was replaced by the empty libm.a?

It is only _get_output_format require stuff from msvcrt,
_set_invalid_parameter_handler just uses some typedef declaration.

I'm starting to wonder if this require a deeper fix.

Attachment: signature.asc
Description: OpenPGP digital signature

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