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
cmake build doesn't install arpack.pc #63
Comments
oups, sorry, it's not actually fixed |
I'm afraid it isn't: |
@turboencabulator do you know why this is still commented? |
Check out the lines further up that are also commented. We need to populate things like the package version and the flags to link against blas/lapack. I don't know how to do this using cmake. Until those get filled in appropriately, the file it generates will not be useful. |
*.pc files are autotools, *.cmake are cmake equivalent. For me, cmake is not supposed to provide *.pc (<=> autotools would be supposed to provide *.cmake). If you want pc files, just use autotools. |
Actually pkg-config, not autotools. The former is independent from the latter. Unlike autoools, pkg-config is not even GNU.
This view is quite harmful. It forces the programs which depend on ARPACK to completely ignore both CMake modules and I'd suggest installing both (or whatever you have) in both modes to ease the life of ARPACK users. Then the users will simply use the method they prefer without asking how the target OS has configured its ARPACK package. |
Users should install both with autotools / cmake so this issue can be closed : no issue here ! Cmake / autotools should install only files they are responsable of. |
Erm, that sounds strange. Not only are there two build systems in ARPACK (which is already redundant), but the users should compile the library twice simply to get all the detection/configuration methods supported by it installed... And once again, pkg-config has no relation with autotools. All this sounds really weird to me, what am I missing? |
Sounds as logical as minimal: be responsible of your stuff only ! Lots of soft do that : check out hdf5 for instance |
Surely maintaining two different build systems is more work than one (you have to make changes in two places). Also, having to build twice using different build systems to get all the pieces sound illogical to me. If hdf5 does that then it's a special snowflake. Most projects I know use either autotools or cmake, but not both and if they use cmake, they generate .pc files, too. .pc files are for pkg-config (or it's replacement pkgconf) and they don't depend on either autotools or cmake (and vice versa). |
I agree. We should aim at removing autoconf support in the next major
release of arpack-ng.
Sylvestre
|
Sure, it's true for changing version number, soname, ...
The decision is yours ! My understanding (not 100% sure !) is that:
Not sure there is a yes-or-no answer here. To me, autotools must be dropped when you need to write some m4 to find exotic stuffs (GPU, FPGA): m4 is so cryptic that nobody can maintain this !... So dropping autotools seems healthy :D |
CMake does support cross-compilation, see their documentation Wiki. |
@rathann : does not mean no, I you need this feel free to PR it ! I guess (?) @sylvestre would take that |
Sure, let's do it. |
I haven't been following this conversation and can't tell what has been decided, but I need to correct some of the comments above. The purpose of arpack.pc and CMake's equivalent is to help out packages that depend on this one. pkg-config is stand-alone. To me, it looks like CMake is trying to create its own competing standard that is less functional and really pointless if CMake can use pkg-config directly. The arpack-ng-config.cmake stuff is tied to CMake. If my project links to arpack, then my project has to use CMake to get any benefit from these files. With arpack.pc, my project doesn't have to be tied to any particular build system to get the benefit. I can write a makefile by hand that calls pkg-config if I want. Suppose my project has an optional dependency on arpack and wants to check if arpack exists so it can use it if it does exist. I know pkg-config can do this, but I don't know how to do it in CMake. What happens if my CMake script tries to include the arpack detection stuff, but arpack and the arpack-ng-config.cmake files aren't installed? If it breaks my CMake script, then there is no benefit to having arpack install those CMake files at all; I should write my own arpack detection, or hope that arpack.pc is installed so CMake can try detecting it that way instead. arpack.pc should be installed regardless of which build system you used to build your arpack package. We need to fix the CMake scripts to create and install this file correctly, then consider whether the arpack-ng-config.cmake stuff is still necessary. Autotools has nothing to do with this, and removing it would not solve anything. |
To me, "yes" or "no" could both be the correct answer !... Why "no" could be the correct answer :
It does not happen: *.cmake files are always installed by CMake. They enable CMake users to use the find_package mechanism so I guess it's a good thing to keep (natural way to do thing for CMake users who will choose to install arpack-ng... Likely with CMake, not autotools !). But, then, why to provide *.pc file, you are not supposed to need it anymore (in "theory"... But possibly not in "real world" situations !)
In 99% cases, your environment is wrong !... And CMake can not be blamed for that. Why "yes" could be the answer :
You are right ! I do not use Makefiles for so long that I forgot this case ! :D
Yes, it can ! An example here : Line 68 in dfc8abd
To me it depends on "your philosophy" : are you CMake only ? If so you don't need *.pc files (as you decide to rely on *.cmake files via find_package). Are you autotools only ? If so, you don't need *.cmake files. Or do you like (or are you compelled ?) to mix CMake/autotools flavors ?... If so you need both: that's why good admin sys (!) I know do install packages with both autotools and CMake : to maximize chances users will have to "find" what they need. It's never clear who you "want" to be, and, who you "can" be in real world situation (= real world messy/hurry users working on real world dirty-installed computer).
I guess this could work but I can't test it... And I do not PR something I can't test ! :D
@rathann : you could (??) test that... And discover that it's not yet doing what you want. If you get something to work, you could PR it !... |
@fghoussen Thanks for the initial patch. It looks like CMakeLists.txt needs quite a few more fixes. I'll send a PR soon. |
I still can't use |
The arpack-ng-config.cmake stuff may or may not be necessary, but if it is going to be distributed at all, then just as cmake should distribute universal pkg-config files, autotools should distribute custom cmake files. The user should not care how arpack was built when deciding which build system to use, and this goes both ways. If cmake projects are expected to use *-config.cmake files, then they should always be available. If they cannot depend on e.g. Linux distributions building with cmake, then even cmake users will be forced to use the pkg-config files, which goes against the purpose of installing the cmake files at all. I would like to note that the cmake files are literally just configuring the information which in autotools is the |
Fixed by #350 |
After configuring arpack-ng 3.5.0 using cmake,
make install
doesn't install thearpack.pc
file. Indeed, the relevant lines are commented out in CMakeLists.txt:The text was updated successfully, but these errors were encountered: