-
Bug
-
Resolution: Unresolved
-
P4
-
11, 17, 21, 24
-
generic
-
linux
File src/java.smartcardio/share/native/libj2pcsc/pcsc.c and src/jdk.crypto.cryptoki/share/native/libj2pkcs11/j2secmod.h generate compile warning 'dprintf' macro redefined by clang17/llvm17 with fastdebug configure.
Configure command: bash configure --with-jobs=128 --prefix=/home/yansendao/git/jdk/install-fastdebug --verbose --with-debug-level=fastdebug --enable-unlimited-crypto --with-vendor-name=yansendao --with-vendor-url=https://github.com/sendaoYan --with-vendor-bug-url=mailto:yansendao.ysd@alibaba-inc.com --with-vendor-vm-bug-url=mailto:yansendao.ysd@alibaba-inc.com --with-jvm-variants=server --with-boot-jdk=/home/yansendao/software/jdk/24/jdk-repo-binary --with-gtest=/home/yansendao/git/googletest-v1.14.x --with-jtreg=/home/yansendao/software/jdk/jtreg-7.4 --with-jmh=build/jmh/jars --with-version-opt=c517ffba --with-zlib=system --enable-ccache --with-native-debug-symbols=external --with-toolchain-type=clang --with-toolchain-path=~/software/acc/x86_64/bin
The compile log show as below.
In file included from src/jdk.crypto.cryptoki/share/native/libj2pkcs11/j2secmod.c:32:
src/jdk.crypto.cryptoki/share/native/libj2pkcs11/j2secmod.h:45:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined]
45 | #define dprintf(s)
| ^
/usr/include/bits/stdio2.h:151:12: note: previous definition is here
151 | # define dprintf(fd, ...) \
| ^
1 error generated.
src/java.smartcardio/share/native/libj2pcsc/pcsc.c:48:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined]
48 | #define dprintf(s)
| ^
/usr/include/bits/stdio2.h:145:12: note: previous definition is here
145 | # define dprintf(fd, ...) \
| ^
1 error generated.
Standalone clang compile command:
clang -MMD -MF build/linux-x86_64-server-fastdebug/support/native/java.smartcardio/libj2pcsc/pcsc.d.tmp -fpch-preprocess -pipe -fvisibility=hidden -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DLINUX -DDEBUG -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wreorder -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual -g -gdwarf-4 -gdwarf-aranges -std=c11 -fno-strict-aliasing -m64 -shared-libasan -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fPIC -fsanitize=address -Wno-stringop-truncation -fno-omit-frame-pointer -fno-common -DADDRESS_SANITIZER -fsanitize-address-use-after-return=never -fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER -fsanitize=leak -fno-omit-frame-pointer -DLEAK_SANITIZER -Isrc/java.smartcardio/unix/native/libj2pcsc -Isrc/java.smartcardio/share/native/libj2pcsc -Ibuild/linux-x86_64-server-fastdebug/support/headers/java.smartcardio -Isrc/java.smartcardio/unix/native/libj2pcsc/MUSCLE -Isrc/java.base/linux/native/libjava -Isrc/java.base/unix/native/libjava -Isrc/java.base/share/native/libjava -Ibuild/linux-x86_64-server-fastdebug/support/modules_include/java.base -Isrc/java.base/unix/native/include -Isrc/java.base/share/native/include -D__sun_jdk -g -gdwarf-4 -gdwarf-aranges -Wno-unknown-warning-option -Wno-unused-parameter -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o build/linux-x86_64-server-fastdebug/support/native/java.smartcardio/libj2pcsc/pcsc.o src/java.smartcardio/share/native/libj2pcsc/pcsc.c -frandom-seed="pcsc.c"
Configure command: bash configure --with-jobs=128 --prefix=/home/yansendao/git/jdk/install-fastdebug --verbose --with-debug-level=fastdebug --enable-unlimited-crypto --with-vendor-name=yansendao --with-vendor-url=https://github.com/sendaoYan --with-vendor-bug-url=mailto:yansendao.ysd@alibaba-inc.com --with-vendor-vm-bug-url=mailto:yansendao.ysd@alibaba-inc.com --with-jvm-variants=server --with-boot-jdk=/home/yansendao/software/jdk/24/jdk-repo-binary --with-gtest=/home/yansendao/git/googletest-v1.14.x --with-jtreg=/home/yansendao/software/jdk/jtreg-7.4 --with-jmh=build/jmh/jars --with-version-opt=c517ffba --with-zlib=system --enable-ccache --with-native-debug-symbols=external --with-toolchain-type=clang --with-toolchain-path=~/software/acc/x86_64/bin
The compile log show as below.
In file included from src/jdk.crypto.cryptoki/share/native/libj2pkcs11/j2secmod.c:32:
src/jdk.crypto.cryptoki/share/native/libj2pkcs11/j2secmod.h:45:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined]
45 | #define dprintf(s)
| ^
/usr/include/bits/stdio2.h:151:12: note: previous definition is here
151 | # define dprintf(fd, ...) \
| ^
1 error generated.
src/java.smartcardio/share/native/libj2pcsc/pcsc.c:48:9: error: 'dprintf' macro redefined [-Werror,-Wmacro-redefined]
48 | #define dprintf(s)
| ^
/usr/include/bits/stdio2.h:145:12: note: previous definition is here
145 | # define dprintf(fd, ...) \
| ^
1 error generated.
Standalone clang compile command:
clang -MMD -MF build/linux-x86_64-server-fastdebug/support/native/java.smartcardio/libj2pcsc/pcsc.d.tmp -fpch-preprocess -pipe -fvisibility=hidden -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DLINUX -DDEBUG -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wreorder -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual -g -gdwarf-4 -gdwarf-aranges -std=c11 -fno-strict-aliasing -m64 -shared-libasan -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fPIC -fsanitize=address -Wno-stringop-truncation -fno-omit-frame-pointer -fno-common -DADDRESS_SANITIZER -fsanitize-address-use-after-return=never -fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER -fsanitize=leak -fno-omit-frame-pointer -DLEAK_SANITIZER -Isrc/java.smartcardio/unix/native/libj2pcsc -Isrc/java.smartcardio/share/native/libj2pcsc -Ibuild/linux-x86_64-server-fastdebug/support/headers/java.smartcardio -Isrc/java.smartcardio/unix/native/libj2pcsc/MUSCLE -Isrc/java.base/linux/native/libjava -Isrc/java.base/unix/native/libjava -Isrc/java.base/share/native/libjava -Ibuild/linux-x86_64-server-fastdebug/support/modules_include/java.base -Isrc/java.base/unix/native/include -Isrc/java.base/share/native/include -D__sun_jdk -g -gdwarf-4 -gdwarf-aranges -Wno-unknown-warning-option -Wno-unused-parameter -Werror -O2 -D_FORTIFY_SOURCE=2 -c -o build/linux-x86_64-server-fastdebug/support/native/java.smartcardio/libj2pcsc/pcsc.o src/java.smartcardio/share/native/libj2pcsc/pcsc.c -frandom-seed="pcsc.c"
- links to
-
Review(master) openjdk/jdk/22630