processone / ejabberd

Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
https://www.process-one.net/en/ejabberd/
Other
6.07k stars 1.51k forks source link

src/odbc_queries.erl:30: function add_user_scram/6 undefined #730

Closed Mark90 closed 9 years ago

Mark90 commented 9 years ago

I get the following output compiling 15.07 with --enable-mssql:

src/odbc_queries.erl:30: function add_user_scram/6 undefined src/odbc_queries.erl:30: function get_password_scram/2 undefined src/odbc_queries.erl:30: function get_privacy_list_data_t/2 undefined src/odbc_queries.erl:30: function get_private_data/2 undefined src/odbc_queries.erl:30: function set_password_scram_t/6 undefined src/odbc_queries.erl:30: function update/5 undefined src/odbc_queries.erl:30: function update_t/4 undefined ERROR: compile failed while processing /root/git/processone/ejabberd: rebar_abort

full output and commands:

[root@xmpp-upgrade ejabberd]# git checkout 15.07
Note: checking out '15.07'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 0dbedb6... Recompile translations
[root@xmpp-upgrade ejabberd]# ./autogen.sh
[root@xmpp-upgrade ejabberd]# ./configure --prefix=/usr/local/ejabberd-15.07 --enable-user=ejabberd --enable-mssql --enable-mysql --enable-odbc
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for erl... /usr/bin/erl
checking for erlc... /usr/bin/erlc
checking for erl... /usr/bin/erl
checking for erlc... /usr/bin/erlc
checking Erlang/OTP version... ok
checking for Erlang/OTP root directory... /usr/lib/erlang
checking for escript... /usr/lib/erlang/bin/escript
checking for make... make
allow this system user to start ejabberd: ejabberd
checking whether Erlang is using deprecated types... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating vars.config
config.status: creating src/ejabberd.app.src
[root@xmpp-upgrade ejabberd]#
[root@xmpp-upgrade ejabberd]#
[root@xmpp-upgrade ejabberd]# make
rm -rf deps/.got
rm -rf deps/.built
/usr/lib/erlang/bin/escript rebar get-deps && :> deps/.got
==> rel (get-deps)
==> ejabberd (get-deps)
Pulling p1_cache_tab from {git,"git://github.com/processone/cache_tab"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_cache_tab/.git/
Pulling p1_tls from {git,"git://github.com/processone/tls"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_tls/.git/
Pulling p1_stringprep from {git,"git://github.com/processone/stringprep"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_stringprep/.git/
Pulling p1_xml from {git,"git://github.com/processone/xml"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_xml/.git/
Pulling esip from {git,"git://github.com/processone/p1_sip"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/esip/.git/
Pulling p1_stun from {git,"git://github.com/processone/stun"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_stun/.git/
Pulling p1_yaml from {git,"git://github.com/processone/p1_yaml"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_yaml/.git/
Pulling ehyperloglog from {git,"https://github.com/vaxelfel/eHyperLogLog.git"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/ehyperloglog/.git/
Pulling p1_utils from {git,"git://github.com/processone/p1_utils"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_utils/.git/
Pulling p1_mysql from {git,"git://github.com/processone/mysql"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_mysql/.git/
Pulling p1_zlib from {git,"git://github.com/processone/zlib"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_zlib/.git/
Pulling lager from {git,"git://github.com/basho/lager"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/lager/.git/
Pulling p1_iconv from {git,"git://github.com/processone/eiconv"}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/p1_iconv/.git/
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/lib/erlang/erts-5.9.1/bin/erl
checking for erlc... /usr/lib/erlang/erts-5.9.1/bin/erlc
checking for SSL_free in -lssl... yes
checking for SHA1_Init in -lcrypto... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking openssl/sha.h usability... yes
checking openssl/sha.h presence... yes
checking for openssl/sha.h... yes
configure: creating ./config.status
config.status: creating vars.config
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/lib/erlang/erts-5.9.1/bin/erl
checking for erlc... /usr/lib/erlang/erts-5.9.1/bin/erlc
configure: creating ./config.status
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/lib/erlang/erts-5.9.1/bin/erl
checking for erlc... /usr/lib/erlang/erts-5.9.1/bin/erlc
checking for yaml_parser_initialize in -lyaml... yes
checking yaml.h usability... yes
checking yaml.h presence... yes
checking for yaml.h... yes
configure: creating ./config.status
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/lib/erlang/erts-5.9.1/bin/erl
checking for erlc... /usr/lib/erlang/erts-5.9.1/bin/erlc
configure: creating ./config.status
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/lib/erlang/erts-5.9.1/bin/erl
checking for erlc... /usr/lib/erlang/erts-5.9.1/bin/erlc
checking for XML_ParserCreate in -lexpat... yes
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
configure: creating ./config.status
config.status: creating rebar.config.script
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/lib/erlang/erts-5.9.1/bin/erl
checking for erlc... /usr/lib/erlang/erts-5.9.1/bin/erlc
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
configure: creating ./config.status
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/lib/erlang/erts-5.9.1/bin/erl
checking for erlc... /usr/lib/erlang/erts-5.9.1/bin/erlc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... yes
checking for working iconv... yes
checking for iconv declaration...
         extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
configure: creating ./config.status
config.status: creating rebar.config
==> p1_utils (get-deps)
==> p1_cache_tab (get-deps)
==> p1_tls (get-deps)
==> p1_stringprep (get-deps)
==> p1_xml (get-deps)
==> p1_stun (get-deps)
==> esip (get-deps)
==> p1_yaml (get-deps)
==> ehyperloglog (get-deps)
==> p1_mysql (get-deps)
==> p1_zlib (get-deps)
==> lager (get-deps)
Pulling goldrush from {git,"git://github.com/DeadZen/goldrush.git",
                           {tag,"0.1.7"}}
Initialized empty Git repository in /root/git/processone/ejabberd/deps/goldrush/.git/
==> goldrush (get-deps)
==> p1_iconv (get-deps)
/usr/lib/erlang/bin/escript rebar compile && :> deps/.built
==> p1_utils (compile)
Compiled src/treap.erl
Compiled src/p1_fsm.erl
Compiled src/p1_server.erl
==> p1_cache_tab (compile)
Compiled src/cache_tab_sup.erl
Compiled src/cache_tab_app.erl
Compiled src/cache_tab.erl
==> p1_tls (compile)
Compiled src/p1_tls_sup.erl
Compiled src/p1_tls_app.erl
Compiled src/p1_sha.erl
Compiled src/p1_tls.erl
Compiling c_src/p1_tls_drv.c
Compiling c_src/p1_sha.c
==> p1_stringprep (compile)
Compiled src/stringprep_app.erl
Compiled src/stringprep_sup.erl
Compiled src/stringprep.erl
Compiling c_src/stringprep.c
==> p1_xml (compile)
Compiled src/xml_sup.erl
Compiled src/xml_util.erl
Compiled src/p1_xmlrpc.erl
Compiled src/xml_app.erl
Compiled src/xml_stream.erl
Compiled src/xml.erl
Compiled src/xmlrpc_codec.erl
/root/git/processone/ejabberd/deps/p1_xml/src/xml_gen.erl:1732: Warning: variable 'T' is unused
Compiled src/xml_gen.erl
Compiling c_src/expat_erl.c
Compiling c_src/xml.c
==> p1_stun (compile)
Compiled src/turn_tmp_sup.erl
Compiled src/stun_app.erl
Compiled src/turn_sm.erl
Compiled src/stun_shaper.erl
Compiled src/stun_listener.erl
Compiled src/stun_sup.erl
Compiled src/stun_codec.erl
Compiled src/stun_tmp_sup.erl
Compiled src/turn.erl
/root/git/processone/ejabberd/deps/p1_stun/src/stun_test.erl:251: Warning: variable 'Addr' is unused
/root/git/processone/ejabberd/deps/p1_stun/src/stun_test.erl:270: Warning: variable 'Addr' is unused
/root/git/processone/ejabberd/deps/p1_stun/src/stun_test.erl:307: Warning: variable 'Addr' is unused
Compiled src/stun_test.erl
Compiled src/stun.erl
==> esip (compile)
Compiled src/esip_sup.erl
Compiled src/esip.erl
Compiled src/esip_server_transaction.erl
Compiled src/esip_transaction.erl
Compiled src/esip_transport.erl
Compiled src/esip_tmp_sup.erl
Compiled src/esip_udp_sup.erl
Compiled src/esip_dialog.erl
Compiled src/esip_socket.erl
Compiled src/esip_listener.erl
Compiled src/esip_app.erl
Compiled src/esip_client_transaction.erl
Compiled src/esip_codec.erl
Compiling c_src/esip_codec.c
==> p1_yaml (compile)
Compiled src/p1_yaml_sup.erl
Compiled src/p1_yaml_app.erl
Compiled src/p1_yaml.erl
Compiling c_src/p1_yaml.c
==> ehyperloglog (compile)
Compiled src/ehyperloglog.erl
Compiled src/bitmap.erl
==> p1_mysql (compile)
Compiled src/p1_mysql_app.erl
Compiled src/p1_mysql_sup.erl
Compiled src/p1_mysql_auth.erl
Compiled src/p1_mysql.erl
Compiled src/p1_mysql_recv.erl
Compiled src/p1_mysql_conn.erl
==> p1_zlib (compile)
Compiled src/ezlib_app.erl
Compiled src/ezlib_sup.erl
Compiled src/ezlib.erl
Compiling c_src/ezlib_drv.c
==> goldrush (compile)
Compiled src/gr_manager_sup.erl
Compiled src/gr_counter_sup.erl
Compiled src/glc.erl
Compiled src/gr_app.erl
Compiled src/gr_param.erl
Compiled src/gr_manager.erl
Compiled src/gr_sup.erl
Compiled src/gr_context.erl
Compiled src/glc_lib.erl
Compiled src/gr_param_sup.erl
Compiled src/gre.erl
Compiled src/gr_counter.erl
Compiled src/glc_ops.erl
Compiled src/glc_code.erl
==> lager (compile)
Compiled src/lager_util.erl
Compiled src/lager_transform.erl
Compiled src/lager_default_formatter.erl
Compiled src/lager_common_test_backend.erl
Compiled src/lager_handler_watcher_sup.erl
Compiled src/lager.erl
Compiled src/lager_backend_throttle.erl
Compiled src/lager_file_backend.erl
Compiled src/lager_format.erl
Compiled src/lager_sup.erl
Compiled src/lager_config.erl
Compiled src/lager_app.erl
Compiled src/lager_console_backend.erl
Compiled src/lager_stdlib.erl
Compiled src/lager_msg.erl
Compiled src/lager_trunc_io.erl
Compiled src/lager_crash_log.erl
Compiled src/error_logger_lager_h.erl
Compiled src/lager_handler_watcher.erl
==> p1_iconv (compile)
Compiled src/iconv_sup.erl
Compiled src/iconv_app.erl
Compiled src/iconv.erl
Compiling c_src/iconv.c
==> rel (compile)
==> ejabberd (compile)
Compiled asn1/XmppAddr.asn1
Compiled src/eldap_filter_yecc.yrl
Compiled src/ejabberd_sm.erl
Compiled src/gen_mod.erl
Compiled src/cyrsasl.erl
src/gen_pubsub_nodetree.erl:47: Warning: type itemId() is unused
Compiled src/gen_pubsub_nodetree.erl
Compiled src/ejabberd_auth.erl
Compiled src/eldap_filter_yecc.erl
src/gen_pubsub_node.erl:63: Warning: type nodeOptions() is unused
Compiled src/gen_pubsub_node.erl
Compiled src/ejabberd_frontend_socket.erl
Compiled src/pubsub_subscription_odbc.erl
Compiled src/idna.erl
Compiled src/ejabberd_service.erl
Compiled src/mod_vcard_xupdate.erl
Compiled src/mod_stats.erl
Compiled src/ejabberd_odbc.erl
Compiled src/mod_pres_counter.erl
Compiled src/adhoc.erl
Compiled src/ejabberd_piefxis.erl
Compiled src/eldap_filter.erl
Compiled src/translate.erl
Compiled src/cyrsasl_anonymous.erl
Compiled src/acl.erl
Compiled src/mod_client_state.erl
Compiled src/node_hometree.erl
Compiled src/eldap_utils.erl
Compiled src/ejabberd_rdbms.erl
Compiled src/mod_shared_roster.erl
Compiled src/ext_mod.erl
Compiled src/mod_carboncopy.erl
Compiled src/node_mb.erl
Compiled src/pubsub_index.erl
Compiled src/ejabberd_http_bind.erl
Compiled src/ejabberd_ctl.erl
Compiled src/ejabberd_riak_sup.erl
Compiled src/ejabberd_xmlrpc.erl
Compiled src/cyrsasl_scram.erl
Compiled src/node_flat_odbc.erl
Compiled src/mod_irc.erl
src/odbc_queries.erl:30: function add_user_scram/6 undefined
src/odbc_queries.erl:30: function get_password_scram/2 undefined
src/odbc_queries.erl:30: function get_privacy_list_data_t/2 undefined
src/odbc_queries.erl:30: function get_private_data/2 undefined
src/odbc_queries.erl:30: function set_password_scram_t/6 undefined
src/odbc_queries.erl:30: function update/5 undefined
src/odbc_queries.erl:30: function update_t/4 undefined
ERROR: compile failed while processing /root/git/processone/ejabberd: rebar_abort
make: *** [deps/.built] Error 1
Mark90 commented 9 years ago

As found by emias (irc), the scram functions are missing in the mssql ifdef section of src/odbc_queries.erl. These functions also need to be added in the sql/mssql20xx.sql files I guess.

zinid commented 9 years ago

I think the whole MSSQL stuff is broken in ejabberd.

mremond commented 9 years ago

@Mark90 Do you have a patch you would like us to review ?

Mark90 commented 9 years ago

Not sure why I wanted to compile with mssql in the first place... only need odbc. I would write a patch if I knew mssql but I don't.

zinid commented 9 years ago

@Mark90 nobody here knows mssql, but it's possible to use mysql-to-mssql converters.

zinid commented 9 years ago

@Mark90 We did our best to fix MSSQL support. Please checkout the latest git revision. In order to configure MSSQL you need to have FreeTDS and unixODBC libraries installed. This is only supported in Unix-like OS'es so far. The configuration should look like this:

odbc_type: mssql
odbc_server: "abcd.database.windows.net"
odbc_database: "ejabberd"
odbc_username: "ejabberd"
odbc_password: "*******"

Note that in some cases you need to add host part to odbc_username, e.g.: odbc_username: "ejabberd@host"

Let us know if it works for you. You can get new MSSQL schema here: https://github.com/processone/ejabberd/blob/master/sql/mssql.sql

lock[bot] commented 5 years ago

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.