Bug 951472

Summary: Use of wrong LDFLAGS
Product: [Fedora] Fedora Reporter: Nicola Fontana <ntd>
Component: mingw-libxml2Assignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: drizt72, erik-fedora, fedora-mingw, ktietz, lfarkas, rjones, veillard
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-20 19:37:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Corrected LDFLAGS none

Description Nicola Fontana 2013-04-12 09:48:07 UTC
Created attachment 734637 [details]
Corrected LDFLAGS

The LDFLAGS are set wrongly: technical details in the patch.

I don't know how it happens to work for you... maybe LDFLAGS is overwritten somewhere else. On my system (not Fedora based though) the building fails at configure time while checking if C compiler works:

gcc: error: unrecognized command line option '-no-undefined'

Comment 1 Erik van Pienbroek 2013-04-12 09:52:23 UTC
Perhaps the LDFLAGS override can be dropped completely these days with the latest libxml2, but this needs to be tested first

Comment 2 Nicola Fontana 2013-04-12 10:34:43 UTC
Yes, right now I am trying to clean up that package because at a first sight it seems somewhat suboptimal. I'll open a new bug in case.

The big question still stands: how it is possible your build did not fail? The gcc toolchain I'm using although not equal should be quite similar to yours but I'm unable to build the package with the above flags.

Comment 3 Richard W.M. Jones 2013-04-12 10:42:18 UTC
I don't know, but you can look at the build logs from
the most recent build here:

http://kojipkgs.fedoraproject.org//packages/mingw-libxml2/2.9.0/2.fc19/data/logs/noarch/

Other builds:

http://koji.fedoraproject.org/koji/packageinfo?packageID=13444

Comment 4 Nicola Fontana 2013-04-12 11:07:26 UTC
That shed some light on the problem. There are a bunch of variables overriden just before calling configure (most notably CC, CFLAGS, CPPFLAGS, CXX, CXXFLAGS and LDFLAGS). Here is the relevant reference to LDFLAGS in mingw32:

http://pkgs.fedoraproject.org/cgit/mingw-filesystem.git/tree/macros.mingw32?id=4c049af9fb77a2b34c15f0c19b954c3f7e90802e#n79

This means every setting of the above vars in the spec file is just ignored.

MINGW32_LDFLAGS and MINGW64_LDFLAGS can be used instead, but given this package has been always built with LDFLAGS unset I think the best approach it is to just drop it, as suggested.

Comment 5 Fedora Update System 2013-04-16 11:41:25 UTC
mingw-w64-tools-2.0.999-0.7.trunk.20130403.fc19,mingw-qt-4.8.4-3.fc19,mingw-libxml2-2.9.0-3.fc19,mingw-headers-2.0.999-0.19.trunk.20130403.fc19,mingw-glib2-2.36.1-1.fc19,mingw-gtk2-2.24.17-1.fc19,mingw-gcc-4.8.0-3.fc19,mingw-crt-2.0.999-0.19.trunk.20130403.fc19,mingw-binutils-2.23.52.0.1-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mingw-w64-tools-2.0.999-0.7.trunk.20130403.fc19,mingw-qt-4.8.4-3.fc19,mingw-libxml2-2.9.0-3.fc19,mingw-headers-2.0.999-0.19.trunk.20130403.fc19,mingw-glib2-2.36.1-1.fc19,mingw-gtk2-2.24.17-1.fc19,mingw-gcc-4.8.0-3.fc19,mingw-crt-2.0.999-0.19.trunk.20130403.fc19,mingw-binutils-2.23.52.0.1-1.fc19

Comment 6 Fedora Update System 2013-04-16 16:10:06 UTC
Package mingw-w64-tools-2.0.999-0.7.trunk.20130403.fc19, mingw-qt-4.8.4-3.fc19, mingw-libxml2-2.9.0-3.fc19, mingw-headers-2.0.999-0.19.trunk.20130403.fc19, mingw-glib2-2.36.1-1.fc19, mingw-gtk2-2.24.17-1.fc19, mingw-gcc-4.8.0-3.fc19, mingw-crt-2.0.999-0.19.trunk.20130403.fc19, mingw-binutils-2.23.52.0.1-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mingw-w64-tools-2.0.999-0.7.trunk.20130403.fc19 mingw-qt-4.8.4-3.fc19 mingw-libxml2-2.9.0-3.fc19 mingw-headers-2.0.999-0.19.trunk.20130403.fc19 mingw-glib2-2.36.1-1.fc19 mingw-gtk2-2.24.17-1.fc19 mingw-gcc-4.8.0-3.fc19 mingw-crt-2.0.999-0.19.trunk.20130403.fc19 mingw-binutils-2.23.52.0.1-1.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-5786/mingw-w64-tools-2.0.999-0.7.trunk.20130403.fc19,mingw-qt-4.8.4-3.fc19,mingw-libxml2-2.9.0-3.fc19,mingw-headers-2.0.999-0.19.trunk.20130403.fc19,mingw-glib2-2.36.1-1.fc19,mingw-gtk2-2.24.17-1.fc19,mingw-gcc-4.8.0-3.fc19,mingw-crt-2.0.999-0.19.trunk.20130403.fc19,mingw-binutils-2.23.52.0.1-1.fc19
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-04-20 19:37:40 UTC
mingw-w64-tools-2.0.999-0.7.trunk.20130403.fc19, mingw-qt-4.8.4-3.fc19, mingw-libxml2-2.9.0-3.fc19, mingw-headers-2.0.999-0.19.trunk.20130403.fc19, mingw-glib2-2.36.1-1.fc19, mingw-gtk2-2.24.17-1.fc19, mingw-gcc-4.8.0-3.fc19, mingw-crt-2.0.999-0.19.trunk.20130403.fc19, mingw-binutils-2.23.52.0.1-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.