scottprahl / iad

Forward and Inverse Radiative Transport using the Adding-Doubling method
MIT License
22 stars 8 forks source link

Issue with 'make install' #1

Closed alexpattyn closed 5 years ago

alexpattyn commented 5 years ago

Specs

OS: Fedora 30

Issue

Running 'make install' in the root directory of the program 'iad/' doesn't work.

Error:

[$USER@toolbox iad] $ make install
cd src ; make ad
make[1]: Entering directory '/var/home/$USER/Git/iad/src'
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o nr_zbrak.o nr_zbrak.c
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o ad_frsnl.o ad_frsnl.c
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o ad_globl.o ad_globl.c
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o ad_matrx.o ad_matrx.c
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o ad_bound.o ad_bound.c
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o nr_util.o nr_util.c
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o ad_doubl.o ad_doubl.c
cc -fno-common -Wall -DNDEBUG -pedantic -g -fPIC   -c -o ad_phase.o ad_phase.c
ctangle ad_start.w - ad_start.c
make[1]: ctangle: Command not found
make[1]: *** [<builtin>: ad_start.c] Error 127
make[1]: Leaving directory '/var/home/$USER/Git/iad/src'
make: *** [Makefile:200: ad] Error 2

I looked around for a bit to see what 'ctangle' was but I didn't see much.

Reproduce

1) git clone https://github.com/scottprahl/iad.git 2) cd iad 3) make install

scottprahl commented 5 years ago

I just did exactly the same thing (after hiding all versions of ctangle that were on my computer) and make install finished cleanly.

ad_start.c is definitely included in the repository and does not need to be rebuilt. I wonder if this might arise because thead_start.w is created by git with a newer file time than ad_start.c

Please try in the iad directory

  1. touch src/*.c src/*.h
  2. make clean
  3. make install

That should work. Let me know

Alternatively, you can install ctangle by doing

  1. git clone https://github.com/tangentforks/cweb
  2. cd cweb
  3. make install
alexpattyn commented 5 years ago

@scottprahl yeah that worked. The only issue I had is I didn't run make install as sudo so it complained that it didn't have the permission to install in usr/local/bin/ad. But it also outputted them into the iad/ directory. When I then try to run ./iad test/basic-A.rxt I get the following output...

$ ./iad test/basic-A.rxt
*****

And I am guessing it should output something to the terminal?

alexpattyn commented 5 years ago

Ah, I see that it just outputs it to basic-A.txt