Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing MakeFile is not working on windows #253

Open
rupest opened this issue Apr 14, 2023 · 5 comments
Open

Existing MakeFile is not working on windows #253

rupest opened this issue Apr 14, 2023 · 5 comments

Comments

@rupest
Copy link

rupest commented Apr 14, 2023

Hi,

i am trying to build rocksdb-cloud source code on windows using existing makefile provided with source code at below location -

https://github.com/rockset/rocksdb-cloud/Makefile

i tried below command -

make rocksdbjava

Same command is working properly in Linux and Mac platform, but on windows i am getting below error -

process_begin: CreateProcess(NULL, which bash, ...) failed.
Makefile:9: pipe: No error
process_begin: CreateProcess(NULL, which bash, ...) failed.
Makefile:10: pipe: No error
'which' is not recognized as an internal or external command,
operable program or batch file.
'which' is not recognized as an internal or external command,
operable program or batch file.
'f' is not recognized as an internal or external command,
operable program or batch file.
'f' is not recognized as an internal or external command,
operable program or batch file.
$DEBUG_LEVEL is 0
process_begin: CreateProcess(NULL, (export ROCKSDB_ROOT=D:/Test/Code/rocksdb-cloud; export CXXFLAGS=; export LDFLAGS=; export COMPILE_WITH_ASAN=; export COMPILE_WITH_TSAN=; export COMPILE_WITH_UBSAN=; export PORTABLE=; export ROCKSDB_NO_FBCODE=; export USE_CLANG=; export LIB_MODE=shared; export ROCKSDB_CXX_STANDARD=; D:/Test/Code/rocksdb-cloud/build_tools/build_detect_platform D:/Test/Code/rocksdb-cloud/make_config.mk), ...) failed.
Makefile:237: pipe: No error
'grep' is not recognized as an internal or external command,
operable program or batch file.
process_begin: CreateProcess(NULL, uname -m, ...) failed.
Makefile:495: pipe: Bad file descriptor

Can you please help to resolve above issue for windows platform

Regards-
Rupesh

@mrambacher
Copy link
Collaborator

Did you try building through cmake? I do not think RocksDB (and by extension RocksDB-Cloud) supports Make on Windows

@rupest
Copy link
Author

rupest commented Apr 17, 2023

Hi,

Yes, i have tried to build through cmake, But i am getting few issue in that.

My objective is to generate the RocksDB-Cloud dll and link it with another internal dll.
After creating rocksdb dll when i try to link rocksdb dll with another dll then i got few errors like unresolved external symbol.

After analysis i found out that dll to dll linking happens through .lib file which generates along with .dll , and .lib file does not have all the exported symbol. As per my analysis all the symbols are not exported in rocksdb.lib file that's why errors are coming.

My question is how this issue can be resolved , do i need to put "dll_export" symbol at various places to properly link, if yes then it will be very tedious task as rocksdb-cloud code is too large.

Also i would like to know that how i can generate rocksdb.jar using cmake. as i do not see any jar after dll creation whereas in make file which is available with existing code , it generates rocksdb.jar along with shared lib(.dll or .so or .dylib) as final result.

Regards-
Rupesh

@rupest
Copy link
Author

rupest commented Apr 19, 2023

Hi

Any update on this issue ?

i also tried to build static library. i am able to build static library(.lib) of rocksdb-cloud and by using that i build rockdbjni project dynamic library(.dll).
then i linked above created static and dynamic libraries with another internal dll.
After running using below command, i found out below issue -

D:\JarTestWindows>java -Djava.library.path=D:\JarTest\lib -cp internal.jar;rocksdbjni.jar org.rocksdb.DBOpenTest
Hello World!
Entering openDB of DBOpenTest class

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.rocksdb.RocksDB.version()I
        at org.rocksdb.RocksDB.version(Native Method)
        at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:80)
        at org.rocksdb.RocksDB.(RocksDB.java:39)
        at org.rocksdb.Utility.loadLibrary(Utility.java:21)
        at org.rocksdb.CloudFileSystemOptions.(CloudFileSystemOptions.java:13)
        at org.rocksdb.DBEngineTest.open(DBEngineTest.java:39)
        at org.rocksdb.DBOpenTest.openDB(DBOpenTest.java:249)
        at org.rocksdb.DBOpenTest.main(DBOpenTest.java:270)

Regards-
Rupesh

@dhruba
Copy link

dhruba commented Apr 20, 2023

We do not run rocksdb-cloud on Windows, so my experience is limited. I think your best bet is to work with @mrambacher who had created the last known port to Windows in this branch https://github.com/rockset/rocksdb-cloud/tree/Windows

@rupest
Copy link
Author

rupest commented Apr 20, 2023

hi @mrambacher ,

can you please help in this.

Regards-
Rupesh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants