[ https://issues.apache.org/jira/browse/HDFS-17636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17888728#comment-17888728 ]
ASF GitHub Bot commented on HDFS-17636: --------------------------------------- GauthamBanasandra commented on PR #7096: URL: https://github.com/apache/hadoop/pull/7096#issuecomment-2407875663 > Started Windows CI on this PR - https://ci-hadoop.apache.org/view/Hadoop/job/hadoop-qbt-trunk-java8-win10-x86_64/654/ @kevincai the Windows CI failed to build the HDFS native client due to the following error - ``` [exec] Link: [exec] C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\hadoop\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\RelWithDebInfo\get_jni_test.exe" /INCREMENTAL:NO /NOLOGO ..\..\..\..\lib\RelWithDebInfo\gmock_main.lib ..\..\..\..\bin\RelWithDebInfo\hdfs.lib "C:\Java\zulu8.62.0.19-ca-jdk8.0.332-win_x64\lib\jvm.lib" kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/target/native/main/native/libhdfspp/tests/RelWithDebInfo/get_jni_test.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/target/native/main/native/libhdfspp/tests/RelWithDebInfo/get_jni_test.lib" /MACHINE:X64 /machine:x64 get_jni_test.dir\RelWithDebInfo\libhdfs_getjni_test.obj [exec] jvm.lib(jvm.dll) : error LNK2005: JNI_CreateJavaVM already defined in libhdfs_getjni_test.obj [C:\hadoop\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\get_jni_test.vcxproj] [exec] Creating library C:/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/target/native/main/native/libhdfspp/tests/RelWithDebInfo/get_jni_test.lib and object C:/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/target/native/main/native/libhdfspp/tests/RelWithDebInfo/get_jni_test.exp [exec] C:\hadoop\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\RelWithDebInfo\get_jni_test.exe : fatal error LNK1169: one or more multiply defined symbols found [C:\hadoop\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\get_jni_test.vcxproj] ``` The error seems valid. You've defined `JNI_CreateJavaVM` in [libhdfs_getjni_test.cc](https://github.com/apache/hadoop/pull/6969/files#diff-589ac64cc250ab38f319997b6247594d71d19bdb4b73ddea59730cfab39611be). This method is already present in the `jvm.dll`. Were you trying to override the definition for `JNI_CreateJavaVM`? If so, you shouldn't be linking `jvm.dll` to `get_jni_test` in `CMakeLists.txt`. > Don't add declspec for Windows > ------------------------------ > > Key: HDFS-17636 > URL: https://issues.apache.org/jira/browse/HDFS-17636 > Project: Hadoop HDFS > Issue Type: Bug > Components: libhdfs > Affects Versions: 3.5.0 > Environment: Windows 10/11 > Reporter: Gautham Banasandra > Assignee: Gautham Banasandra > Priority: Blocker > > * Windows doesn't want the > macro _JNI_IMPORT_OR_EXPORT_ > to be defined in the function > definition. It fails to compile with > the following error - > "definition of dllimport function > not allowed". > * However, Linux needs it. Hence, > we're going to add this macro > based on the OS. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org