pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/42456: lang/fort77 needs lang/f2c but hs no dependency recorded (+FIX)



>Number:         42456
>Category:       pkg
>Synopsis:       lang/fort77 needs lang/f2c but hs no dependency recorded (+FIX)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 15 12:25:00 +0000 2009
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386   (pkgsrc current 2009-12-15)
>Organization:
        Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE 
(JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 
kre%jade.coe.psu.ac.th@localhost:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
        fort77 tries to compile fortran programs, and fails,
        which is not surprising if there's nothing pretending to
        be a fortran compiler (or converter) installed.

        I have held off sending this PR for a while as I observe
        discussions and fixes related to f77 packages happening, but
        as there doesn't seem to be anything particularly related to
        this one, and a pkgsrc freeze is hapening (or about to) I thought
        now would be a good time.

>How-To-Repeat:
        I use pkg_comp with libkver and NetBSD 4.0 release sets installed.
        pkg_comp starts an thalmost empty sandbox, which is the most
        relevant part of its usage for this PR.

        Expect to see ,,,

===> Building for fort77-1.18nb1
(cd tests; ./test.pl -v)
./fort77 -c foo.f ..."foo.o" not generated by "( ./fort77 -c foo.f ) >/dev/null 
2>&1"
./fort77 -c bar.F ..."bar.o" not generated by "( ./fort77 -c bar.F ) >/dev/null 
2>&1"
./fort77 -c -o gargle.o foo.f ..."gargle.o" not generated by "( ./fort77 -c -o 
gargle.o foo.f ) >/dev/null 2>&1"
./fort77 foo.f ..."a.out" not generated by "( ./fort77 foo.f ) >/dev/null 2>&1"
./fort77 baz/bazfoo.f ..."a.out" not generated by "( ./fort77 baz/bazfoo.f ) 
>/dev/null 2>&1"

        and a bunch more similar looking failures.   Of course, when we
        have something run with ">/dev/null 2>&1" we tend to have to
        guess at what went wrong, but just executing one of those
        commands (in the sandbox) at a sh prompt ...

pkg_comp:default.conf# pwd
/pkg_comp/obj/pkgsrc/lang/fort77/4x/fort77-1.18/tests
pkg_comp:default.conf# ./fort77 -c foo.f
foo.f:
f2c: not found
sh: cannot open /tmp/fort77-xtmp-err-629.1: no such file
./fort77: aborting compilation

        which is right, there is no f2c, that's not a NetBSD 4.0
        standard command, and all that pkgsrc has installed is ...

pkg_comp:default.conf# pkg_info
pkg_install-20091115 Package management and administration tools for pkgsrc
libkver-0.6nb1      Shared library and sysctl(1) replacement to override system 
version
digest-20080510     Message digest wrapper utility
checkperms-1.11     Check and correct file permissions
perl-5.10.1         Practical Extraction and Report Language
lintpkgsrc-4.82     Sanity checks on the complete pkgsrc tree
libf2c-20090201nb2  f2c Fortran support library

        Of those, all but libf2c are my "empty" sandbox condition,
        libf2c was installed as a dependency for fort77.

>Fix:

        The following patch fixes the problem for me.   I don't know that
        this is the right way though, perhaps f2c can be added to USE_TOOLS
        or something, or perhaps only some systems need it, but this works...

        I also don't know whether "f2c-*" is adequate as a dependency,
        that is, whether any version of f2c would do (but since all that
        we really seem to need is the command, I assume so).

Index: Makefile
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/lang/fort77/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile    5 Dec 2009 11:35:49 -0000       1.22
+++ Makefile    15 Dec 2009 12:08:01 -0000
@@ -14,6 +14,8 @@
 BUILD_TARGET=          test
 USE_TOOLS+=            perl:run
 
+DEPENDS+=              f2c-*:../../lang/f2c
+
 REPLACE_PERL=          fort77 tests/test.pl
 
 SUBST_CLASSES+=                perl



Home | Main Index | Thread Index | Old Index