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

Non-executables are installed in bin #32

Closed
dpo opened this issue Feb 4, 2015 · 13 comments
Closed

Non-executables are installed in bin #32

dpo opened this issue Feb 4, 2015 · 13 comments

Comments

@dpo
Copy link
Contributor

dpo commented Feb 4, 2015

On OSX, make install installs non-executables in $PREFIX/bin, e.g., the compiled MEX files, and some dlls. Is there a way to tell cmake to install those elsewhere?

@vitaut
Copy link
Contributor

vitaut commented Feb 4, 2015

dlls should normally be installed in bin, because these are AMPL function libraries that must reside on the PATH for AMPL to find them. I am not familiar with the usual conventions for mex files, are these supposed to be installed in lib?

@tkelman
Copy link
Contributor

tkelman commented Feb 4, 2015

mex files should probably go wherever shared libraries go, since that's all they are. So bin on Windows, lib on Unix would make sense to me.

@dpo
Copy link
Contributor Author

dpo commented Feb 4, 2015

Homebrew won't tolerate non-executables in bin or non-libraires in lib. I don't think it will consider dlls as libraries since those normally don't exist on OSX (in fact I don't understand why I'm getting dlls at all). The ideal would be to be able to specify where stuff should go, as configure lets you do, by specifying bindir, libdir, etc. Then in Homebrew, I'll be able to symlink things properly.

@tkelman
Copy link
Contributor

tkelman commented Feb 4, 2015

There are cmake variables for most of this stuff. AMPL hardcodes some file names expecting these to be named dll and located in bin on all platforms (it's dlopening them, not linking to them), AIUI.

If you don't expect anyone to use the homebrew ASL version with a full install of AMPL, you can probably delete them.

@vitaut
Copy link
Contributor

vitaut commented Feb 4, 2015

.dll is used for historical reasons and to keep scripts that use them identical on all platforms, these are ordinary .so files on Linux or .dylib files on OS X. There might be bindir and libdir equivalents in CMake, but I'm not aware of them.

I've changed the install directory for .mex files to follow the conventions used for shared libraries as suggested by @tkelman in f1e9cc3.

@vitaut
Copy link
Contributor

vitaut commented Feb 5, 2015

@dpo, I can add a CMake option to install AMPL function libraries in some other directory in case it helps. But then these libraries will have to be symlinked somewhere on the PATH for AMPL to be able to find these libraries.

@vitaut
Copy link
Contributor

vitaut commented Feb 5, 2015

@tkelman AMPL function libraries can be used by solvers even if AMPL itself is not installed.

@tkelman
Copy link
Contributor

tkelman commented Feb 5, 2015

Right, I do that with ASL reasonably often, but I don't think ASL is one of these always-.dll files we're talking about. Are the scripts that make the naming assumptions or code that's doing the dlopening in ASL, or some other component here or in the proprietary parts of AMPL?

@dpo
Copy link
Contributor Author

dpo commented Feb 5, 2015

Thanks @vitaut. If I install everything in libexec, then I can symlink what I need to keep homebrew happy.

@dpo
Copy link
Contributor Author

dpo commented Feb 5, 2015

@vitaut
Copy link
Contributor

vitaut commented Feb 5, 2015

I've added AMPL_LIBRARY_DIR CMake variable that allows you to specify the directory to install AMPL function libraries relative to ${CMAKE_INSTALL_PREFIX}:

$ cmake -DAMPL_LIBRARY_DIR=libexec ...

@dpo, thanks a lot for your work on this!

@tkelman, no, ASL is not one of the .dll libraries. The code to read them is in ASL because solvers may rely on it. Unfortunately these naming assumptions are all over the place, in scripts, in ASL and, perhaps in AMPL, so we'll have to live with them (BTW I dislike this naming convention myself).

Closing for now. Feel free to reopen or open another issue if there are any other problems with this.

@vitaut vitaut closed this as completed Feb 5, 2015
@dpo
Copy link
Contributor Author

dpo commented Feb 5, 2015

Thanks @vitaut. By the way, I just noticed that jacpdim.h isn't installed in include/asl (or anywhere else). Is that intentional?

@vitaut
Copy link
Contributor

vitaut commented Feb 5, 2015

No, it's not intentional. Should be fixed in e983438, thanks for catching this.

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