Closed escobera closed 2 years ago
@silviucpp this is my first time dealing with makefiles, don't know if this is enough, specially on the pure erlang side of things. Try and give it a spin before merging please. Any feedback is greatly welcome!
@escobera I tested on erlang and all it's ok. with this fix also elixir it's working ?
Oh noes! This isn't good enough :cry: Hmm, my tests are failing at CI.
/builds/prospeccao/antecedentes/deps/erlkaf
make[1]: Entering directory '/builds/prospeccao/antecedentes/deps/erlkaf/c_src'
CPP erlkaf_config.cc
CPP erlkaf_consumer.cc
CPP erlkaf_logger.cc
CPP erlkaf_message.cc
CPP erlkaf_nif.cc
CPP erlkaf_producer.cc
CPP nif_utils.cc
CPP queuecallbacksdispatcher.cc
CPP queuemanager.cc
CPP topicmanager.cc
LD erlkaf_nif.so
/usr/bin/ld: cannot open output file /builds/prospeccao/antecedentes/_build/test/lib/erlkaf/priv/erlkaf_nif.so: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [nif.mk:78: /builds/prospeccao/antecedentes/_build/test/lib/erlkaf/priv/erlkaf_nif.so] Error 1
make[1]: Leaving directory '/builds/prospeccao/antecedentes/deps/erlkaf/c_src'
make: *** [Makefile:7: compile_nif] Error 2
===> Hook for compile failed!
Locally it did work. =/
@silviucpp there's prolly more work to be done at the makefile to make it work properly, I'll poke around a little more.
I guess /builds/prospeccao/antecedentes/_build/test/lib/erlkaf/priv/erlkaf_nif.so does not exists. can you search where was generated instead ?
I guess /builds/prospeccao/antecedentes/_build/test/lib/erlkaf/priv/erlkaf_nif.so does not exists. can you search where was generated instead ?
I'm pokin around our CI here to check what's going on. Will report once I have that info.
@silviucpp .so file is not generated, maybe it is a race condition of sorts?
I wasn't creating the /priv dir in the new location, so it wasn't being able to LD the file. Now I think it is doing the right thing
Hmm basically ld
reports that cannot open the location: /usr/bin/ld: cannot open output file /builds/prospeccao/antecedentes/_build/test/lib/erlkaf/priv/
. Does this path exists ?
Tested on my application here and it is building correctly now! :partying_face:
Can you test by replacing with the attached file. I did some cleanups . in my opinion looks better. What I did was to insert a new var named PRIV_DIR
and set it based on REBAR_BARE_COMPILER_OUTPUT_DIR
.
Just to avoid setting the priv dir location into multiple places inside the make file. Please review and commit and see if it's working. on erlang works
Yeah, your version definitely looks better. It works on my test case and app. Thanks for the feedback!
fixes #42