-
Notifications
You must be signed in to change notification settings - Fork 49
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
Auto #22
Auto #22
Conversation
@zbeekman Haven't looked at individual commits but the current snapshot of the |
@milancurcic It's your project, so I'm cool with it if you are. |
@blippy Is there supposed to be a |
@milancurcic There is no configure script in the repo. That's standard practise, I believe. You create the configure script by issuing the command: autoreconf -i |
@blippy Got it, I wasn't aware of autoreconf. I just tried this and am getting this error:
Do you know what this means? My autoconf version is 2.69. |
Oh. that's weird. I'll investigate. |
Nevermind, I had to install automake. |
To run autoreconf, you need autoconf and automake. Ensure they are installed in your distro: Note that users of your package won't require those packages: 'configure' doesn't need them. I would have thought that autoconf and automake were dependcies of autorecong, so maybe it's a distro packaging error?? You were using Fedora, if I recall? |
Yes, and I found the solution on a Fedora forum! 😄
But configure is currently not part of the repo but generated. Should it be part of the repo? |
BTW, I have successfully installed the library using I noticed that using default install path moved both |
I think the usual answer to this question is "no" and that automaker is listed as a build dependency. |
AFAIK, there is no agreed upon convention for Fortran .mod files. Some put them in To prevent name clashes (because you might have more than one package providing a To get around the other issue, of no standard Fortran module ABI, I often create additional subdirectories with the compiler name and compiler version:
These are just my suggestions... of course the "average" user in linux land, will probably only have GCC/GFortran and the compiler issue "goes away". |
@zbeekman Right. And of course, the user is responsible for specifying the install directory using I find it interesting what you say about the configure script. I could swear that (almost) every package I compiled using this build suite had the configure script inside the tarball (e.g. zlib, libpng, jasper, hdf5 and netcdf before they moved to CMake etc.) If the configure script is to be generated by the user after cloning the repo, then it makes sense to mention this in the INSTALL file, no? For example, it wasn't obvious to me how to make the configure script. 😄 |
The configure script is in the tarball, because the tarball is generated with My preference is always to namespace mod files by |
I find it interesting what you say about the configure script. I could swear that (almost) every package I compiled using this build suite had the configure script inside the tarball. Ah, but the configure script is part of the tarball :) It's just not part of the git repo. To create a tarball, issue the command: make dist You will see its existence: tar tvf datetime-fortran-1.3.0T.tar.gz | grep configure -rwxr-xr-x 3003/4003 127383 2016-01-25 16:47 datetime-fortran-1.3.0T/configure -rw-r--r-- 3003/4003 627 2016-01-25 15:26 datetime-fortran-1.3.0T/configure.ac |
@milancurcic to elaborate more, use |
Ahhhh OK, this all makes sense now, thanks you guys! 😄 |
@milancurcic If you do sudo make install please advise me of your output from pkg-config --cflags datetime-fortran |
It works only after adding the path manually myself, see below:
|
@zbeekman To get around the other issue, of no standard Fortran module ABI, I often create additional subdirectories with the compiler name and compiler version: lin/datetime-fortran/gcc/5.3/datetime_module.mod The problem with this approach is that it messes up linking. Configuration tools expect files to be in standard locations via pkg-config. They can consult pkg-config --cflags datetime-fortran etc to find out what the link flags should be. AFAIK they don't have the ability to distinguish between compiler vendor or versions, they have to assume a "one size fits all". Distros will provide only one gfortran, for example, and everything is supposed to work against that. Distros should then update their dependencies if they, say, upgrade gfortran. Since datetime-fortran is a depency on gfortran, packagers should then recompile it for the new version. The upshot being that there should be one gfortran version, and one datetime-fortran, which is compatible with the compiler. There's nothing to stop you specifying your own prefix installation when you compile datetime-fortran to account for the corner case you have. You can then link against the appropriate library. But for the general case, I think we'd have to assume a distro provideas a canonical compiler that users are expected to use. Comments? |
@milancurcic It works only after adding the path manually myself, see below Good. I know it seems if we've done a lot of work to apparently have to go around setting Fortunately, if this repo is packaged by distro maintainers, most people won't have this problem, because it will be installed to /usr prefix, where the package configuration will be picked up automatically. So, alas, whilst it might be a bit of a pain for you and I to get everything set up "properly", it should be great for packagers. |
@milancurcic I have successfully installed the library Huzzah! Teh good news is that Makefile.am are really mostly the Makefiles you had already produced. They needed just a little tweaking to get autotools to co-operate. From now on, things should "mostly" just work. If you start moving around directories, though, you'll undoubtedly have to tinker with configure.ac. BTW, it seems as though autotools has a checking facility, too, so you could potentitally issue the command make check and autotools will run your datetime_tests and produce either a pass or a fail result. I haven't looked into that much, though. I'm just aware that this type of facility exists. |
@milancurcic wrote: Shouldn't datetime_module.mod go to /usr/local/include instead? @zbeekman wrote: "AFAIK, there is no agreed upon convention for Fortran .mod files. Some put them in include/ and some in lib/ my preference is lib/ FWIW (not much). Good question. I remember installing HDF5 (?) I think it was, and the mod files were installed in a separate subdirectory. I was really frustrated, because I think the developers made it awkward for us consumers. I had to set flags to separate directories, and I was generally frustrated that it was more work than I thought was strictly necessary. Having thought about it, I think (I'll need to investigate) that the mods probably should go in /usr/local/include. Why? Because if I'm correct in my thinking, the mod file is needed at the compiling stage rather than the linking state. So, if someone does a separate compilation from linking, then the mod file is better off at the include part rather than the linking part. I'll try it out, but I suspect that I should probably change how it is installed. |
datetime_fortran.mod is now installed to $prefix/include so that it can be picked up at the compilation step
Upon further consideration, I discovered that it is better for datetime_fortran.mod to go into the ${prefix}/include directory so that it can be picked up during the compilation step. My latest commit makes this change. |
I tested the most recent change, works as expected - |
Great job @blippy. Thank you!
Thanks for the merge and the release. I'm keen to create a package for it for Arch Linux :-) If you have any further problems with the build, then let me know, and I'll do my best to resolve them. |
Absolutely, thank you!! On Tue, Jan 26, 2016 at 1:28 PM, blippy notifications@github.com wrote:
|
So it seems we are just shy of the "popularity quotient" for being accepted into Homebrew: $ brew audit --online --strict datetime-fortran
==> brew style datetime-fortran
1 file inspected, no offenses detected
==> audit problems
datetime-fortran:
* GitHub repository not notable enough (<10 forks, <10 watchers and <20 stars)
Error: 1 problem in 1 formula Please encourage anyone you know to watch, fork and star the repo to get us over the threshold. |
@zbeekman 😞 Thanks, I will work on these! I wasn't aware that a packaging system would have a limitation of this kind. How did you get Opencoarrays in? |
Open Coarrays is not in to homebrew yet. But I think it meets the popularity contest metric. I don't think all 3 need to be satisfied, I think just one will do. In the meantime, could you please |
Also, we can create a "tap" for datetime-fortran but that will preclude it from being included in Homebrew in the future. My suggestion is we wait for a few more stars etc. to roll in. I tried to drum up some interest on twitter. |
One more request... it looks like line 2 of |
@zbeekman Looks like we are at 20 stars now. Will that do? Special thanks and 🍻 for @mvanlierwalq. |
What does tap mean? |
@zbeekman yes, I think you're spot on. Update line 2 of configure.ac with the release version number. Then typing Basically, |
I've never created a file for release on github, so I don't know how that particular mechanism works. But, the file they "should" have is the one produced by make dist. That should (at least in principle) give precisely what people need. |
I just tried making a release using |
@milancurcic Yes, I agree, those files should be included. I'll look into that. |
@milancurcic & @blippy Great, we're almost there for a Homebrew release. I know you can use @milancurcic one more thing that would make my life easier would be a minimal example code to compile and link against datetime-fortran. It only needs to be a few lines, but if you could provide a very good, small one and the compilation line that would be great. (Homebrew requires that you test the installation itself, |
I think a tarball release asset will have to be manually added to the release. I think the tarballs github auto-generates are from |
@zbeekman I think example codes are a good idea, and I'm happy to help out with that. One thing to note is that when you do I do agree, though, that it would be nice to have some demo code so that people can see exactly what they need to do to get their code to compile. I appreciate that it can be quite frustrating when people are left to puzzle out exactly how to link against a library. |
@blippy I agree, but I am just talking about what is needed for Homebrew to accept the "formula". It needs to have a |
Hmmm, I'm beginning to see the problem here. Autotools has The problem is, we don't want to add configure as a dependency to the tree, but we do want it in the tarball. Grrr. Let me think about this. Does anyone know the answer to this problem? |
If you can find a way to get |
@milancurcic and @blippy: I've got the Homebrew formula all set, including the test do block etc. All I'm waiting on now is for @milancurcic to mint a release that includes @blippy also, one more question for you: Will pkg-config always be a build dependency, or just when Here is what I have so far: https://gist.github.com/bbe7dd7a0eaee9061b9e |
Please see #23 for the issue about packaging. I think it is best that we split issues out, since this one is technically closed. |
Please see #24 I think it is best that we split issues out, since this one is technically closed. |
An experimental branch to incorporate autotools.