<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>83000</bug_id>
          
          <creation_ts>2005-02-22 13:27 0000</creation_ts>
          <short_desc>portmap Makefile SYS variable usage breaks compile</short_desc>
          <delta_ts>2005-02-22 14:36:03 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://forums.gentoo.org/viewtopic-t-299090.html</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mihailim@gmail.com</reporter>
          <assigned_to>net-fs@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>mihailim@gmail.com</who>
            <bug_when>2005-02-22 13:27:13 0000</bug_when>
            <thetext>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&apos;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&apos;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&apos;s a variable name likely to be used.
I think we should patch portmap&apos;s Makefile to either use a different name there, or to simply not use it at all. I&apos;m not sure about the implications of not using SYS on a Solaris system, but since Portaris is very much under work I don&apos;t think it should be a blocker.

Reproducible: Always
Steps to Reproduce:
SYS=&quot;whatever&quot; emerge net-nds/portmap
Actual Results:  
Compile fails with &quot;cannot specify -o with -c or -S and multiple compilations&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mihailim@gmail.com</who>
            <bug_when>2005-02-22 13:30:33 0000</bug_when>
            <thetext>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&apos;s a no-no.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mihailim@gmail.com</who>
            <bug_when>2005-02-22 13:42:10 0000</bug_when>
            <thetext>Created an attachment (id=51900)
Patch renaming $(SYS)

This patch alters the Makefile usage of the environment variable SYS to
GLOCAL_SYS.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mihailim@gmail.com</who>
            <bug_when>2005-02-22 13:42:34 0000</bug_when>
            <thetext>Created an attachment (id=51901)
Patch to ebuild to use portmap-5b-renamesysvar.patch
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2005-02-22 14:36:03 0000</bug_when>
            <thetext>deleted the variable all together since the makefile doesnt use it at all</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>51900</attachid>
            <date>2005-02-22 13:42 0000</date>
            <desc>Patch renaming $(SYS)</desc>
            <filename>portmap-5b-renamesysvar.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtTmF1ciBwb3J0bWFwXzViZXRhL01ha2VmaWxlIHBvcnRtYXBfNWJldGFfbm9zeXMvTWFr
ZWZpbGUKLS0tIHBvcnRtYXBfNWJldGEvTWFrZWZpbGUJMjAwNS0wMi0yMiAyMzoxNzozMS41MTAx
ODQ4OTYgKzAyMDAKKysrIHBvcnRtYXBfNWJldGFfbm9zeXMvTWFrZWZpbGUJMjAwNS0wMi0yMiAy
MzozNTowNy44NDc1OTcyMDAgKzAyMDAKQEAgLTEwOSw3ICsxMDksNyBAQAogU0hFTEwJPSAvYmlu
L3NoCiAKIENPUFQJPSAkKENPTlNUKSAtRHBlcnJvcj14cGVycm9yICQoQ0hFQ0tfUE9SVCkgXAot
CSQoU1lTKSAtREZBQ0lMSVRZPSQoRkFDSUxJVFkpICQoVUxPTkcpICQoWk9NQklFUykgJChTQV9M
RU4pIFwKKwkkKEdMT0NBTF9TWVMpIC1ERkFDSUxJVFk9JChGQUNJTElUWSkgJChVTE9ORykgJCha
T01CSUVTKSAkKFNBX0xFTikgXAogCSQoTE9PUEJBQ0spICQoU0VUUEdSUCkKIENGTEFHUwk9ICQo
Q09QVCkgJChPKSAkKE5TQVJDSFMpCiBPQkpFQ1RTCT0gcG9ydG1hcC5vIHBtYXBfY2hlY2subyBm
cm9tX2xvY2FsLm8gJChBVVgpCg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>51901</attachid>
            <date>2005-02-22 13:42 0000</date>
            <desc>Patch to ebuild to use portmap-5b-renamesysvar.patch</desc>
            <filename>portmap-ebuild.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3IvcG9ydGFnZS9uZXQtbmRzL3BvcnRtYXAvcG9ydG1hcC01Yi1yOS5lYnVpbGQJMjAw
NS0wMi0wNyAyMjoxMToxMS4wMDAwMDAwMDAgKzAyMDAKKysrIC91c3IvbG9jYWwvcG9ydGFnZS9u
ZXQtbmRzL3BvcnRtYXAvcG9ydG1hcC01Yi1yOS5lYnVpbGQJMjAwNS0wMi0yMiAyMzozODo0OC42
ODkwMjQyMDAgKzAyMDAKQEAgLTQ2LDYgKzQ2LDEwIEBACiAKIAkjIE1ha2UgdGNwIHdyYXBwZXIg
Y2hlY2tzIGVhc2llcgogCWVwYXRjaCAke0ZJTEVTRElSfS8ke1B9LW9wdGlvbmFsLXRjcGQucGF0
Y2gKKworCSMgU1lTIHZhcmlhYmxlIHJlbmFtaW5nCisJZXBhdGNoICR7RklMRVNESVJ9LyR7UH0t
cmVuYW1lc3lzdmFyLnBhdGNoCisKIH0KIAogc3JjX2NvbXBpbGUoKSB7Cg==
</data>        

          </attachment>
    </bug>

</bugzilla>