Giter VIP home page Giter VIP logo

Comments (14)

mwu-tow avatar mwu-tow commented on August 24, 2024

Sorry about that, obviously our README is obsolete. I'm afraid that anaconda-based setup hasn't been used by anyone for quite a while. I haven't used it (being on the Windows/MSVC setup), so it's hard to me to give specific advice here.

Basically, you can try either:

  1. Push this anaconda thing through — check where physically it placed boost on your drive, set up environment variables as required by CMake, then repeat for other libraries. Manually install ones missing from conda forge, or, if necessary, build from sources.
  2. Replicate our CI setup which latest version is here: https://github.com/luna/dataframes/blob/build-library5/.ci/dataframes-package/Dockerfile (the one on master works as well, but this uses newer libraries and we will soon deploy it)
    It is known to work, though requires some work. If you are on reasonable up-to-date distribution, you should be able to obtain a number of libraries through system package manager.
  3. Use docker image used by our CI: https://hub.docker.com/r/lunalang/dataframes-package/tags
    That gives you out-of-the-box environment that can build the dataframes library.

from dataframes.

Magalame avatar Magalame commented on August 24, 2024

So part of it was purely my fault, I had placed the lines at the end of the file, which makes no sense. Some libraries were still missing: fmt, pybind, date. fmt and pybind are available from anaconda, but I had to manually install date.
Now I'm facing another issue:

CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:28 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:28 (find_package)


CMake Warning at /usr/share/cmake-3.10/Modules/FindBoost.cmake:801 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:28 (find_package)


-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   filesystem
--   unit_test_framework
--   system
CMake Warning at CMakeLists.txt:51 (message):
  Cannot find xlnt include dir with xlnt/xlnt.hpp.  If it is present,
  consider setting CMAKE_PREFIX_PATH or CMAKE_INCLUDE_PATH.


CMake Warning at CMakeLists.txt:61 (message):
  Cannot find xlnt library.  If it is present, consider setting
  CMAKE_PREFIX_PATH or CMAKE_LIBRARY_PATH.


CMake Warning at CMakeLists.txt:128 (message):
  DataframeHelper will be built without XLSX format support, as xlnt library
  was not found!


-- Configuring done
CMake Error at CMakeLists.txt:166 (add_executable):
  Target "DataframeHelperTests" links to target "Boost::filesystem" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?


CMake Error at CMakeLists.txt:166 (add_executable):
  Target "DataframeHelperTests" links to target "Boost::unit_test_framework"
  but the target was not found.  Perhaps a find_package() call is missing for
  an IMPORTED target, or an ALIAS target is missing?


CMake Error at CMakeLists.txt:156 (add_library):
  Target "Learn" links to target "Boost::filesystem" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at CMakeLists.txt:99 (add_library):
  Target "DataframeHelper" links to target "Boost::filesystem" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at CMakeLists.txt:146 (add_library):
  Target "DataframePlotter" links to target "Boost::filesystem" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?

I'm not sure to understand what's going on since it explicitly says before that these libraries were found

from dataframes.

mwu-tow avatar mwu-tow commented on August 24, 2024

That's just my guess, but please try downloading and using the latest CMake release (after properly cleaning the previous build cache). There is a bunch of warnings that Boost version is newer than CMake, that might be a reason why Boost isn't properly recognized.
Otherwise, I have little idea why it first says it has found boost libraries but then fails to import targets.
If using latest CMake doesn't help, try running CMake with -DBoost_DEBUG=ON — that should give us more information what is going on. You might also want try fiddling with other relevant variables, as provided by their docs.

from dataframes.

Magalame avatar Magalame commented on August 24, 2024

Thanks a lot for your help. I ran into another issue:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/user/Projects/dataframes/native_libs/src/PYTHON_NUMPY_INCLUDE_DIR
   used as include directory in directory /home/user/Projects/dataframes/native_libs/src

I solved it by adding find_path(PYTHON_NUMPY_INCLUDE_DIR /home/user/anaconda3/envs/dataframes/lib/python3.6/site-packages/numpy/core/include/) to the CMake list.

But then with make, I hit:

/home/user/Projects/dataframes/native_libs/src/Python/PythonInterpreter.cpp: In member function ‘pybind11::object PythonInterpreter::toPyDateTime(Timestamp) const’:
/home/user/Projects/dataframes/native_libs/src/Python/PythonInterpreter.cpp:223:17: error: missing template arguments before ‘tod’
     time_of_day tod = make_time(timestamp - daypoint); // Yields time_of_day type
                 ^~~
/home/user/Projects/dataframes/native_libs/src/Python/PythonInterpreter.cpp:229:19: error: ‘tod’ was not declared in this scope
     auto h = (int)tod.hours().count();
                   ^~~
/home/user/Projects/dataframes/native_libs/src/Python/PythonInterpreter.cpp:229:19: note: suggested alternative: ‘_mod’
     auto h = (int)tod.hours().count();

from dataframes.

mwu-tow avatar mwu-tow commented on August 24, 2024

@Magalame
Looks like an issue with GCC-7 that we don't cover anymore with CI. GCC-8, MSVC and Clang all accept this (and this should work, I believe, thanks to CTAD). In the mid-term we will be likely dropping support for older GCC's, for now please workaround by replacing the time_of_day with auto. Or, if you like being explicit, by time_of_day<std::chrono::nanoseconds>. I'm fine with both.

from dataframes.

mwu-tow avatar mwu-tow commented on August 24, 2024

@Magalame BTW — for my future reference: what solved the finding Boost issue? Was it the CMake version?

from dataframes.

Magalame avatar Magalame commented on August 24, 2024

@mwu-tow I was using gcc 7.4, then I tried again with 8.3, and it failed the same way, the auto fix worked well! But I still hit an error at the very last stage:

/home/user/Projects/dataframes/native_libs/linux/libDataframeHelper.so: undefined reference to `arrow::Schema::ToString[abi:cxx11]() const'
/home/user/Projects/dataframes/native_libs/linux/libDataframeHelper.so: undefined reference to `arrow::Field::ToString[abi:cxx11]() const'
/home/user/Projects/dataframes/native_libs/linux/libDataframeHelper.so: undefined reference to `arrow::ipc::feather::TableWriter::Append(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, arrow::Array const&)'
/home/user/Projects/dataframes/native_libs/linux/libDataframeHelper.so: undefined reference to `arrow::io::FileOutputStream::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::io::FileOutputStream>*)'
/home/user/Projects/dataframes/native_libs/linux/libDataframeHelper.so: undefined reference to `arrow::io::ReadableFile::Open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<arrow::io::ReadableFile>*)'
/home/user/Projects/dataframes/native_libs/linux/libDataframeHelper.so: undefined reference to `arrow::Schema::GetFieldIndex(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/home/user/Projects/dataframes/native_libs/linux/libDataframeHelper.so: undefined reference to `arrow::Schema::GetFieldByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'

Also, it does seem like it was the cmake version. I re-installed it from the latest sources, and it went through with no trouble

from dataframes.

mwu-tow avatar mwu-tow commented on August 24, 2024

I was using gcc 7.4, then I tried again with 8.3, and it failed the same way, the auto fix worked well!

Huh… so rather not a cimpiler issue. What is the version of date library you use?

But I still hit an error at the very last stage:

All missing symbols have that [abi:cxx11] so it seems that your build of Apache Arrow doesn't support C++11 ABI of libstdc++. I have never really dealt with this, having always built Arrow on my own. It might be specific to the Anaconda-distributed binaries.

You can try forcing dataframes to use old ABI by adding the following line to CMakeList.txt:
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
Or compile the Apache Arrow on your own, so it will have the same compiler defaults as Dataframes.
(btw — Arrow doesn't need to be 0.10, 0.13 works as well)

from dataframes.

Magalame avatar Magalame commented on August 24, 2024

I'm using the latest version of date, I pulled master from github, and built it from there, there might be some breaking changes?

I'll try with the add_definitions workaround, so that you can have some feedback, but I'll eventually go with building Arrow myself I think, it seems like a more viable solution

from dataframes.

mwu-tow avatar mwu-tow commented on August 24, 2024

I'm using the latest version of date, I pulled master from github, and built it from there, there might be some breaking changes?

Yep, that's it. The time_of_day definition has changed, it is no longer a class, so class template argument deduction stopped working.
Would you be willing to send us PR with the auto fix?

from dataframes.

Magalame avatar Magalame commented on August 24, 2024

So, somehow in the meantime, something with linking numpy broke, so now what I do is:
add "/home/user/anaconda3/envs/dataframes/lib/python3.6/site-packages/numpy/core/include/" to CMAKE_INCLUDE_PATH, then find_path(PYTHON_NUMPY_INCLUDE_DIR numpy)

from dataframes.

Magalame avatar Magalame commented on August 24, 2024

now everything works!

from dataframes.

Magalame avatar Magalame commented on August 24, 2024

Actually I'm not sure how to actually use the library in Luna Studio now? I mean I probably need to point to the dataframes folder for it to find it

from dataframes.

mwu-tow avatar mwu-tow commented on August 24, 2024

The Luna Studio already ships the dataframes library. There are basically 2 options:

  1. overwrite dataframes in Luna Studio — but this is unpleasant, as it requires repacking the installed AppImage file.
  2. you should be able to open the Dataframes library (i.e. the built working copy of this repository) as a project in Luna Studio, and it will run https://github.com/luna/dataframes/blob/master/src/Main.luna . Replace the main with your test code, so you can create and show/save your new chart type.

I recommend the latter. (though it has some pitfalls, like old dataframes code still visible — but the opened project has higher priority and will overshadow it)
Also, I find it convenient to use command-line Luna interpreter. It cannot show visualizations but for for
"create-chart-write png" flow should be sufficent — and its generally faster to re-run shell Luna interpreter than restarting Luna Studio after changing the code.

from dataframes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.