admb-project / admb

AD Model Builder
http://admb-project.org
Other
64 stars 19 forks source link

make install failed #125

Closed yukio-takeuchi closed 4 years ago

yukio-takeuchi commented 4 years ago

On Ubuntu 18.04 sudo make install failed with following error message

export LANG=C ; sudo make install
make --directory=src CC=gcc CXX=g++ install
make[1]: Entering directory '/home/yukiot/repository/admb/src'
find ../build/admb -type d -exec chmod 755 {} \;
find ../build/admb -type f -exec chmod 644 {} \;
chmod a+rx ../build/admb/bin/admb
chmod a+rx ../build/admb/bin/adlink
chmod a+rx ../build/admb/bin/adcomp
chmod a+rx ../build/admb/bin/tpl2cpp
chmod a+rx ../build/admb/bin/tpl2rem
chmod a+r ../build/admb/bin/sed*
chmod a+r ../build/admb/include/*.*
chmod a+r ../build/admb/include/contrib/*.*
cp -Rvf ../build/admb /usr/local/admb
cp: cannot overwrite non-directory '/usr/local/admb/admb' with directory '../build/admb'
GNUmakefile:718: recipe for target 'install' failed
make[1]: *** [install] Error 1
make[1]: Leaving directory '/home/yukiot/repository/admb/src'
Makefile:118: recipe for target 'g++-install' failed
make: *** [g++-install] Error 2

In my linux PC, there was previously installed admb on /usr/local. It seems that make tried cp directory ../build/admb under the existing directory /usr/local/admb. However since there was already a link /usr/local/admb/admb linked to /usr/local/admb/bin/admb, this caused error cp: cannot overwrite non-directory '/usr/local/admb/admb' with directory '../build/admb' This probably can be fixed either by changing

cp -Rvf ../build/admb $(INSTALL_DIR)admb

to

cp -Rvf ../build/admb $(INSTALL_DIR)

or

cp -Rvf ../build/admb/* $(INSTALL_DIR)admb

I have no idea if it happend on my PC or is common install failure