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

Building with system deps currently broken. #1850

Closed
darix opened this issue Jul 10, 2017 · 5 comments
Closed

Building with system deps currently broken. #1850

darix opened this issue Jul 10, 2017 · 5 comments

Comments

@darix
Copy link

darix commented Jul 10, 2017

What version of ejabberd are you using?

17.07

What operating system (version) are you using?

openSUSE

How did you install ejabberd (source, package, distribution)?

I am working on updating the opensuse package.

What did not work as expected? Are there error messages in the log? What
was the unexpected behavior? What was the expected result?

system deps mode broken:

  1. post_hook_configure is called even with skip_deps=true. Current workaround: commented out in rebar.config
  2. the "all" make target depends on the deps target. which fails in our build env and is not wanted either. shouldnt the deps target be skipped with system deps mode? Current workaround: call rebar compile skip_deps=true manually. + patching out the "all" target from the install targets prequisite list.
  3. include paths hacked in rebar.config which makes build not find hrl files in system paths because the code uses -include("fxml.hrl"). instead of the more correct -include_lib("fast_xml/include/fxml.hrl").. This btw affects also the gh:processone/xmpp package. Current workaround:
perl -p -i -e "s|deps/p1_utils/include|$(rpm -ql erlang-p1_utils-devel | grep -E '/include$' )|g" rebar.config
perl -p -i -e "s|deps/fast_xml/include|$(rpm -ql erlang-fast_xml-devel | grep -E '/include$' )|g" rebar.config
perl -p -i -e "s|deps/xmpp/include|$(rpm -ql erlang-xmpp-devel | grep -E '/include$' )|g"   rebar.config

With 16.09 i needed less work arounds to get the build working. Which brings us to the question

  1. how to properly solve the include problem. for the xmpp library i patched the one include call to use include_lib. do we want to use the same for ejabberd?
  2. if not can the rebar.config find the include paths for the 3 libraries automatically and use those local paths only with non system deps mode?
  3. can post_hook_configure be skipped easily in system deps mode? how about the make targets?
@cromain cromain added this to the ejabberd 17.x milestone Jul 31, 2017
@cromain cromain modified the milestones: ejabberd 17.x, ejabberd 17.10 Sep 28, 2017
@bowlofeggs
Copy link
Contributor

I also have this problem in trying to update the Fedora package - the build fails due to expecting fast_tls to be found in the deps folder, and it's been unbundled into /usr/lib64/erlang/lib/fast_tls-1.0.13 in Fedora.

@bowlofeggs
Copy link
Contributor

Thanks for the tips @darix! I was able to get ejabberd-17.07 building in Fedora doing pretty similar things to what you did.

https://src.fedoraproject.org/rpms/ejabberd/c/e9cdddd835473981e90316f35ac24247215d6313?branch=master

@prefiks
Copy link
Member

prefiks commented Oct 30, 2017

Hello,

I think i fixed all of those issues in commit 9b8ae80, at least i am now able to build with --enable-system-deps flag and having correct ERL_LIBS.

@prefiks prefiks closed this as completed Oct 30, 2017
@bowlofeggs
Copy link
Contributor

Thanks for the fix, it does seem to work on my Rawhide box!

@lock
Copy link

lock bot commented Jun 9, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants