Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83000 - portmap Makefile SYS variable usage breaks compile
Summary: portmap Makefile SYS variable usage breaks compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Network Filesystems
URL: http://forums.gentoo.org/viewtopic-t-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 13:27 UTC by Mihai Limbasan
Modified: 2005-02-22 14:36 UTC (History)
0 users

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


Attachments
Patch renaming $(SYS) (portmap-5b-renamesysvar.patch,532 bytes, patch)
2005-02-22 13:42 UTC, Mihai Limbasan
Details | Diff
Patch to ebuild to use portmap-5b-renamesysvar.patch (portmap-ebuild.patch,385 bytes, patch)
2005-02-22 13:42 UTC, Mihai Limbasan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Limbasan 2005-02-22 13:27:13 UTC
The net-nds/portmap Makefile contains the following snippet around line 110:

COPT    = $(CONST) -Dperror=xperror $(CHECK_PORT) \
        $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN) \
        $(LOOPBACK) $(SETPGRP)

If the user has the environment variable SYS set to anything besides whitespace, the compile bombs out. Examples:

    http://forums.gentoo.org/viewtopic-t-299090.html
    http://bugs.gentoo.org/show_bug.cgi?id=81430

I haven't seen any situation yet where it would be useful for a Gentoo Linux system to let the Makefile blindly pull this in from the environment, but I've encountered reports of this type of problem a few times already. So it would seem the default behavior should be changed to *not* pull in $(SYS) from the environment since it's a variable name likely to be used.
I think we should patch portmap's Makefile to either use a different name there, or to simply not use it at all. I'm not sure about the implications of not using SYS on a Solaris system, but since Portaris is very much under work I don't think it should be a blocker.

Reproducible: Always
Steps to Reproduce:
SYS="whatever" emerge net-nds/portmap
Actual Results:  
Compile fails with "cannot specify -o with -c or -S and multiple compilations"
Comment 1 Mihai Limbasan 2005-02-22 13:30:33 UTC
I forgot an additional argument for patching it: The resulting errors give no clue whatsoever to the typical user as to the root cause of the problem and to what one should do to fix it. Tracking it down requires an unpack step and an understanding on Makefile and compiler command line syntax. That's a no-no.
Comment 2 Mihai Limbasan 2005-02-22 13:42:10 UTC
Created attachment 51900 [details, diff]
Patch renaming $(SYS)

This patch alters the Makefile usage of the environment variable SYS to
GLOCAL_SYS.
Comment 3 Mihai Limbasan 2005-02-22 13:42:34 UTC
Created attachment 51901 [details, diff]
Patch to ebuild to use portmap-5b-renamesysvar.patch
Comment 4 SpanKY gentoo-dev 2005-02-22 14:36:03 UTC
deleted the variable all together since the makefile doesnt use it at all