You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "GauthamBanasandra (via GitHub)" <gi...@apache.org> on 2024/10/11 17:48:51 UTC
Re: [PR] HDFS-17636. Don't add declspec for Windows [hadoop]
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`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org