GithubHelp home page GithubHelp logo

Comments (10)

bradbell avatar bradbell commented on June 24, 2024

After configure does it work, the install files are best described by the command
INSTALL(
DIRECTORY "${CMAKE_SOURCE_DIR}/include/cppad/"
DESTINATION ${cppad_abs_includedir}/cppad
FILES_MATCHING PATTERN "*.hpp"
)
which appears in the file
https://github.com/coin-or/CppAD/blob/master/CMakeLists.txt

Would you please try making the corresponding change to
https://github.com/coin-or/CppAD/blob/master/makefile.am
testing it and if it works for you inform me of the change and I will try it.

from cppad.

tkralphs avatar tkralphs commented on June 24, 2024

Sure, I understood your intention. As I've explained many times, I cannot easily do the testing. It is vastly easier for you to do it. As far as I can tell, the appropriate change to be made to Makefile.am is to change this line

nobase_myinclude_HEADERS =  \

to this

myincludedir = $(includedir)/cppad
myinclude_HEADERS =  \

I would greatly appreciate it if you could try this. As for the installation of configure.hpp, that is up to you, I was just pointing out that these kinds of headers are not usually installed.

from cppad.

bradbell avatar bradbell commented on June 24, 2024

I have not been running the autotools tests:

   bin/autotools.sh automake
   bin/autotools.sh configure
   biin/autotooils.sh test

is now failing before I make and changes. I need to fix this first.

from cppad.

bradbell avatar bradbell commented on June 24, 2024

I have the test running in a sandbox, but when I go to install as you suggested, it tries to put all the include files in one directory. What I need is to copy the directory and sub-directory structure like the following bash command

cp -r include/cppad  $includedir/cppad

but only need include the *.hpp files.

Note sure how to do this with automake, It is easy in cmake where I use the following:

#
# During install copy all the cppad include files to
# ${cppad_abs_includedir}/cppad
INSTALL(
    DIRECTORY "${CMAKE_SOURCE_DIR}/include/cppad/"
    DESTINATION ${cppad_abs_includedir}/cppad
    FILES_MATCHING PATTERN "*.hpp"
)

from cppad.

bradbell avatar bradbell commented on June 24, 2024

I think that I have fixed this with the commits from fb5d0a4 to 30d3903; see the heading 09-14 on
https://coin-or.github.io/CppAD/doc/whats_new_19.htm

The real fix to the install is moving the nobase include to the include subdirectory; see
https://github.com/coin-or/CppAD/blob/master/include/makefile.am

Most of the work was getting the tests to run using the automake configuration.

I want to mention again that using automake is deprecate
and that using cmake does a better job of configuring and testing CppAD.

from cppad.

tkralphs avatar tkralphs commented on June 24, 2024

This seems to work for in-place builds, but fails for VPATH builds. Supporting VPATH builds is critical and requires some extra care, but I don't recall now exactly what. To replicate, do

git checkout master
mkdir build
cd build
../configure --prefix=$PWD/xxx
make install

and the should end in

make[1]: *** No rule to make target 'include/cppad/local/sparse/list.hpp', needed by 'all-am'.  Stop.
make[1]: Leaving directory '/mnt/c/Users/tkral/Documents/Projects/cppad/build'
makefile:960: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

I will try to poke around a little as I have time.

from cppad.

tkralphs avatar tkralphs commented on June 24, 2024

Oh, sorry, I was not on the most recent commit. Now everything seems to work except that the auto-generated headers (include/cappad/configure.hpp) are still not installed. What is installed is include/cppad/configure.hpp.in. Same for local/is_pod.hpp. I'm actually not 100% sure how auto-generated things are supposed to get installed. We have these hooks in Makefile.am that install the headers for the COIN projects I maintain, but there's some more complicated stuff going on around this.

install-exec-local:
	$(install_sh_DATA) config_cbc.h $(DESTDIR)$(includecoindir)/CbcConfig.h

uninstall-local:
	rm -f $(DESTDIR)$(includecoindir)/CbcConfig.h

from cppad.

svigerske avatar svigerske commented on June 24, 2024

That's for renaming while installing.
If we had a CbcConfig.h generated in the build dir, then it would just be

includecoindir = $(includedir)/coin
installcoin_HEADERS = CbcConfig.h

So something like that should work installing CppAD's configure.hpp and is_pod.hpp.

from cppad.

bradbell avatar bradbell commented on June 24, 2024

There was a bug in include/makefile.am and I was installing the the .hpp.in files instead of the corresponding .hpp files.

In addition, the program bin/check_makefile.sh was checking for the hpp.in files instead of check for the .hpp files.

This has been fixed in commit
4fccfa7

As for installing in $(includedir)/coin, this is the purpose of the postfix_dir option to the configure script; see the heading postfix_dir on
https://coin-or.github.io/CppAD/doc/autotools.htm#postfix_dir

from cppad.

tkralphs avatar tkralphs commented on June 24, 2024

OK, now it works. I didn't remember that the installation of headers that end up in the build directory was so straightforward. I thought there was an additional step. I'm doing a final full build of the Optimization Suite to be sure, but the problems seem to be fixed, so I'll close this issue.

from cppad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.