Comments (11)
Thanks for this bug report.
Looking at the code in
https://github.com/coin-or/CppAD/blob/master/configure.ac
you will see the code
AC_SUBST(cppad_has_colpack, 0)
This means that the autotools version never has colpack. For this reason cppad_lib is not needed.
One also sees the line
cppad_pkgconfig_libs_value="$cppad_pkgconfig_libs_value -lcppad_ipopt"
which I think needs to be removed to fix one of your problem. Would you please test this change.
As for the final location of cppad.pc, you could change this by adding an AC_CONFIG_COMMAND at the end of configure.ac.
Please suggest any changes you would like to configure.ac and I will make the changes.
It seems that cppad_pkgconfig_libs is not set to empty by pkgconfig/CMakeLists.txt when colpack is not avialable and I need to fix this. As for the final location of cppad.pc in the cmake version, it is given by:
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppad.pc DESTINATION ${cppad_abs_datadir}/pkgconfig )
P.S.
It is intended that all the cppad include files be referenced starting with cppad/, so the include directory should be <build_dir>/include.
from cppad.
At the moment, this shouldn't have anything to do with your configure.ac
. The string -lcppad_lib
is hard-coded and the variable @cppad_BINARY_DIR@
is never actually defined in configure.ac
so changing configure.ac
will not affect what ends up in cppad-uninstalled.pc
.
Now that I'm looking at it, though, I guess that you might want
Libs: @cppad_pkgconfig_libs@
Requires: @cppad_pkgconfig_requires@
in cppad-uninstalled.pc.in
as you have in cppad.pc.in
. This would also make the Libs
line empty (at least for the build I'm doing) and would at least make cppad.pc
and cppad-uninstalled.pc
consistent in terms of the libraries they pull in and the packages they require.
Also, the reason your .pc
files are not installed in COIN's default location is actually because of the line
pkgconfigdir = $(datadir)/pkgconfig
in makefile.am
, not because of anything in configure.ac
. This line should be changed to
pkgconfigdir = $(libdir)/pkgconfig
if you want to be consistent with other COIN packages.
from cppad.
I see. I was looking at cppad.pc.in and you were referring to cppad-uninstalled.pc.in You are indeed correct that it needs to be fixed.
In addition, perhaps you are right and libdir is a better location than datadir for the *.pc files. I will try to get to these changes soon.
from cppad.
I think that I have fixed the issue in the cmake install of CppAD see;
8706c1
The three files in the directory below are the ones to look at.
https://github.com/coin-or/CppAD/tree/master/pkgconfig
Would you please do the conversion of CppAD's configure.ac to (with pkgconfig/CMakeLists.txt as a guide).
When converting to the autotools, cppad_SOURCE_DIR in cmake is top_srcdir in autotools and cppad_BINARY_DIR is top_builddir.
P.S.
The autotools install of cppad does not support the colpack addon, so the complicate case (cppad_has_colpack in pkgconfig/CMakeLists.txt) is not relevant.
from cppad.
Thanks! I think you missed the change to makefile.am
. In the meantime, I'll test what's there.
from cppad.
The fix for cppad-uninstalled.pc.in
doesn't work because @cppad_pkgconfig_cflags_uninstalled@
and etc. are not defined in configure.ac
like the corresponding variables @cppad_pkgconfig_cflags@
and etc. are. Since the list of libraries and requirements are the same in either case, what I suggested above should work fine for those if you don't mind using the same variables in each case.
Libs: @cppad_pkgconfig_libs@
Requires: @cppad_pkgconfig_requires@
For the cflags, what you already had there should work fine for the uninstalled headers (as long as that variable is defined) or you can use something like
Cflags: -I@abs_source_dir@ -I@ABSBUILDDIR@
which is what most other projects currently do. There's a chance that the above variables are custom variables and not autotools variables, I'm not sure.
from cppad.
Since the autotools install of CppAD is only used by coin, I was hoping that you would edit the configure.ac file, test your changes, and send me a pull request.
from cppad.
Do you have a pull request, or some other way to identify the changes you would like to see ?
from cppad.
It's not really that straightforward for me to do a PR. As you know, we still use a very old version of the autotools that is probably incompatible with your setup. I also don't really know what variables you prefer to use. You had been using custom-defined variables, while the other COIN packages are using what I think are built-in autotools variables for the directories. I suggested alternatives above. Changes needed are only in
cppad-uninstalled.pc
with the options recommended discussed here, andMakefile.am
with the options discussed here.
I guess it will be easier for both of us if you make the changes in the style that you like and build it with the version of the autotools you are using.
from cppad.
I have made an attempt in the commit
626cf0
The changes were automatically transferred to the non-source autotools files in the repository; see
7e9064
using the command
./bin/autotools.sh automake
Please take a look at this, see if it works for you, or if you would like some modifications.
from cppad.
This seems to work now, thanks!
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.