Comments (10)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
- Tried to set Option: xx. It is not a valid option. Please check the list of available options HOT 2
- Computing the Jacobian of an ODE HOT 2
- CPPAD_DISCRETE_FUNCTION does not work through base2ad HOT 2
- Eigen::NumTraits does not define infinity() or quiet_NaN() HOT 3
- How to add self defined functions to AD<Base>? HOT 8
- Using C++ conditional operators HOT 5
- AD<double> not working in Eigen with some complex function HOT 4
- Computing Derivatives of solutions of optimization Problems HOT 9
- Working with CppAD::ipopt::solve and CppADCodeGen HOT 4
- Leppov case missing in local/optimize/get_op_usage.hpp HOT 3
- Discrete coefficient sets for polynomial vary as a function of dependent variable HOT 16
- How to write the `.lp` file of a Ipopt model? HOT 6
- Linking error "undefined reference to `CppAD::local::temp_file()'" HOT 4
- solution vector is empty HOT 10
- Undefined reference to temp_file HOT 2
- ipopt and cppad tests HOT 11
- Problem to Link with CppAD and Ipopt HOT 16
- CppAD::cg::CGException: what(): GreaterThanZero cannot be called for non-parameters HOT 5
- Compiler warnings from use of bitwise '|' and '&' for bool arguments HOT 5
- Potential build mistake in third party tool in use of NDEBUG flag - CppAD compiled in Release HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppad.