Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling with an external copy of cminpack #17

Open
veggiesaurus opened this issue Oct 13, 2021 · 7 comments
Open

compiling with an external copy of cminpack #17

veggiesaurus opened this issue Oct 13, 2021 · 7 comments

Comments

@veggiesaurus
Copy link
Contributor

Is it possible to compile AST with an external copy of cminpack, rather than using the supplied copy? I'm trying to update the vcpkg port (see PR microsoft/vcpkg#20559 for details), but am getting pushback from their maintainers due to the use of cminpack, rather than relying on a separate shared DLL for it.

@dsberry
Copy link
Member

dsberry commented Oct 13, 2021

I've just made a commit (ab9e74b) that adds an option "--with-external-cminpack" to the configure script. It omits the internal cminpack routines from the built library, and instead links with an external cminpack library.

@veggiesaurus
Copy link
Contributor Author

I've just made a commit (ab9e74b) that adds an option "--with-external-cminpack" to the configure script. It omits the internal cminpack routines from the built library, and instead links with an external cminpack library.

thanks for the quick fix. Would you mind building a tar.gz of that commit? I'm struggling to produce one

@dsberry
Copy link
Member

dsberry commented Oct 15, 2021

I am away on holiday now for over a week, but I'll create a new .tar.gz when I get back.

@dsberry
Copy link
Member

dsberry commented Oct 28, 2021

AST V9.2.5 now available including "--with-external-cminpack" configure option

@opoplawski
Copy link

@dsberry Thank you very much for the --with-external-cminpack option. However, I'm running into an issue. In Fedora, cminpack.h is at /usr/include/cminpack-1/cminpack.h. Could this be detected?

@dsberry
Copy link
Member

dsberry commented Oct 29, 2021

@opoplawski The cminpack header is only used when compiling src/polymap.c, via the statement:

#include "cminpack/cminpack.h"

When I build AST --with-external-cminpack on my own Fedora machine, it builds successfully because it picks up cminpack.h from the AST source distribution. Configuring --with-external-cminpack means AST doesn't doesn't build its own cminpack or link against it, but the header file is still there in the AST source distribution and can be used when compiling polymap.c.

What error message are you seeing, when does it occur?

@opoplawski
Copy link

In the Fedora build of AST, we remove cminpack.h from the AST sources because we want to be sure we are using the Fedora packaged version. That file is at /usr/include/cminpack-1/cminpack.h so the include does not find it. Currently we do:

sed -i -e 's,cminpack/,cminpack-1/,' src/polymap.c

to fix that, but it would be better if AST's configure would find it and configure polymap.c to use that version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants