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

falconn/src/examples/glove/makefile seems wrong #103

Open
jinxw opened this issue Jun 4, 2018 · 4 comments
Open

falconn/src/examples/glove/makefile seems wrong #103

jinxw opened this issue Jun 4, 2018 · 4 comments

Comments

@jinxw
Copy link

jinxw commented Jun 4, 2018

when I run

./make

it will say
../../include/falconn/wrapper/../core/flat_hash_table.h:13:23: fatal error: serialize.h: No such file or directory
so I need to run
g++ -std=c++11 -Wall -O3 -march=native glove.cc -o glove -I ../../include -I ../../../external/eigen -I ../../../external/simple-serializer -pthread
and it goes will

@ilyaraz
Copy link
Member

ilyaraz commented Jun 4, 2018

Thanks for catching this!

@bobpoekert
Copy link

on current master even when adding simple-serializer to the includes path compilation fails with errors:

g++ -std=c++11 -Wall -O3 -march=native glove.cc -o glove -I ../../include -I ../../../external/eigen -I ../../../external/simple-serializer -pthread
In file included from glove.cc:29:
In file included from ../../include/falconn/lsh_nn_table.h:484:
In file included from ../../include/falconn/wrapper/cpp_wrapper_impl.h:16:
In file included from ../../include/falconn/wrapper/../core/flat_hash_table.h:13:
../../../external/simple-serializer/serialize.h:71:5: error: implicit instantiation of undefined template 'ir::Serializer<unsigned long, void>'
    Serializer<size_t>::serialize(output, entity.size());
    ^
../../../external/simple-serializer/serialize.h:49:8: note: template is declared here
struct Serializer;
       ^
../../../external/simple-serializer/serialize.h:79:5: error: implicit instantiation of undefined template 'ir::Serializer<unsigned long, void>'
    Serializer<size_t>::deserialize(input, &s);
    ^
../../../external/simple-serializer/serialize.h:49:8: note: template is declared here
struct Serializer;
       ^
../../../external/simple-serializer/serialize.h:79:25: error: use of undeclared identifier 'deserialize'
    Serializer<size_t>::deserialize(input, &s);
                        ^
../../../external/simple-serializer/serialize.h:77:15: note: must qualify identifier to find this declaration in dependent base class
  static void deserialize(FILE *input, vector<S> *entity) {
              ^
../../../external/simple-serializer/serialize.h:111:5: error: implicit instantiation of undefined template 'ir::Serializer<unsigned long, void>'
    Serializer<size_t>::serialize(output, entity.size());
    ^
../../../external/simple-serializer/serialize.h:49:8: note: template is declared here
struct Serializer;
       ^
../../../external/simple-serializer/serialize.h:119:5: error: implicit instantiation of undefined template 'ir::Serializer<unsigned long, void>'
    Serializer<size_t>::deserialize(input, &s);
    ^
../../../external/simple-serializer/serialize.h:49:8: note: template is declared here
struct Serializer;
       ^
../../../external/simple-serializer/serialize.h:119:25: error: use of undeclared identifier 'deserialize'
    Serializer<size_t>::deserialize(input, &s);
                        ^
../../../external/simple-serializer/serialize.h:117:15: note: must qualify identifier to find this declaration in dependent base class
  static void deserialize(FILE *input, vector<S> *entity) {
              ^
../../../external/simple-serializer/serialize.h:71:25: error: use of undeclared identifier 'serialize'
    Serializer<size_t>::serialize(output, entity.size());
                        ^
../../../external/simple-serializer/serialize.h:94:32: note: in instantiation of member function 'ir::Serializer<std::__1::vector<float, std::__1::allocator<float> >, void>::serialize' requested here
    Serializer<vector<float>>::serialize(output, aux);
                               ^
../../../external/simple-serializer/serialize.h:70:15: note: must qualify identifier to find this declaration in dependent base class
  static void serialize(FILE *output, const vector<S> &entity) {
              ^
../../../external/simple-serializer/serialize.h:71:43: error: reference to type 'const vector<float>' could not bind to an rvalue of type 'size_type' (aka 'unsigned long')
    Serializer<size_t>::serialize(output, entity.size());
                                          ^~~~~~~~~~~~~
../../../external/simple-serializer/serialize.h:70:56: note: passing argument to parameter 'entity' here
  static void serialize(FILE *output, const vector<S> &entity) {
                                                       ^
../../../external/simple-serializer/serialize.h:79:44: error: cannot initialize a parameter of type 'vector<float> *' with an rvalue of type 'size_t *' (aka 'unsigned long *')
    Serializer<size_t>::deserialize(input, &s);
                                           ^~
../../../external/simple-serializer/serialize.h:99:32: note: in instantiation of member function 'ir::Serializer<std::__1::vector<float, std::__1::allocator<float> >, void>::deserialize' requested here
    Serializer<vector<float>>::deserialize(input, &aux);
                               ^
../../../external/simple-serializer/serialize.h:77:51: note: passing argument to parameter 'entity' here
  static void deserialize(FILE *input, vector<S> *entity) {
                                                  ^
9 errors generated.
make: *** [all] Error 1

@Jeffery-Meng
Copy link

It seems that "unsigned long" is not recognized by "IsElementary". I can compile after adding the following lines.

template <>
struct IsElementary : std::true_type {};

@dspcad
Copy link

dspcad commented Dec 16, 2020

Copy and paste the code below to external/simple-serializer/serialize.h
template <>
struct IsElementary<. long unsigned int. > : std::true_type {};

I can compile the code.

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

5 participants