-
Notifications
You must be signed in to change notification settings - Fork 99
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
Install app or library system-wide #71
Comments
@epagone thanks! Yes, we have to do it. @everythingfunctional how can one do that using |
For the records, on Ubuntu 20.04, if I copy manually my library files ( However, copying the module files to PS: sorry for having repeatedly edited my message, but I have been experimenting a bit and I didn't want to leave confusing or contradictory messages around. |
I think having an install functionality is definitely desired. I believe with stack, For installing libraries, I tend to lean on the side of not doing anything that goes around the system package manager, since there's a decent chance of breaking things. Also, FPM is compiling archives, not shared object libraries. And if you're using FPM, you don't need to have the library installed on your system in order for other packages to use it. That's whole point of FPM. I'm not completely opposed to the idea, but I would need somebody to show me a use case that would constitute good practice. I'd rather FPM not try and also take on the role of system package manager. I think twice about anything that needs |
Ah, I missed this point: this is about Why don't we start with what Cargo does via Finally, that's a good point that if (Most probably we'll have to be able to build both static and dynamic libraries with |
The Linux file system has a well-defined segregation between files installed by package managers and those built by users; as @epagone mentioned user-built executables/libraries/headers go in However this approach can't be used for Fortran libraries because:
I agree with @everythingfunctional that one of the goals of I think install functionality for executables is a natural functionality, I would like:
|
Sorry, but I do not understand. Let's take this example: I have a string manipulation library that I build from source pulling a GitHub repo. I need this library in almost all of my many projects. I think it's obvious to expect from the package manager the ability to make the library available system-wide. (FWIW, I am not using FoBiS exactly because it lacks this functionality.) Am I doing something wrong in my development procedures?
Ouch. Thanks for this explanation, but it's really a bad news! 😞 |
If you're using FPM, then it has the responsibility to provide the appropriate version to compile and link with your project. It does not rely on whatever version happens to be installed on your system. Say for example, the latest version of a library introduced a breaking change that your project relies on. You can continue using the old version for your old project, but use the latest version in your new project, on the same machine, and not have any issues. |
@epagone wrote:
Yes, that's the goal. Fpm must have an option to install a library systemwide or to any location you want. |
I also think it's important to allow both static and dynamic library builds down the road. If I understand this correctly, it seems to me that the high-level debate here is whether fpm should work only within the context of a local, package-specific environment (@everythingfunctional position I think), vs. whether fpm could also install to places elsewhere on the system (regardless whether it's a root or user directory). If you always worked in the package-specific environment, that means that you'd need to rebuild the same dependency for every project that uses it, rather than re-use an existing build. I don't know if Cargo for example can build system-wide, but its canonical behavior is to rebuild everything per-project. For example if you try a demo database or web-server project in Rust, you'll first be building all the 500 dependencies that it needs. Besides the rationale others already provided, another advantage to this is that some libraries take some time to build (for example NetCDF). Rebuilding them for every new project would hurt user experience. I think both approaches should be possible. Default should be like Cargo. How about this UI:
|
I agree with @milancurcic's proposal at the end. Let's start with rebuilding everything for each directory where you call Anyway, I think we can design this so that each of us will get the functionality that we want. |
If we do eventually place built libraries in a central location like |
@LKedward yes, that's necessary. In fact it should be done by hashes, where a hash depends on:
|
I know it might be a bit early but I'd like to log this issue that is particularly important for me.
To use routinely
fpm
, I would need a functionality that works a bit likesudo make install
to install the executable or library system-wide.PS: thanks for your great work!
The text was updated successfully, but these errors were encountered: