Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41146 - different suggestion for resolving netcdf/hdf4 conflict
Summary: different suggestion for resolving netcdf/hdf4 conflict
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-10 12:06 UTC by Ryan May
Modified: 2004-05-23 23:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Modified ebuild for hdf-4.2.0 (hdf-4.2.0-r1.ebuild,1003 bytes, application/octet-stream)
2004-02-10 12:08 UTC, Ryan May
Details
Patch to update the ebuild's handling of included netcdf files (hdf4-netcdf-fix.patch,940 bytes, patch)
2004-02-17 20:51 UTC, Ryan May
Details | Diff
Another way to resolve netcdf conflict and ... (hdf-4.2.0-r1.patch,866 bytes, patch)
2004-03-25 19:30 UTC, Castelão
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan May 2004-02-10 12:06:25 UTC
As the ebuild is currently written, the library libmfhdf.a is not produced when the package is emerged.  The reason is clear:

src_unpack() {
	unpack ${A}
	cd ${S}
	# collides with netCDF
	sed -i 's/\(^SUBDIR.*\)mfhdf\(.*\)/\1\2/' Makefile.in
}

Since the ebuild eliminates the lines mentioning mfhdf from the makefile, the library is not produced.

I'm not sure why the developer thinks this is necessary (at least now).  I have netcdf installed on this system as well, and the file libmfhdf.a is nowhere to be found.  This includes looking at the listing produced by:

qpkg -l netcdf

As far as I can tell, the ebuilds will no longer collide if libmfhdf.a is produced by the hdf-4.2.0 package, so the line in src_unpack() should be eliminated, so that the hdf package produces a complete library install.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Ryan May 2004-02-10 12:08:39 UTC
Created attachment 25355 [details]
Modified ebuild for hdf-4.2.0

Ebuild for hdf-4.2.0 modified to produce libmfhdf.a
Comment 2 Patrick Kursawe (RETIRED) gentoo-dev 2004-02-11 03:06:23 UTC
The problem is not the lib, but several other files from netcdf which are overwritten:

epm -V netcdf
..5....T   /usr/bin/ncgen
..5....T   /usr/bin/ncdump
..5....T   /usr/share/man/man1/ncgen.1.gz
..5....T   /usr/share/man/man1/ncdump.1.gz
..5....T   /usr/include/netcdf.inc
..5....T   /usr/include/netcdf.h

I decided to check for netcdf presence during installation and to remove these files from the hdf tree before merging if netcdf is there.

Btw, please submit patches for ebuilds rather than ebuilds if you can, and attach them as text files, not as binaries.

Thanks for pointing out this problem.
-r1 should be out soon.
Comment 3 Ryan May 2004-02-17 15:53:09 UTC
Having worked with the package a little bit more, I have a suggestion:

Why not rename the offending ncdump and ncgen (and their associated man pages) to hdfdump and hdfgen, respectively?  The binary utilities actually come in handy, as the ncdump and ncgen that come with the netcdf package don't work with hdf4 files, while the ncdump and ncgen that come with the hdf4 package do.
Comment 4 Ryan May 2004-02-17 20:51:06 UTC
Created attachment 25828 [details, diff]
Patch to update the ebuild's handling of included netcdf files

Ok, so I didn't quite have it right before. Since the included executables do
provide some unique functionality for hdf files (ie. dumping information from
hdf files in a format compatible with ncgen), we should probably rename the
executables (and their man pages) so that a future install of netcdf doesn't
overwrite them.  I created a patch that performs the described functions and
performs them regardless of the presence of netcdf.
Comment 5 Patrick Kursawe (RETIRED) gentoo-dev 2004-02-17 23:14:09 UTC
I'll just have to believe what you say about ncgen/ncdump because there's nothing on the manual pages about hdf files at all - thank you for the patch, you nearly got it (the manpages don't have .gz suffix yet at this time of installation). Very nice idea, though, will be in portage as -r2 soon.
Comment 6 Castelão 2004-03-25 19:30:33 UTC
Created attachment 28034 [details, diff]
Another way to resolve netcdf conflict and ...

Resolve netcdf conflict in configure;
IUSE to szip;
versions included in dependence packages;
Maybe we should include gcc-3.3 in dependeces too. I remember that there are
some problems at mh-linux with gcc-3.2
Comment 7 Patrick Kursawe (RETIRED) gentoo-dev 2004-03-26 03:34:50 UTC
Please re-open a bug whenever you add comments to a closed bug, otherwise this easily gets unnoticed. Will have a look at this later.
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2004-05-17 04:47:19 UTC
Maybe we should have a global szip USE flag since opendx could also utilise this. Just mailed an RFD to gentoo-dev.
Comment 9 Patrick Kursawe (RETIRED) gentoo-dev 2004-05-23 23:57:30 UTC
Made szip optional now. I would like to know more about gcc version problems before stating this as a dependency.