ejabberd with sql support after installation - ejabberd

I have been using ejabberd with Mnesia for past 2 months. Now I wanted to add mysql database.
I have a confusion here. I installed ejabberd from source using this line
./configure --enable-user --prefix=/tmp/eja1809
Now I found that for using ejabberd with mysql I need to compile the ejabberd using the same ./configure option as
./configure --enable-mysql.
So my question is that do I need to use --enable-user again like this
./configure --enable-user --enable-mysql --prefix=/tmp/eja1809
or is there no need to add enable user again, to add mysql to ejabberd which has already been installed.
Also Do I need to use both make and make install after using the ./configure statement ?
Please help me out here.

So my question is that do I need to use --enable-user again like this
./configure --enable-user --enable-mysql --prefix=/tmp/eja1809
That's correct: provide in ./configure all the options you want it to use, because it takes in consideration only the options you provide now, it doesn't remember what you provided in previous calls, neither months or minutes ago :)
Also Do I need to use both make and make install after using the
./configure statement ?
Right, compilation includes configure and make, then you must install it. For example, when I'm testing changes in ejabberd source code, I run all of this:
./configure --enable-user --enable-odbc --enable-mysql --enable-tools
./rebar get-deps
./rebar update-deps
./rebar compile
make
sudo make install
ejabberdctl live

Related

Installation of Transcriber (http://trans.sourceforge.net/en/install.php)

I am going around with no success in installing Transcriber in Ubuntu. Way very difficult :s
I follow all the steps the link above, but no way of passing this part of installing first the tcltk - ./configure --enable-gcc --enable-shared --prefix=/usr/local
make
It doesn't work and gives a bunch of errors. SO I decided to search and do as here, to install tcltk - Install TCL/TK without root
So I tried the code but it didn't work again, starting here sudo ./configure --prefix=/opt/tcltk
It was saying I had no permissions in opt so I found a way to create a tcltk folder, fine, but when I put the sudo it comes:
checking whether to use symlinks for manpages... no
checking whether to compress the manpages... no
checking whether to add a package name suffix for the manpages... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
Seeconfig.log' for more details.
`
I am tired of this guys, if you could please help me to install this I would be very thankful. I understand not that much of ubuntu. Thank you!
You can't compile without a compiler (and linker). They're usually not very happy about being installed in user directories.
sudo apt install build-essential
Alternatively, if you're just wanting to run Tcl code without installing, you can use KitCreator to get your own single-file executable. (Yes, that site will build one for you While-U-Wait. The guy who wrote it isn't big on fancy CSS, even more so than me, but he does make good technology deployments.) There are other options too, but they're either older or less easy to use without being able to install compilers and so on.

Cross-compile Qt5 (Mingw) with MySQL driver issue

I tried a lot of things I read on documentations or tutorials... But I still can't cross-compile Qt with the MySQL library driver. Story begins:
I have to cross-compile Qt from Linux to Windows (32bits) using MinGW (i686-w64-mingw32- prefix to be precise). I downloaded qtbase-opensource-src-5.9.4 and started to work like that:
$ ./configure -prefix [...]/qt-5.9.4 -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32- -opengl desktop -no-sql-odbc -sql-sqlite -enable-shared -nomake examples -nomake tests -release
And it worked. Then, make and make install worked too. But I figured out that there was only the SQLite ".dll" in the plugins/sqldrivers repository. So I tried to compile the MySQL driver and... How can I do that?? If I add -sql-mysql to my ./configure ... call, I have to following error:
ERROR: Feature 'sql-mysql' was enabled, but the pre-condition 'libs.mysql' failed.
I downloaded MySQL library from the official website to get mysql-5.7.21-win32.zip. But how to link it with qtbase sources? Adding MYSQL_INCDIR=[...]/mysql-5.7.21-win32/include and MYSQL_LIBDIR=[...]/mysql-5.7.21-win32/lib or just MYSQL_PREFIX=[...]/mysql-5.7.21-win32 to my ./configure ... command results to the same error message.
Any idea please?
EDIT:
I tried to compile the driver like that (with the qmake I built previously):
$ cd qtbase-opensource-src-5.9.4/src/plugins/sqldrivers/mysql
$ [/*prefix of my previous build*/]/qt-5.9.4/bin/qmake .
And the result is:
Project ERROR: Library 'mysql' is not defined.
Ok everyone, I found the solution: do a clean checkout or add -recheck-all to the ./configure command when you want to add a lib like MySQL in my case. Easy isn't it? To make it clear, here is the command I used:
./configure -prefix [...] -xplatform win32-g++ -device-option CROSS_COMPILE=/usr/bin/i686-w64-mingw32- -opengl desktop -no-sql-odbc -sql-sqlite -plugin-sql-mysql MYSQL_PREFIX=[...] -enable-shared -nomake examples -nomake tests -release -recheck-all
That was just a refresh problem, but I prefer to let this answer because it's pretty hard to realize.
Instead of what you tried in your EDIT, should I think be:
$ cd qtbase-opensource-src-5.9.4/src/plugins/sqldrivers
qmake -- MYSQL_PREFIX= [...]/mysql-5.7.21-win32/include

Compiling MySQL 5.7.20 in CentOS 7 Issues (A Lot)

I am trying to setup a MySQL server using CentOS (No GUI) and I need to switch to OpenSSL instead of YaSSL in order to have access to the encryption tools.
The issues happen when runing the cmake. At first I got the error that cmake was not able to find boost, I fixed this adding the parameter -DWITH_BOOST.
The cmake line is as follows.
cmake . -DWITH_READLINE=ON -DWITH_SSL=system -DWITH_BOOST=/usr/local/src/mysql-5.7.20/boost/
After the adjustment I ran again the CMAKE the I got several errors.
SSL Error, cmake can not find the OpenSSL files. I checked if the library was installed, I also downloaded the tar.gz file and decompress it and pointed the cmake to the folder, none of this worked.
Can not find NUMA libraries, again I checked and it is installed, at this point I ran the system update to check for everything but this did not solve the issue.
Can not find the ncurses, the same thing, is on the system but for some reason cmake is not able to find those.
Can not fin libaio, I didn't have this one installed, I installed, ran cmake again, and again cmake was not able to find it.
I been looking around, trying to figure out all this issues, I've been joining information from different websites but still not able to figure out this.
Thanks ahead to everyone for the help.
You're facing the dependencies hell with MySQL. If you don't really need to compile from the sources, you still can install with the RPM which is much easier. The RPM method is described here : https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
As you're asking a ready-to-go install from the sources, this is what I just did and it worked, on a fresh CentOS 7.4 minimal, 2 vcpus 3Gb :
yum group install -y 'Development Tools'
yum install -y cmake ncurses-devel curl
curl -Ovk https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-5.7.20.tar.gz
tar zxf mysql-5.7.20.tar.gz
cd mysql-5.7.20
cmake . -DDOWNLOAD_BOOST=1 -DWITH_BOOST=$HOME/boost -DENABLE_DOWNLOADS=1
make -j2
make install
After that you need to configure it, add the startup scripts, and of course secure it. Here are some additional docs :
http://howtolamp.com/lamp/mysql/5.6/installing/
https://dev.mysql.com/doc/refman/5.7/en/mysql-secure-installation.html
Perhaps try make clean; cmake clean; ldconfig then run your cmake command. Sometimes the system can't find the shared libraries, and ldconfig refreshes the library search path. This helped once when I was compiling something (emscripten?) which required a lot of libraries which I was installing as compilation errors arose.
The make clean; cmake clean will ensure that the compiler isn't looking at the old library search path when you recompile.

As a project user, what do I need to do to make a project with Cmake?

I'm working with a project that [used to] support both Autotools and Cmake. In the past, I would:
cd project/build
...
../llvm/configure --enable-optimized --enable-cxx11 $OTHER_OPTIONS --prefix=/usr/local
make -j2
sudo make install
The project has kind of abandoned it support for Autotools, so I have to use Cmake now. Using Cmake to configure seems like it should be relatively easy.
Unfortunately, Mac OS X lacks man pages for Cmake, so I can't RTFM. And the search hits I am finding discuss how to build Cmake packages (and other stuff package maintainers would do), and not how to use it as a dumb project user.
I tried to simply use Cmake in place of Configure, but it did not work:
$ cd project/build
$ OTHER_OPTIONS=" --enable-libcpp"; cmake ../llvm --enable-optimized --enable-cxx11 "$OTHER_OPTIONS" --prefix=/usr/local
CMake Error: The source directory ".../clang-3.6/build/--prefix=/usr/local" does not exist.
Why is Cmake treating a configuration option like a directory (--prefix=/usr/local)?
How do I configure and build a project that uses Cmake as a dumb project user?
You're trying to configure a CMake project like it was autotools. The syntax of the command is;
cmake -Doptions -Dmore_options src_dir
src directory is the last argument, which is why it treats --prefix that way. You will need to know the name of the parameters available to you though. If you're new to CMake, your best bet is to run, either the Qt gui or the curses gui ( ccmake /path/to/src while your in the build directory ). Those gui tools will let you pick your options, configure then generate. Then all you need is to type make ....
Note
cmake --help
does provide info even if your man pages aren't installed. Also, if you have access to google and the internet, searching "cmake man page" should give you access the your missing man pages.

Stuff not included in RailsReady?

I tried to install RoR on Ubuntu 12.0.4 using RailsReady(https://github.com/joshfng/railsready). Afterwards I restarted my computer and while typing ruby -v works, typing rails -v returns unrecognized, as does mysql in the terminal. What do I have to do to be able to launch rails and mysql? Do I have to install them individually using sudo even though I've already installed RailsReady? Thanks.
A quick glance at the README and the script itself shows that it gets you ready to install Rails by installing typical packages needed in order to create a Rails-based development environment, and then attempts to install it.
Per #madth3's comment below, lines 176 to 182 of railsready.sh does attempt to install Rails, so look for any error messages when you run that script.
MySQL appears to require separate installation using standard methods appropriate for your system.