Details
-
Bug
-
Resolution: Fixed
-
P3
-
16
-
b28
-
b07
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8297618 | 11.0.18 | Dukebot | P3 | Resolved | Fixed | b05 |
Description
$ bash configure --prefix=/home/hedongbo/jdk-release
$ make install
...
Creating CDS archive for jdk image
Creating CDS-NOCOOPS archive for jdk image
Installing jdk image into /jvm/openjdk-17-internal
and creating 60 links from /bin into the jdk.
/bin/mkdir: cannot create directory '/jvm': Permission denied
make[3]: *** [install] Error 1
Install.gmk:36: recipe for target 'install' failed
make/Main.gmk:786: recipe for target 'install' failed
make[2]: *** [install] Error 2
ERROR: Build failed for target 'install' in configuration 'linux-x86_64-server-release' (exit code 2)
Stopping sjavac server
=== Make failed targets repeated here ===
Install.gmk:36: recipe for target 'install' failed
make/Main.gmk:786: recipe for target 'install' failed
=== End of repeated output ===
Hint: Try searching the build log for the name of the first failed target.
Hint: See doc/building.html#troubleshooting for assistance.
/home/hedongbo/myprojects/github/jdk.bak/make/Init.gmk:310: recipe for target 'main' failed
make[1]: *** [main] Error 2
/home/hedongbo/myprojects/github/jdk.bak/make/Init.gmk:186: recipe for target 'install' failed
make: *** [install] Error 2
The reason is that the prefix variable used in `make/autoconf/util_paths.m4` conflicts with the prefix used in `make/autoconf/spec.gmk.in:780`.
Proposed fix:
diff --git a/make/autoconf/util_paths.m4 b/make/autoconf/util_paths.m4
index 497332f4509..a8de51d3f38 100644
--- a/make/autoconf/util_paths.m4
+++ b/make/autoconf/util_paths.m4
@@ -176,10 +176,10 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
# space.
[ if [[ "$OPENJDK_BUILD_OS" = "windows" && input =~ ^$FIXPATH ]]; then
line="${input#$FIXPATH }"
- prefix="$FIXPATH "
+ fixpath_prefix="$FIXPATH "
else
line="$input"
- prefix=""
+ fixpath_prefix=""
fi ]
path="${line%% *}"
arguments="${line#"$path"}"
@@ -247,11 +247,11 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
# Now we have a usable command as new_path, with arguments in arguments
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- if test "x$prefix" = x; then
- # Only mess around if prefix was not given
+ if test "x$fixpath_prefix" = x; then
+ # Only mess around if fixpath_prefix was not given
UTIL_CHECK_WINENV_EXEC_TYPE("$new_path")
if test "x$RESULT" = xwindows; then
- prefix="$FIXPATH "
+ fixpath_prefix="$FIXPATH "
# make sure we have an .exe suffix (but not two)
new_path="${new_path%.exe}.exe"
else
@@ -262,11 +262,11 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
fi
if test "x$3" = xNOFIXPATH; then
- prefix=""
+ fixpath_prefix=""
fi
# Now join together the path and the arguments once again
- new_complete="$prefix$new_path$arguments"
+ new_complete="$fixpath_prefix$new_path$arguments"
$1="$new_complete"
fi
])
Testing: Worked correctly after patch.
$ make install
...
Creating CDS archive for jdk image
Creating CDS-NOCOOPS archive for jdk image
Installing jdk image into /jvm/openjdk-17-internal
and creating 60 links from /bin into the jdk.
/bin/mkdir: cannot create directory '/jvm': Permission denied
make[3]: *** [install] Error 1
Install.gmk:36: recipe for target 'install' failed
make/Main.gmk:786: recipe for target 'install' failed
make[2]: *** [install] Error 2
ERROR: Build failed for target 'install' in configuration 'linux-x86_64-server-release' (exit code 2)
Stopping sjavac server
=== Make failed targets repeated here ===
Install.gmk:36: recipe for target 'install' failed
make/Main.gmk:786: recipe for target 'install' failed
=== End of repeated output ===
Hint: Try searching the build log for the name of the first failed target.
Hint: See doc/building.html#troubleshooting for assistance.
/home/hedongbo/myprojects/github/jdk.bak/make/Init.gmk:310: recipe for target 'main' failed
make[1]: *** [main] Error 2
/home/hedongbo/myprojects/github/jdk.bak/make/Init.gmk:186: recipe for target 'install' failed
make: *** [install] Error 2
The reason is that the prefix variable used in `make/autoconf/util_paths.m4` conflicts with the prefix used in `make/autoconf/spec.gmk.in:780`.
Proposed fix:
diff --git a/make/autoconf/util_paths.m4 b/make/autoconf/util_paths.m4
index 497332f4509..a8de51d3f38 100644
--- a/make/autoconf/util_paths.m4
+++ b/make/autoconf/util_paths.m4
@@ -176,10 +176,10 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
# space.
[ if [[ "$OPENJDK_BUILD_OS" = "windows" && input =~ ^$FIXPATH ]]; then
line="${input#$FIXPATH }"
- prefix="$FIXPATH "
+ fixpath_prefix="$FIXPATH "
else
line="$input"
- prefix=""
+ fixpath_prefix=""
fi ]
path="${line%% *}"
arguments="${line#"$path"}"
@@ -247,11 +247,11 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
# Now we have a usable command as new_path, with arguments in arguments
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- if test "x$prefix" = x; then
- # Only mess around if prefix was not given
+ if test "x$fixpath_prefix" = x; then
+ # Only mess around if fixpath_prefix was not given
UTIL_CHECK_WINENV_EXEC_TYPE("$new_path")
if test "x$RESULT" = xwindows; then
- prefix="$FIXPATH "
+ fixpath_prefix="$FIXPATH "
# make sure we have an .exe suffix (but not two)
new_path="${new_path%.exe}.exe"
else
@@ -262,11 +262,11 @@ AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
fi
if test "x$3" = xNOFIXPATH; then
- prefix=""
+ fixpath_prefix=""
fi
# Now join together the path and the arguments once again
- new_complete="$prefix$new_path$arguments"
+ new_complete="$fixpath_prefix$new_path$arguments"
$1="$new_complete"
fi
])
Testing: Worked correctly after patch.
Attachments
Issue Links
- backported by
-
JDK-8297618 bash configure --prefix does not work after JDK-8257679
-
- Resolved
-
- relates to
-
JDK-8257679 Improved unix compatibility layer in Windows build (winenv)
-
- Resolved
-
- links to
-
Commit openjdk/jdk11u-dev/40f4fc2d
-
Commit openjdk/jdk/764111ff
-
Review openjdk/jdk11u-dev/1278
-
Review openjdk/jdk/2189
(1 links to)