Bug 918899 - windows:mingw:win32/mingw32-mozilla-nss-tools: Console Subsystem Bug
Summary: windows:mingw:win32/mingw32-mozilla-nss-tools: Console Subsystem Bug
Status: RESOLVED FIXED
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: 3rd party software (show other bugs)
Version: unspecified
Hardware: All Windows
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Fridrich Strba
QA Contact: E-mail List
URL:
Whiteboard:
Keywords: build
Depends on:
Blocks:
 
Reported: 2015-02-20 19:35 UTC by Forgotten User QgFmybrVo0
Modified: 2015-02-23 16:46 UTC (History)
5 users (show)

See Also:
Found By: Third Party Developer/Partner
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
objdump -x certutil.exe (80.07 KB, text/plain)
2015-02-20 19:35 UTC, Forgotten User QgFmybrVo0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User QgFmybrVo0 2015-02-20 19:35:48 UTC
Created attachment 624058 [details]
objdump -x certutil.exe

The mingw32/mingw64-mozilla-nss-tools seem to work properly, however something has gone wrong at the linking stage. The nss-tools executables have the "windows" (GUI, 0x2) subsystem specified in their respective PE and PE+ headers, which is wrong. This causes all standard input/output/error to be redirected to nul: (/dev/null). Since the nss-tools are command-line tools they are pretty useless if they do not print to stdout.

Please see the "Subsystem" field in the attached objdump of certutil.exe.

Instead, the headers should specify the "console" subsystem (CUI, 0x3).
To fix this, please pass the "--subsystem console" switch to ld or
"-Wl,--subsystem=console" switch to gcc.
Comment 1 Fridrich Strba 2015-02-23 07:01:42 UTC
Fixed now in the recent commit to mingw32-mozilla-nss and mingw64-mozilla-nss. When the relevant dependent packages rebuild and the repository consolidates, the executables in tools will have console subsystem.
Comment 2 Forgotten User QgFmybrVo0 2015-02-23 16:46:25 UTC
Thank you for fixing this so quickly. Btw, in the meantime I have workaround this issue with "objcopy --subsystem console" on the affected executables but it is good to have a fix now.

Reviewing your patch, you may want to set the "-mconsole" switch explicitly instead.