ngageoint / hootenanny

Hootenanny conflates multiple maps into a single seamless map.
GNU General Public License v3.0
359 stars 74 forks source link

Make command error #220

Closed CLEAOSBORNE closed 8 years ago

CLEAOSBORNE commented 8 years ago

When running the make command with or without a command line argument, I get this error:

make: *\ No rule to make target `test'. Stop.

Also, after an hour of executing "vagrant up" for the initial install of trusty64, received an error stating ssh had closed abruptly. Is this message normal to signify the initial installation is complete with downloading from the web?

brianhatchl commented 8 years ago

When running the make command with or without a command line argument, I get this error:

make: *\ No rule to make target `test'. Stop.

What directory are you in when running make?

Also, after an hour of executing "vagrant up" for the initial install of trusty64, received an error stating ssh had closed abruptly. Is this message normal to signify the initial installation is complete with downloading from the web?

The initial vagrant up will take about 90 minutes while dependencies are downloaded. The provision command should not end with that error, that means something went wrong. A successful provision will end as shown below.

screenshot from 2016-01-13 13 37 47

However, the provision script was designed to be run again if intermittent errors do occur. Try running vagrant provision.

CLEAOSBORNE commented 8 years ago

Thanks Brian, I'm in the hoot directory when I execute the make command

CLEAOSBORNE commented 8 years ago

I see a lot of red entries as the packages download as well.....not sure if this is common

brianhatchl commented 8 years ago

For some reason the wget commands in the provision script seem to report status to stderr which is why they are colored red in the output. Seeing output like below is expected and harmless:

screenshot from 2016-01-13 13 48 13

As for running the make command, the provision script will do that at the end. Let's wait for a successful provision to finish before running make test from the vm.

CLEAOSBORNE commented 8 years ago

provision script ran and finished as you indicated, however some errors like this one came up: ==> default: -bash: line 1: /home/vagrant/hoot/conf/DatabaseConfig.sh: No such file or directory

So I went to that directory and did see the file but it was renamed to DatabaseConfig.sh_orig

brianhatchl commented 8 years ago

Ahh, you've found a bug it seems I introduced a while back, https://github.com/ngageoint/hootenanny/commit/437e5b98fcf9787560e4d848cbbdb58855bdede9#diff-49e53a5a161cc6e1faa312f6874e0c4f

I was hoping to rely on the Makefile to do the copy, but there is a format error in the Makefile target. For now you can simply cp ./conf/DatabaseConfig.sh.orig ./conf/DatabaseConfig.sh.

Then you should be able to

source SetupEnv.sh
make test
CLEAOSBORNE commented 8 years ago

Thanks Brian, I'll try the fix.....appreciate it.

CLEAOSBORNE commented 8 years ago

Still errors out:

vagrant@vagrant-ubuntu-trusty-64:~/hoot$ source SetupEnv.sh vagrant@vagrant-ubuntu-trusty-64:~/hoot$ make test make: *\ No rule to make target `test'. Stop.

However, I fixed the one error and reloaded the VM

brianhatchl commented 8 years ago

Can you try typing make then the tab key to see if the available targets are listed?

You should see Display all 135 possibilities? (y or n)

CLEAOSBORNE commented 8 years ago

This is what I see when I type make and then tab:

vagrant@vagrant-ubuntu-trusty-64:~/hoot$ make make makeconv makeglossaries makeindex makeinfo makejvf make-ssl-cert

CLEAOSBORNE commented 8 years ago

Is this the reason I get many errors when I launch the Hootenanny webpage? The page comes up, but I get errors such as: Get map size thresholds failed, get custom conflation options failed, get available folders failed, get available layers failed.........

CLEAOSBORNE commented 8 years ago

screenshot of some of the vagrant provision errors: screenshot from 2016-01-14 08 04 47

CLEAOSBORNE commented 8 years ago

Brian, should there be a test file in the hoot directory called "test.c" for the make test command to work?

brianhatchl commented 8 years ago

I'm building a hoot vagrant vm from scratch so I can attempt to reproduce your issues. The Makefile for hoot certainly seems broken. Even though the web UI comes up, nothing will work until the hoot c++ and java code successfully builds. From your screen shot make may be broken in general as it seems the build of GDAL failed as well.

Let me get a fresh environment stood up and I'll report back my findings.

brianhatchl commented 8 years ago

Can you ls the /home/vagrant/hoot directory from the vm?

You should see these folders and files: screenshot from 2016-01-14 10 31 38

CLEAOSBORNE commented 8 years ago

Brian, some of these files are missing from my hoot directory, what's the best way to acquire these files? Vagrant provision and reload did not work. Start over, or just copy the files into the directory and execute the make scripts?

brianhatchl commented 8 years ago

So the /home/vagrant/hoot directory is actually a shared folder of the git repo you cloned on your host computer. Can you exit the vagrant ssh session and do an ls and make sure they are all there?

CLEAOSBORNE commented 8 years ago

No, they are missing.....here is a screenshot: screenshot from 2016-01-14 13 18 57

brianhatchl commented 8 years ago

The differences in output are the missing configure/build products. It seems like configure still needs to be run (a prereq of make).

Try running these scripts that include both configure and make commands:

vagrant ssh
cd hoot
source SetupEnv.sh
scripts/ezClean.sh
scripts/ezBuildAll.sh
CLEAOSBORNE commented 8 years ago

still errors out:

screenshot from 2016-01-14 13 37 47

brianhatchl commented 8 years ago

Ok, skip ezClean.sh and run ezBuildAll.sh

CLEAOSBORNE commented 8 years ago

no go

screenshot from 2016-01-14 13 40 22

CLEAOSBORNE commented 8 years ago

need opencv install seems like

brianhatchl commented 8 years ago

The vagrant provision script handles installing all those dependencies. Depending on your comfort level, you can dig into the VagrantProvision.sh script and run line 20.

Or run sudo apt-get install opencv-dev by itself.
Re-running vagrant provision also re-attempts to install those libs, so not sure what is going on there.
Or you could take the nuclear option to start from scratch and issue vagrant destroy and then vagrant up again.

CLEAOSBORNE commented 8 years ago

I'll install opencv and then the rerun the provision script and see if I can execute the make command. If that doesn't work, I'll destroy and redo the VM.

Thanks, and I'll let you know how this works in a bit.

CLEAOSBORNE commented 8 years ago

yeah, it still doesn't work, I'm gonna just destroy this instance and rebuild with vagrant up

Thanks Brian

CLEAOSBORNE commented 8 years ago

screenshot from 2016-01-14 14 06 10

CLEAOSBORNE commented 8 years ago

new error after opencv install

brianhatchl commented 8 years ago

let's break down what ezBuildAll is doing step by step. Be sure to be in the hoot dir and to run source SetupEnv.sh before this.

aclocal
autoconf 
autoheader
automake
./configure -q --with-rnd --with-services
make -sj8

That way you can check the output of each command.

CLEAOSBORNE commented 8 years ago

I destroyed it......gonna bring it back and see if it works this time.

brianhatchl commented 8 years ago

You might try redirecting the vagrant up output to a file, so if things go awry again we can examine the provision output.

CLEAOSBORNE commented 8 years ago

Hey Brian, when I pull all the hoot files from github by way of https, I still do not see the missing make files in the hoot directory. When you clone the hoot directory does these files suppose to be in the directory by default? I destroyed my previous VM and attempted a re-installed, however it crapped out, there was not much in the redirect text, so I'll try again this morning. My main question is maybe I'm not getting all the required files from github using https to clone hoot. Your thoughts?

brianhatchl commented 8 years ago

Here's what I have in a fresh https clone of hoot: screenshot from 2016-01-15 08 58 26

The rest of the missing files are build products, so won't appear until a successful build has run.

Email me the provision log and I'll take a look, there maybe be something there that gives me another troubleshooting clue.

CLEAOSBORNE commented 8 years ago

I re-installing right now and forking the output to a file, when its finished I'll send it over to you. I destroyed the VM and trying from scratch again......the last attempt yielded the same results, make errors and etc, but the webpage would load. I'll contact you in about 30 or 45 min with the vagrant up results from the build process. Thanks!

CLEAOSBORNE commented 8 years ago

I will have to do a vagrant provision, the install stopped with this error:

==> default: checking for pcre_compile in -lpcre... The SSH connection was unexpectedly closed by the remote end. This usually indicates that SSH within the guest machine was unable to properly start up. Please boot the VM in GUI mode to check whether it is booting properly.

But, I will attach the log file so you can examine. clea.txt

CLEAOSBORNE commented 8 years ago

Here is the 2nd run of vagrant provision redirected to a text file:

clea2.txt

CLEAOSBORNE commented 8 years ago

Looks like I'm getting the same make errors as with the first install

CLEAOSBORNE commented 8 years ago

I did notice in the log this error

could not change directory to "/root": Permission denied

Is this hindering the make config file operations?

brianhatchl commented 8 years ago

The first log file shows vagrant up bombing out when building GDAL w/ FileGDBAPI. The second log shows that attempting to be built, but with errors I haven't noticed before. But there are also log messages I expect to see that I don't, which makes me think even though the vagrant ssh session exited during the first attempt, that maybe the provision continued to run and just wasn't captured by the log file.

could not change directory to "/root": Permission denied

This error is installing a dependency for a specific db test, so it won't affect the ability to build the code. I will check to see if it occurs in my log file. I just cloned with https and am capturing the log as it comes up to compare with yours.

I'm more concerned about the missing opencv dependency, that's what's keeping the build from succeeding. It's obviously reproduceable for you, but I have not seen it before.

Sorry for the difficulties, this is the most trouble I've heard anyone have with vagrant, which is supposed to make spinning up this hoot environment easier.

CLEAOSBORNE commented 8 years ago

Thanks Brian, and quick question, do you have a .ovf file export from virtualbox that I could just download or ftp if we can't get around these errors?

sisskind commented 8 years ago

@brianhatchl Buidling on laptop for first time and getting same

could not change directory to "/root": Permission denied

errors. Will update if successful/unsuccessful build occurs.

brianhatchl commented 8 years ago

@CLEAOSBORNE possibly. Another option would be to create an Ubuntu 14.04 vm by hand and then run the VagrantProvision.sh bash script.

CLEAOSBORNE commented 8 years ago

I'll build a VM and then try that, I'll let you know how it goes.

CLEAOSBORNE commented 8 years ago

Seems like opencv is a common issue in the Ubuntu 14 forums surrounding the installation.

brianhatchl commented 8 years ago

Here's my output of a successful vagrant up. vagrantup.txt

brianhatchl commented 8 years ago

Can we check some info about the host you are running on?

CLEAOSBORNE commented 8 years ago

system

CLEAOSBORNE commented 8 years ago

I have 196GB free space

brianhatchl commented 8 years ago

The Vagrantfile is currently set up to allocate 4 cpu and 8gb of ram to the vm. Maybe we should try reducing that to 2 cpu and 4gb.

The change is made here: https://github.com/ngageoint/hootenanny/blob/master/Vagrantfile#L60-L61

CLEAOSBORNE commented 8 years ago

yeah, I changed it