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

make install bug? #7

Open
SeLLeRoNe opened this issue Dec 21, 2016 · 2 comments
Open

make install bug? #7

SeLLeRoNe opened this issue Dec 21, 2016 · 2 comments

Comments

@SeLLeRoNe
Copy link

SeLLeRoNe commented Dec 21, 2016

Hi everyone,
I was playing around with a fresh install of Merlin and i noticed something wrong.

On "make install" i received this error:

bash install-merlin.sh
install-merlin.sh: line 45: /usr/local/monitor/share/merlin/sql/mysql/merlin.sql: No such file or directory
ERROR 1146 (42S02) at line 1: Table 'monitor_db.db_version' doesn't exist
install-merlin.sh: line 65: /usr/local/monitor/share/merlin/sql/mysql/*-indexes.sql: No such file or directory
make[3]: *** [install-exec-hook] Error 1
make[3]: Leaving directory `/usr/local/crazynetwork/monitor/merlin'
make[2]: *** [install-exec-am] Error 2
make[2]: Leaving directory `/usr/local/crazynetwork/monitor/merlin'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/usr/local/crazynetwork/monitor/merlin'
make: *** [install] Error 2

I checked the install-merlin.sh script and is looking for the wrong folder, in fact, instead of looking on the current path (pwd/sql/mysql/), it is looking for the path where the make install it is supose to put the files:

prefix=/usr/local/monitor
exec_prefix=${prefix}
sqldir=${prefix}/share/merlin/sql

That folder (/usr/local/monitor/share/merlin/sql/) still doesn't exist at that moment, in fact, if i manually import the .sql scripts and create the DB structure, the make install success and than the folder (/usr/local/monitor/share/merlin/sql/ exist.

Please note i used just those commands:

./configure --prefix=/usr/local/monitor --with-naemon-user=monitor --with-naemon-group=monitor --with-db-type=mysql--with-db-name=monitor_db --with-db-user=monitor_db --with-db-pass=mypassword --with-initdirectory=/etc/init.d
make
make install

Also please note this, in the install-merlin.sh file i can see those DB settings:

db_type=mysql--with-db-name=monitor_db
db_name=merlin
db_user=monitor_db
db_pass=mypassword

As you can see, despite the fact i specified the db_name on the ./configure, it still show merlin, it doesn't look like it is actually using that (i can tell from the error which specify the correct DB), but maybe can be fixed anyway :)

Best regards
Andrea

@geekmichael
Copy link

geekmichael commented Jul 7, 2017

Hi Andrea,
I got the same issue exactly. You need manually copy the folder sql from setup folder prior to run 'make install'. I did this:

[root@centos merlin]# mkdir /opt/monitor/merlin/share/merlin/ -pv
mkdir: created directory /opt/monitor/merlin/share' mkdir: created directory /opt/monitor/merlin/share/merlin/'
[root@centos merlin]# cp -r sql/ /opt/monitor/merlin/share/merlin/
[root@centos merlin]# make install

@SeLLeRoNe
Copy link
Author

Hi Michael,

Thanks for that, I guess that would be better for devs to fix this minor thing, anyway I did manage to make the installation as I wrote, so it's not big harm anymore :)

Thanks

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

2 participants