Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 667976 - sci-mathematics/minisat-2.2.0-r4 is not honoring rules in template.mk to exclude Main.o* when creating libminisat.a
Summary: sci-mathematics/minisat-2.2.0-r4 is not honoring rules in template.mk to excl...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-07 16:43 UTC by Jiří Moravec
Modified: 2018-10-08 18:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to template.mk (minisat-2.2.0-remove-Main.o-from-libminisat.a.patch,744 bytes, patch)
2018-10-07 16:44 UTC, Jiří Moravec
Details | Diff
Patch to minisat-2.2.0-r4.ebuild (minisat-2.2.0-r4.ebuild.patch,416 bytes, patch)
2018-10-07 16:45 UTC, Jiří Moravec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiří Moravec 2018-10-07 16:43:24 UTC
When sci-mathematics/minisat-2.2.0-r4 is compiled, static library libminisat.a is builded with Main.o part which include 'main' function, which is wrong. There is rule in 'mpl/template.mk' to remove Main.o* code from source, when libminisat.a is created, but for some reason it's ignored.

Part of mpl/template.mk responsible:

lib$(LIB)_standard.a:   $(filter-out */Main.o,  $(COBJS))
lib$(LIB)_profile.a:    $(filter-out */Main.op, $(PCOBJS))
lib$(LIB)_debug.a:      $(filter-out */Main.od, $(DCOBJS))
lib$(LIB)_release.a:    $(filter-out */Main.or, $(RCOBJS))

I'm not sure about GNU make treating wildcards, but above code is nonfunctional.

So unless someone who mastered GNU make, can change wildcards above, only solution is remove wildcards completely:

lib$(LIB)_standard.a:   $(filter-out $(MROOT)/simp/Main.o,  $(COBJS))
lib$(LIB)_profile.a:    $(filter-out $(MROOT)/simp/Main.op, $(PCOBJS))
lib$(LIB)_debug.a:      $(filter-out $(MROOT)/simp/Main.od, $(DCOBJS))
lib$(LIB)_release.a:    $(filter-out $(MROOT)/simp/Main.or, $(RCOBJS))
Comment 1 Jiří Moravec 2018-10-07 16:44:33 UTC
Created attachment 549666 [details, diff]
Patch to template.mk
Comment 2 Jiří Moravec 2018-10-07 16:45:15 UTC
Created attachment 549668 [details, diff]
Patch to minisat-2.2.0-r4.ebuild