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

Boost path issues #28

Open
ayushkothari27 opened this issue Aug 7, 2020 · 9 comments
Open

Boost path issues #28

ayushkothari27 opened this issue Aug 7, 2020 · 9 comments

Comments

@ayushkothari27
Copy link

Hello @falvaro

I have downloaded the boost libraries from https://dl.bintray.com/boostorg/release/1.73.0/source/ (boost_1_73_0.7z)

After that, I have set the path as "FLAGS = -O3 -Wno-unused-result -I/boost_1_73_0/boost/"

Then I try to build using make and I get a lot of errors. I have posted one error.

rnnlib4seshat/Helpers.hpp:578:54: error: cannot convert ‘std::pair<boost::iterators::zip_iterator<std::tuple<double*, double*, double*> >, boost::iterators::zip_iterator<std::tuple<double*, double*, double*> > >’ to ‘int’ in return
boost::end(r3) - (boost::size(r3) - size))));
^
Makefile:65: recipe for target 'symfeatures.o' failed
make: *** [symfeatures.o] Error 1

What seems to be the issue in this case?

Thanks.

@ayushkothari27
Copy link
Author

Using "FLAGS = -O3 -Wno-unused-result -I/boost_1_73_0/" also gave the same errors.

@Narsil
Copy link

Narsil commented Aug 7, 2020

This repo is 6 years old, boost was update quite a bit, event C++11 will make this code not compile.

You can check out my fork I updated it with more recent library compat. https://github.com/Narsil/seshat

Cheers.

@ayushkothari27
Copy link
Author

@Narsil Hey thanks. I will check out your fork and let you know. Thanks.

@ayushkothari27
Copy link
Author

Hey @Narsil
Tried your code got this error

g++ -c online.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c featureson.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c symfeatures.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c symrec.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c production.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c gparser.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c grammar.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c hypothesis.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c cellcyk.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c tablecyk.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c stroke.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
g++ -c sample.cc -O3 -Wno-unused-result -fpermissive -I/boost_1_73_0/boost/
sample.cc:31:10: fatal error: xercesc/util/PlatformUtils.hpp: No such file or directory
 #include <xercesc/util/PlatformUtils.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:32: recipe for target 'sample.o' failed
make: *** [sample.o] Error 1

@Narsil
Copy link

Narsil commented Aug 9, 2020

You're missing libxerces
If on Ubuntu. Sudo apt install libxerces-dev or something like that...

@ayushkothari27
Copy link
Author

Hey @Narsil
Thanks that worked, I was able to build.

Now when I try running on a jpg/png image it gives me an Error: input file format is not SCG_INK

Tried #10 but it gave the same error.

The following issue has also been tagged in #17 and #25

@Narsil
Copy link

Narsil commented Aug 10, 2020

Yes, well you don't feed png/jpeg images to this algorithm, but SCG_INK format.

You can have the spec with a little google: https://www.scg.uwaterloo.ca/mathbrush/publications/corpus.pdf
And you have an example right in the repo (if you read the README the command should have hinted it): https://github.com/falvaro/seshat/blob/master/SampleMathExps/exp.scgink

It's important because strokes contain more information than raw picture (a vertical line can be either an upward stroke or a downward stroke, and that can change an algorithm's decision for maths). If you have only images at hand, then you can use other algorithms to get back a stroke path, but that's another problem that is not contained is this repo's code.

@ayushkothari27
Copy link
Author

Thanks @Narsil

Appreciate your help.

@FireCubeStudios
Copy link

does this work for windows?

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