-
Notifications
You must be signed in to change notification settings - Fork 9
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
Linux support #2
Comments
Hi @tafia, greetings |
Thanks for answering! |
Great, the compiler options that are used by -O3 -fopenmp -Wall -pipe -Wno-unused -pedantic -mtune=generic -DNDEBUG The library uses |
I'm still struggling building it on linux. Do you have per chance the whole commands used with gcc? |
Hi @tafia, thanks for spending time on that! The g++ -std=gnu++11 -I/home/travis/R-bin/lib/R/include -DNDEBUG -fopenmp -I. -Ifstcore
-Ifstcore_v1 -Ifstcore/LZ4 -Ifstcore/ZSTD -Ifstcore/ZSTD/common -Ifstcore/ZSTD/decompress
-Ifstcore/ZSTD/compress -I"/home/travis/R/Library/Rcpp/include" -I/home/travis/R-bin/include
-fpic -g -O2 -O0 --coverage -c fstcore/compression/compression.cpp
-o fstcore/compression/compression.o You don't need the I apologize for not being able to spend more time on creating a decent build setup for Linux at the moment (I'm finalizing the release of the But I will get back to doing that as soon as possible! |
Here is a working script to create libfst.so in Linux. It is generated and modified based on the output of command 'Rscript -e "devtools::document();' executed in fstpackage/fst. BTW, suggest we re-organize file structure of fstpackage/fstlib to have something similar to fstpackage/fst, e.g. rename lib to core and move files in programs/fstcpp to the parent directory of core. |
Hi @damondd , thanks for supplying the script! Yes, the current structure is not very obvious. The code in the programs/fstcpp directory is a simple But you're right, that could be more clearly structured and the tests should be able to run without a dependency on the programs directory. A better approach might be to structure the repository in a way comparable to the Thanks for sharing your ideas! |
@MarcusKlik, I have created a branch at https://github.com/damondd/fstlib/tree/cmake, which shows how I build fstlib on local Linux environment, just FYI:
And here are the primary changes in the initial commit: |
Hi @damondd, thanks a lot, that's great! I will study your setup with much interest when I can. Currently I am travelling and don't really have the means to do so, but I will get back to you in a few weeks (hope you don't mind). Thanks for sharing your code! |
Thanks both of you! It is definitely not as straightforward as I imagined, I'll have a try asap. |
The cmake branch worked fine (I mean, I haven't tested the lib yet but it seems that the whole compilation went fine). THANK YOU! On the other hand, the script didn't work on @MarcusKlik master branch. I am on ubuntu 18.04. I have run the script from the root directory. $ sh build.sh
In file included from programs/fstcpp/fsttable.cpp:6:0:
programs/fstcpp/fsttable.h: In member function ‘virtual void BlockWriter::SetBuffersFromVec(long long unsigned int, long long unsigned int)’:
programs/fstcpp/fsttable.h:514:3: error: ‘memset’ was not declared in this scope
memset(naInts, 0, nrOfNAInts * 4); // clear NA bit metadata block (neccessary?)
^~~~~~
programs/fstcpp/fsttable.h:514:3: note: suggested alternative: ‘wmemset’
memset(naInts, 0, nrOfNAInts * 4); // clear NA bit metadata block (neccessary?)
^~~~~~
wmemset
programs/fstcpp/fsttable.h:565:4: error: ‘strncpy’ was not declared in this scope
strncpy(activeBuf + lastPos, str, pos - lastPos);
^~~~~~~
programs/fstcpp/fsttable.h:565:4: note: suggested alternative: ‘wcpncpy’
strncpy(activeBuf + lastPos, str, pos - lastPos);
^~~~~~~
wcpncpy
programs/fstcpp/fsttable.h: In member function ‘FstTable* FstTable::SubSet(std::vector<std::__cxx11::basic_string<char> >&, long long unsigned int, long long unsigned int) const’:
programs/fstcpp/fsttable.h:618:19: error: ‘find’ is not a member of ‘std’
auto it = std::find(colNames->begin(), colNames->end(), *colIt);
^~~~
programs/fstcpp/fsttable.h:618:19: note: suggested alternative: ‘end’
auto it = std::find(colNames->begin(), colNames->end(), *colIt);
^~~~
end
g++: error: ./fst_table.o: No such file or directory |
@tafia please pull the branch again, I've uploaded FstRowReader and FstColReader, as well as the sample c++ usage code in readme. |
Is linux supported out of the box?
If yes, what is the recommended way to compile on linux?
The text was updated successfully, but these errors were encountered: