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 17.11 while 17.09 is installed fails #2194

Closed
gdt opened this issue Dec 29, 2017 · 2 comments
Closed

building 17.11 while 17.09 is installed fails #2194

gdt opened this issue Dec 29, 2017 · 2 comments

Comments

@gdt
Copy link

gdt commented Dec 29, 2017

I am building ejabberd 17.11 on NetBSD 7 amd64
I am building it from pkgsrc, as part of preparing pkgsrc for our imminent quarterly branch. (Surely this cannot be fixed in time and that's fine; our bulk build process avoids this problem by not having old versions installed when building.)

pkgsrc installs the various erlang modules as packages, and then uses them when building ejabberd.

With ejabberd 17.09 installed (because that is the previous version in pkgsrc), I get build failures. I can see that the .beam files installed as part of 17.09 are getting read, and that seems like a bug.
If I uninstall the old version, ejabberd builds fine. So it seems fairly clear that somehow the directory with the .beam files is in a search path somehow. It also seems like it shouldn't be, or at least that files in the current build should be found first.

$ ls -lutTr /usr/pkg/lib/erlang/lib/ejabberd-17.09/ebin/
-rw-r--r--  1 root  wheel   43448 Dec 29 11:06:02 2017 ejabberd_config.beam
-rw-r--r--  1 root  wheel   12376 Dec 29 11:06:02 2017 ejabberd_sql_pt.beam
-rw-r--r--  1 root  wheel   21228 Dec 29 11:06:02 2017 gen_mod.beam
-rw-r--r--  1 root  wheel    1484 Dec 29 11:06:02 2017 gen_pubsub_node.beam
-rw-r--r--  1 root  wheel    1344 Dec 29 11:06:02 2017 gen_pubsub_nodetree.beam
-rw-r--r--  1 root  wheel   23992 Dec 29 11:06:02 2017 mod_vcard.beam
Compiled src/nodetree_dag.erl
src/mod_vcard_sql.erl:63: unknown type specifier 'H'
src/mod_vcard_sql.erl:195: unknown type specifier 'H'
src/mod_vcard_sql.erl:207: unknown type specifier 'H'
src/mod_vcard_sql.erl:32: function export/1 undefined
src/mod_vcard_sql.erl:32: function get_vcard/2 undefined
src/mod_vcard_sql.erl:32: function remove_user/2 undefined
Compiling src/mod_vcard_sql.erl failed:
ERROR: compile failed while processing /u0/n0/gdt/NetBSD-current/pkgsrc/chat/ejabberd/work/ejabberd-17.11: rebar_abort
Makefile:103: recipe for target 'src' failed
gmake: *** [src] Error 1
*** Error code 2
@cromain
Copy link
Contributor

cromain commented Jan 3, 2018

Your problem is you install ejabberd into your hosts's erlang lib directory.
Your packaged erlang is installed into /usr/pkg/lib/erlang/lib/
So every time you start that instance of erlang, it will also load ejabberd-17.09 beams and this will break the build process.

You have 3 options:
1/ uninstall old ejabberd first
2/ build in a sandbox which will use it's own instance of erlang
3/ install ejabberd in it's own directory, out of erlang's lib path, example: /usr/pkg/ejabberd/17.12

@lock
Copy link

lock bot commented Jun 10, 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 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants