Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8168037

using ZIP as a make variable conflicts with zip's use of ZIP as an environment variable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • infrastructure
    • None
    • b147

      Info-Zip made the very poor decision to control zip's options via the ZIP environment variable. Especially poor given availability of the much better ZIPOPT variable.
      http://www.info-zip.org/mans/zip.html#ENVIRONMENT

      Make made the questionable choice of exporting make variables on the command line to subprocesses. As a result, makefiles that invoke zip must avoid using ZIP as a make variable; else mayhem ensues.

      Here is a demonstration of what can go wrong:

      $ make ZIP=/usr/bin/zip images
      Note: Command line contains non-control variables:
      * ZIP=/usr/bin/zip
      Make sure it is not mistyped, and that you intend to override this variable.
      'make help' will list known control variables.

      Note: Command line contains non-control variables:
      * ZIP=/usr/bin/zip
      Make sure it is not mistyped, and that you intend to override this variable.
      'make help' will list known control variables.

      Building target 'images' in configuration 'linux-x86_64-normal-server-release'
      Building JVM variant 'server' with features 'all-gcs cds compiler1 compiler2 dtrace fprof jni-check jvmci jvmti management nmt services vm-structs'
      zip I/O error: Permission denied
      zip error: Could not create output file (/usr/bin/zip.zip)

      ----

      Good thing I wasn't running the build as root!

            ihse Magnus Ihse Bursie
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: