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

Failed to compile on OSX Sierra 10.12 #21

Closed
f34nk opened this issue Feb 1, 2020 · 2 comments
Closed

Failed to compile on OSX Sierra 10.12 #21

f34nk opened this issue Feb 1, 2020 · 2 comments

Comments

@f34nk
Copy link
Owner

f34nk commented Feb 1, 2020

ModestEx failes to compile on OSX Sierra 10.12 because of missing open_memstream.

[ 19%] Linking C executable modest_worker
Undefined symbols for architecture x86_64:
  "_open_memstream", referenced from:
      _eterm_vec_join in eterm_vec.c.o
      _eterm_to_string in eterm_vec.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [modest_worker] Error 1
make[1]: *** [CMakeFiles/modest_worker.dir/all] Error 2
make: *** [all] Error 2
@f34nk f34nk changed the title Failed to compile on OSX Sierra 10.12.6 Failed to compile on OSX Sierra 10.12 Feb 1, 2020
@f34nk
Copy link
Owner Author

f34nk commented Feb 1, 2020

// memstream functions are conforming to POSIX.1-2008. These functions are
// not specified in POSIX.1-2001 and are not widely available on other
// systems.
https://www.gnu.org/software/gnulib/manual/html_node/open_005fmemstream.html

@f34nk
Copy link
Owner Author

f34nk commented Feb 2, 2020

For a quick solution I added open_memstream implementation from FreeBSD to this with a flag for APPLE machines.
This is obviously not the best solution, but it works. Better would be to get rid of using this function in the first place. I developed this package on ubuntu a couple of years ago and didnt realize that OSX lacks support for that.
Also, during investigating this, I realised that travis lacks support for build tests on osx system with erlang/erlixir. I tried several approaches to test this package properly on travis/osx and eventually gave up. So, the reason why this open_memstream slipped in the first place, is probably that I was relying on travis and didnt see that travis only tests against linux distros.
So, here you go...

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

1 participant