Version
20.18.0
Platform
AIX hostname 1 7 00********00
Subsystem
No response
What steps will reproduce the bug?
- Login to AIX and download node-v20.18.0 source code, decompress and enter the folder
- Using gcc 11 to build :
CC=gcc-11 CXX=g++-11 MAKE=gmake ./configure --prefix=$HOME/local --shared --libdir=$HOME/local - Build node v20.18.0 with :
gmake && gmake install - Uninstall the binaries as
gmake uninstall
How often does it reproduce? Is there a required condition?
Must appear
What is the expected behavior? Why is that the expected behavior?
Can be uninstalled as expected
What do you see instead?
From tools/install.py, contains following source code:
26deftry_symlink(options, source_path, link_path):
27ifnotoptions.silent:
28print('symlinking %s -> %s'% (source_path, link_path))
29try_unlink(link_path)
30try_mkdir_r(os.path.dirname(link_path))
31os.symlink(source_path, link_path)
3233deftry_mkdir_r(path):
34try:
35os.makedirs(path)
36exceptOSErrorase:
37ife.errno!=errno.EEXIST: raise3839deftry_rmdir_r(options, path):
40path=abspath(path)
41whileis_child_dir(path, options.install_path):
42try:
43os.rmdir(path)
44exceptOSErrorase:
45ife.errno==errno.ENOTEMPTY: return46ife.errno==errno.ENOENT: return47raise48path=abspath(path, '..')
49As coded in line 45-46, only ENOTEMPTY and ENOENT error will be treated as normal. However, in AIX 7.1, if the target file or folder doesn't exist, the error is EEXIST.
From /usr/include/errno.h in AIX 7.1, we got following comment:
193 /*
194 * AIX returns EEXIST where 4.3BSD used ENOTEMPTY;
195 * but, the standards insist on unique errno values for each errno.
196 * A unique value is reserved for users that want to code case
197 * statements for systems that return either EEXIST or ENOTEMPTY.
198 */
As described in include/uapi/asm-generic/errno-base.h, EEXIST is 17, which is referred by python/cpython.
Additional information
No response
Version
20.18.0
Platform
Subsystem
No response
What steps will reproduce the bug?
CC=gcc-11 CXX=g++-11 MAKE=gmake ./configure --prefix=$HOME/local --shared --libdir=$HOME/localgmake && gmake installgmake uninstallHow often does it reproduce? Is there a required condition?
Must appear
What is the expected behavior? Why is that the expected behavior?
Can be uninstalled as expected
What do you see instead?
From
tools/install.py, contains following source code:As coded in line 45-46, only
ENOTEMPTYandENOENTerror will be treated as normal. However, in AIX 7.1, if the target file or folder doesn't exist, the error isEEXIST.From
/usr/include/errno.hin AIX 7.1, we got following comment:As described in include/uapi/asm-generic/errno-base.h,
EEXISTis17, which is referred by python/cpython.Additional information
No response