Bug 1676568

Summary: File paths in CCfits.h should be changed to prevent compilation errors
Product: [Fedora] Fedora Reporter: David Pearson <dpearson1983>
Component: CCfitsAssignee: Sergio Pascual <sergio.pasra>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 29CC: sergio.pasra
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: CCfits-2.5-11.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-06 06:58:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Altered CCfits.h file with the above mentioned changes none

Description David Pearson 2019-02-12 15:12:48 UTC
Created attachment 1534081 [details]
Altered CCfits.h file with the above mentioned changes

Description of problem:
After a fresh installation of CCfits-devel (along with the required cfitsio and cfitsio-devel) on Fedora 28 or 29 (and going back as long as I can remember), if you compile software using CCfits, the compiler will throw and error that it cannot find fitsio.h or longnam.h due to how these are included in CCfits.h.

Version-Release number of selected component (if applicable):
2.5-7.fc28
2.5.10.fc29

How reproducible:
Always

Steps to Reproduce:
1. Install CCfits, CCfits-devel, cfitsio and cfitsio-devel
2. Try to compile software that uses #include <CCfits/CCfits>

Actual results:
Compiler error saying that it cannot find #include "fitsio.h" and #include "longnam.h"

Expected results:
Software that compiles without errors


Additional info:
This could be solved by simply changing line 13 of CCfits.h from

#include "fitsio.h"

to

#include <cfitsio/fitsio.h>

and changeing line 24 from

#include "longnam.h"

to 

#include <cfitsio/longnam.h>

since that is the path to the headers as installed by the cfitsio-devel package, and the /usr/include is included in the search path by default. This would save the user from having to alter CCfits.h themselves, or having to add /usr/include/cfitsio to their search path.

Comment 1 Sergio Pascual 2019-02-13 17:18:12 UTC
Thank you for your report.

I have built a patched package here

https://koji.fedoraproject.org/koji/taskinfo?taskID=32786573

Please check that works as intended

Comment 2 David Pearson 2019-02-20 21:33:24 UTC
Sorry for taking so long to get around to this.

I have downloaded the the srpm from the link you provided, built the rpm, and then installed. It still has the same issues with the header file. Perhaps I downloaded the wrong thing?

Comment 3 Sergio Pascual 2019-02-21 11:48:43 UTC
(In reply to David Pearson from comment #2)
> Sorry for taking so long to get around to this.
> 
> I have downloaded the the srpm from the link you provided, built the rpm,
> and then installed. It still has the same issues with the header file.
> Perhaps I downloaded the wrong thing?

Ups, no, I added the patch but I didn't apply it in the RPM. Could you try this instead?

https://koji.fedoraproject.org/koji/buildinfo?buildID=1214320

Comment 4 David Pearson 2019-02-21 14:07:45 UTC
That did it! Everything works as expected now.

Comment 5 Fedora Update System 2019-02-25 16:12:38 UTC
CCfits-2.5-11.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-b6c6ebcad2

Comment 6 Fedora Update System 2019-02-26 04:11:17 UTC
CCfits-2.5-11.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-b6c6ebcad2

Comment 7 Fedora Update System 2019-03-06 06:58:04 UTC
CCfits-2.5-11.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.