Coder Social home page Coder Social logo

moja-global / flint.example Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 29.0 3.99 MB

A FLINT template to help start building a project based on the FLINT framework

License: Mozilla Public License 2.0

CMake 12.98% C++ 82.85% Dockerfile 2.05% Python 2.11%

flint.example's People

Contributors

a-orn avatar allcontributors[bot] avatar aornugent avatar gmajan avatar harshcasper avatar iamrajiv avatar leitchy avatar malfrancis avatar mfellows avatar parth-gr avatar patamap avatar sjbcastro avatar tlazypanda avatar tonnix avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flint.example's Issues

OpenSSL REQUIRED error

What does the current documentation state?

Create a build folder under the Source folder

mkdir -p Source\build
cd Source\build

cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=C:\Development\Software\moja -DVCPKG_TARGET_TRIPLET=x64-windows -DENABLE_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE=c:\Development\moja-global\vcpkg\scripts\buildsystems\vcpkg.cmake ..

Where is this stated?
This is in the master branch README.md

Why do you want to improve the statement?
Some errors when building on Windows - "OpenSSL REQUIRED"

Proposed statement
Add

-DOPENSSL_ROOT_DIR=c:\Development\moja-global\vcpkg\installed\x64-windows

Additional info

Add Welcome Bot to create an inclusive environment for new contributors

Is your feature request related to a problem? Please describe.
Welcome is a simple way to welcome new users based off maintainer defined comments.

The 3 plugins it combines with are new-issue-welcome(Comment to be posted to on first time issues) , new-pr-welcome(Comment to be posted to on PRs from first time contributors in your repository) and first-pr-merge(Comment to be posted to on pull requests merged by a first time user).

Describe the solution you'd like
We can setup Welcome bot by adding the GitHub App to our organization repositories and configuring .github/config.yml according to the content of the messages we want.

This will make the new contributors feel welcomed and at ease in interacting with the community.

Additional context
Screenshots that depict the Welcome bot in action:
image

Use precompiled binaries of required C++ libraries instead of downloading source and compiling them.

Is your feature request related to a problem? Please describe.
FLINT development environment takes 60+ mins to set up depending on the CPU and may take more time on older CPUs (2-3 hrs). When we use the command vcpkg.exe install gdal:x64-windows
vcpkg downloads the source code of GDAL which is 3.8 GB and then compiles it.
This is repeated for every library which is a dependency of FLINT.
After installing the libraries the source code of the libraries is never touched again and just consumes space for no reason. After installing all libraries the vcpkg folder it's size is around 15 GB which is a waste of space.

Describe the solution you'd like
After installing the libraries I used the vcpkg export --7zip command to export the libraries in a 7z file. With these exported libraries I was able to set up the FLINT development environment in a different directory in just 15 mins flat and I was able to build and run the solution without any issues. The size of the vcpkg folder with precompiled libraries is just 1.8 GB while the vcpkg folder with regular installation is of 15 GB.

You can download the precompiled libraries exported package here: https://drive.google.com/file/d/1Jkfu6Sbe0zoUkYv8aizrO80fZILcAGil/view?usp=sharing

To install it just extract all the contents of the file to the vcpkg folder (if it asks for replacing files select Replace All) and continue with the normal installation as given here.
You don't need to run the ix. command in step 1 of the installation vcpkg.exe install boost-test:x64-windows boost-program-options:x64-windows boost-log:x64-windows turtle:x64-windows zipper:x64-windows poco:x64-windows libpq:x64-windows gdal:x64-windows sqlite3:x64-windows boost-ublas:x64-windows

Comparison with precompiled libraries on the left with the standard installation process on the right.
compare

This trick reduces bandwidth usage by 15 GB and saves installation time by 1-2 hrs by removing the overhead of vcpkg's installation of C++ FLINT dependencies.

More info about vcpkg export command vcpkg documentation
usage examples on Microsoft devblogs

Failure with environment variable in config file

I have been trying to run the basic example according to README.md. The run failed. I was only able to get it to run by replacing the environment variable syntax "%LOCAL_LIBS%" with a literal value.

To Reproduce
Steps to reproduce the behavior:
Follow the instructions in README.md in section Environment: Visual Studio 16 2019 Win64.

Expected behavior
Command line outline like Started ... onOutputStep ... Finished

Observed behavior
This example shows a command-line run, but the same happens from inside Visual Studio.

C:\Users\Felix\Dev\FLINT.example\Run_Env>set LOCAL_LIBS=C:\Users\Felix\Dev\FLINT.example\Source\build\bin\Debug

C:\Users\Felix\Dev\FLINT.example\Run_Env>echo %LOCAL_LIBS%
C:\Users\Felix\Dev\FLINT.example\Source\build\bin\Debug

C:\Users\Felix\Dev\FLINT.example\Run_Env>C:\Users\Felix\Dev\FLINT\Source\build\bin\Debug\moja.cli.exe --config config/point_example.json --config config/libs.base.win.json  --logging_config logging.debug_on.conf
<2020-07-11 16:43:39.965925> (info) - Config has files: 2
<2020-07-11 16:43:39.968917> (info) - Using Logging Configuration: logging.debug_on.conf
<2020-07-11 16:43:39.969883> (info) - Using configurations:
<2020-07-11 16:43:39.970877> (info) - config/point_example.json
<2020-07-11 16:43:39.971875> (info) - config/libs.base.win.json
<2020-07-11 16:43:39.984880> (debug) - moja::flint::configuration::JSON2ConfigurationProvider::createLibraries(434) - details (moja.flint.example.base): path - %LOCAL_LIBS%, filename -moja.flint.example.based.dll
<2020-07-11 16:43:39.985836> (debug) - moja::flint::configuration::Configuration::addLibrary(105) - details (moja.flint.example.base): path - %LOCAL_LIBS%, filename -moja.flint.example.based.dll
<2020-07-11 16:43:40.001842> (info) - Using operation manager: Simple
<2020-07-11 16:43:40.002830> (debug) - moja::flint::LibraryManager::LibraryManager(46) - LibraryManager: contructor no args
<2020-07-11 16:43:40.003788> (debug) - moja::flint::LibraryManager::LoadInternalLibrary(426) - LibraryMLoadInternalLibraryanager: entered
<2020-07-11 16:43:40.008920> (debug) - moja::flint::LibraryManager::LoadInternalLibrary(430) - LibraryMLoadInternalLibraryanager: calling AddLibrary : internal.flint
<2020-07-11 16:43:40.009808> (debug) - moja::flint::LibraryManager::AddLibrary(78) - AddLibrary: entered : internal.flint
<2020-07-11 16:43:40.011795> (debug) - moja::flint::LibraryManager::LoadInternalLibrary(440) - LibraryMLoadInternalLibraryanager: calling registrations
<2020-07-11 16:43:40.018748> (debug) - moja::flint::getFlintModuleRegistrations(109) - getFlintModuleRegistrations: entered
<2020-07-11 16:43:40.018748> (debug) - moja::flint::getFlintModuleRegistrations(168) - getFlintModuleRegistrations: exit - 20
<2020-07-11 16:43:40.019746> (debug) - moja::flint::getFlintTransformRegistrations(173) - getFlintTransformRegistrations: entered
<2020-07-11 16:43:40.023738> (debug) - moja::flint::getFlintTransformRegistrations(196) - getFlintTransformRegistrations: exit - 9
<2020-07-11 16:43:40.023738> (debug) - moja::flint::getFlintFlintDataRegistrations(201) - getFlintFlintDataRegistrations: entered
<2020-07-11 16:43:40.028725> (debug) - moja::flint::getFlintFlintDataRegistrations(221) - getFlintFlintDataRegistrations: exit - 8
<2020-07-11 16:43:40.028725> (debug) - moja::flint::getFlintFlintDataFactoryRegistrations(226) - getFlintFlintDataFactoryRegistrations: entered
<2020-07-11 16:43:40.029719> (debug) - moja::flint::getFlintFlintDataFactoryRegistrations(232) - getFlintFlintDataFactoryRegistrations: exit - 1
<2020-07-11 16:43:40.029719> (debug) - moja::flint::getProviderRegistrations(237) - getProviderRegistrations: entered
<2020-07-11 16:43:40.030717> (debug) - moja::flint::getProviderRegistrations(252) - getProviderRegistrations: exit - 2
<2020-07-11 16:43:40.030717> (debug) - moja::flint::LibraryManager::RegisterProviders(406) - RegisterProviders: entered : internal.flint : count 2
<2020-07-11 16:43:40.031714> (debug) - moja::flint::LibraryManager::RegisterProviders(410) - RegisterProviders: loop: 0
<2020-07-11 16:43:40.031714> (debug) - moja::flint::LibraryManager::RegisterProviders(415) - RegisterProviders: loop: internal.flint : RasterTiled
<2020-07-11 16:43:40.032711> (debug) - moja::flint::LibraryManager::RegisterProviders(410) - RegisterProviders: loop: 1
<2020-07-11 16:43:40.034706> (debug) - moja::flint::LibraryManager::RegisterProviders(415) - RegisterProviders: loop: internal.flint : SQLite
<2020-07-11 16:43:40.039693> (debug) - moja::flint::getProviderRegistrations(237) - getProviderRegistrations: entered
<2020-07-11 16:43:40.040690> (debug) - moja::flint::getProviderRegistrations(252) - getProviderRegistrations: exit - 2
<2020-07-11 16:43:40.040690> (debug) - moja::flint::LibraryManager::RegisterProviders(406) - RegisterProviders: entered : internal.flint : count 2
<2020-07-11 16:43:40.041687> (debug) - moja::flint::LibraryManager::RegisterProviders(410) - RegisterProviders: loop: 0
<2020-07-11 16:43:40.041687> (debug) - moja::flint::LibraryManager::RegisterProviders(415) - RegisterProviders: loop: internal.flint : RasterTiled
<2020-07-11 16:43:40.042684> (debug) - moja::flint::LibraryManager::RegisterProviders(410) - RegisterProviders: loop: 1
<2020-07-11 16:43:40.043708> (debug) - moja::flint::LibraryManager::RegisterProviders(415) - RegisterProviders: loop: internal.flint : SQLite
<2020-07-11 16:43:40.050668> (debug) - moja::flint::LocalDomainControllerBase::configure(71) - details (moja.flint.example.base): path - %LOCAL_LIBS%, filename -moja.flint.example.based.dll
<2020-07-11 16:43:40.051661> (debug) - moja::flint::LibraryManager::AddLibrary(78) - AddLibrary: entered : moja.flint.example.base
<2020-07-11 16:43:40.052682> (fatal) - main(299) - %LOCAL_LIBS%

When I change the file libs.base.win.json to set the PATH explicitly, it works.

Operating Environment:

Additional context

There was one other error I ran into along the way. The required cmake package fmt was not installed.

C:\Users\Felix\Dev\FLINT.example\Source\build>cmake -G "Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=C:\Users\Felix\moja -DVCPKG_TARGET_TRIPLET=x64-windows -DOPENSSL_ROOT_DIR=C:\Users\Felix\Dev\vcpkg\installed\x64-windows -DENABLE_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE=C:\Users\Felix\Dev\vcpkg\scripts\buildsystems\vcpkg.cmake ..
-- Building dynamic libraries
-- Building without tests
-- The compiler in use is C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe.
-- The compiler flags in use is /DWIN32 /D_WINDOWS /W3 /GR /EHsc.
-- The compiler C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.26.28801/bin/Hostx64/x64/cl.exe has C++17 support.
-- Boost version: 107200
CMake Error at C:/Users/Felix/Dev/vcpkg/scripts/buildsystems/vcpkg.cmake:288 (_find_package):
  Could not find a package configuration file provided by "fmt" with any of
  the following names:

    fmtConfig.cmake
    fmt-config.cmake

  Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
  to a directory containing one of the above files.  If "fmt" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  moja.modules.chapman_richards/CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!

To fix it I did:

vcpkg.exe install fmt:x64-windows

and set cmake's fmt_DIR.

Failure with missing file DMA_AL4.json

Describe the bug
Running the Chapman-Richards spatial example, the run fails and reports a FileNotFoundException (see below for full output).

To Reproduce
Steps to reproduce the behavior:

  • Follow instructions in README.md to run the Chapman-Richards spatial example.

Expected behavior
Something like Started ... onOutputStep ... Finished.

Observed behavior

C:\Users\Felix\Dev\FLINT.example\Run_Env>C:\Users\Felix\Dev\FLINT\Source\build\bin\Debug\moja.cli.exe --config config/forest_config.json --config config/libs.gdal.chaprich.win.json --config_provider config/forest_provider.json
<2020-07-12 12:11:54.533434> (info) - Config has files: 2
<2020-07-12 12:11:54.534431> (info) - Using Logging Configuration: internal default
<2020-07-12 12:11:54.534431> (info) - Using configurations:
<2020-07-12 12:11:54.536580> (info) - config/forest_config.json
<2020-07-12 12:11:54.537425> (info) - config/libs.gdal.chaprich.win.json
<2020-07-12 12:11:54.537425> (info) - Using provider configurations:
<2020-07-12 12:11:54.538420> (info) - config/forest_provider.json
<2020-07-12 12:11:54.616213> (info) - Using operation manager: Simple
<2020-07-12 12:11:54.752561> (fatal) - main(296) - C:\Users\Felix\Dev\FLINT\Source\moja.modules.gdal\src\rasterreadergdal.cpp(67): Throw in function class Poco::Dynamic::Struct<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > __cdecl moja::modules::gdal::MetaDataRasterReaderGDAL::readMetaData(void) const
Dynamic exception type: struct boost::wrapexcept<struct moja::datarepository::FileNotFoundException>
std::exception::what: Unknown exception
[struct moja::datarepository::tag_filename * __ptr64] = C:\Users\Felix\Dev\FLINT.example\Run_Env\data\DMA_AL4.json

Operating Environment:

Additional context
I see there is a file Run_Env\data\DMA_AL4.geojson but not sure if that is the same.

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.