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

Build error on Manjaro #31

Closed
escobera opened this issue Jul 12, 2021 · 1 comment · Fixed by #32
Closed

Build error on Manjaro #31

escobera opened this issue Jul 12, 2021 · 1 comment · Fixed by #32

Comments

@escobera
Copy link
Contributor

Hello there,

I am getting this error while building the NIF on Manjaro Linux

HEAD is now at cff1001 Fixed compile error introduced in previous commit
~/projects/antecedentes_api/deps/erlkaf/deps ~/projects/antecedentes_api/deps/erlkaf
~/projects/antecedentes_api/deps/erlkaf
make[1]: Entering directory '/home/rafa/projects/antecedentes_api/deps/erlkaf/c_src'
 CPP    erlkaf_producer.cc
 CPP    erlkaf_config.cc
 CPP    topicmanager.cc
 CPP    nif_utils.cc
 CPP    queuemanager.cc
 CPP    erlkaf_logger.cc
 CPP    erlkaf_nif.cc
 CPP    queuecallbacksdispatcher.cc
 CPP    erlkaf_consumer.cc
/home/rafa/projects/antecedentes_api/deps/erlkaf/c_src/queuecallbacksdispatcher.cc: In member function ‘void QueueCallbacksDispatcher::watch(rd_kafka_t*, bool)’:
/home/rafa/projects/antecedentes_api/deps/erlkaf/c_src/queuecallbacksdispatcher.cc:47:75: error: ‘stoull’ is not a member of ‘std’; did you mean ‘wcstoull’?
   47 |         objects_[instance] = item(is_consumer, static_cast<uint64_t>(std::stoull(buffer)/2), now_ms());
      |                                                                           ^~~~~~
      |                                                                           wcstoull
make[1]: *** [nif.mk:78: /home/rafa/projects/antecedentes_api/deps/erlkaf/c_src/queuecallbacksdispatcher.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/rafa/projects/antecedentes_api/deps/erlkaf/c_src'
make: *** [Makefile:7: compile_nif] Error 2
===> Hook for compile failed!

After some tests I got it to compile by adding

#include <string>

to https://github.com/silviucpp/erlkaf/blob/master/c_src/queuecallbacksdispatcher.cc#L6

I'm not sending a PR yet cause I don't know if this is the correct solution, maybe you could provide me some feedback @silviucpp ?

@silviucpp
Copy link
Owner

Yes, this seems ok . Please add a PR

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

Successfully merging a pull request may close this issue.

2 participants