Bug 442526

Summary: Building examples with provided libarpack fails
Product: [Fedora] Fedora Reporter: Christophe Trophime <christophe.trophime>
Component: arpackAssignee: Axel Thimm <axel.thimm>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 9CC: dominik
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-15 08:22:42 UTC Type: ---
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
new proposed patch for second-bug
none
undefined reference to etime_ fix
none
specfile patch for the above none

Description Christophe Trophime 2008-04-15 11:30:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080327 Remi/2.0.0.13-1.fc5.remi Firefox/2.0.0.13

Description of problem:
When trying to build the examples the linker complains about missing etime_
in libarpack.a

A simple work-around is to remove "second.f" which is already provided by lapack.
But the trouble is that the examples do not run properly (error -9999).

Version-Release number of selected component (if applicable):


How reproducible:
Always


Steps to Reproduce:
1.apply examples.patch to create makefile in ARPACK/EXAMPLES :
diff -up /dev/null ARPACK/EXAMPLES/ARmake.inc
--- /dev/null	2008-04-15 09:33:37.594008743 +0200
+++ ARPACK/EXAMPLES/ARmake.inc	2008-04-15 10:57:58.000000000 +0200
@@ -0,0 +1,138 @@
+###########################################################################
+#
+#  Program:         ARPACK
+#
+#  Module:          ARmake.inc
+#
+#  Purpose:         Top-level Definitions
+#
+#  Creation date:   February 22, 1996
+#
+#  Modified:
+#
+#  Send bug reports, comments or suggestions to arpack.edu
+#
+############################################################################
+#
+# %---------------------------------%
+# |  SECTION 1: PATHS AND LIBRARIES |
+# %---------------------------------%
+#
+#
+# %--------------------------------------%
+# | You should change the definition of  |
+# | home if ARPACK is built some place   | 
+# | other than your home directory.      |
+# %--------------------------------------%
+#
+home = $(RPM_BUILD_DIR)/ARPACK
+#
+#  %--------------------------------------%
+#  | The platform identifier to suffix to |
+#  | the end of library names             |
+#  %--------------------------------------%
+#
+PLAT = SUN4
+#
+#  %------------------------------------------------------%
+#  | The directories to find the various pieces of ARPACK |
+#  %------------------------------------------------------%
+#
+BLASdir      = $(home)/BLAS
+LAPACKdir    = $(home)/LAPACK
+UTILdir      = $(home)/UTIL
+SRCdir       = $(home)/SRC
+#
+#DIRS        = $(BLASdir) $(LAPACKdir) $(UTILdir) $(SRCdir)
+#
+# %-------------------------------------------------------------------%
+# | Comment out the previous line and uncomment the following         |
+# | if you already have the BLAS and LAPACK installed on your system. |
+# | NOTE: ARPACK assumes the use of LAPACK version 2 codes.           |
+# %-------------------------------------------------------------------%
+#
+DIRS         = $(UTILdir) $(SRCdir)
+#
+# %---------------------------------------------------%
+# | The name of the libraries to be created/linked to |
+# %---------------------------------------------------%
+#
+ARPACKLIB  = $(home)/static/libarpack.a
+LAPACKLIB = -llapack
+BLASLIB = -lblas
+#
+ALIBS =  $(ARPACKLIB) $(LAPACKLIB) $(BLASLIB) 
+#
+# 
+# %---------------------------------------------------------%
+# |                  SECTION 2: COMPILERS                   |
+# |                                                         |
+# | The following macros specify compilers, linker/loaders, |
+# | the archiver, and their options.  You need to make sure |
+# | these are correct for your system.                      |
+# %---------------------------------------------------------%
+#
+#
+# %------------------------------%
+# | Make our own suffixes' list. |
+# %------------------------------%
+#
+.SUFFIXES:
+.SUFFIXES:	.f	.o
+#
+# %------------------%
+# | Default command. |
+# %------------------%
+#
+.DEFAULT:
+	@$(ECHO) "Unknown target $@, try:  make help"
+#
+# %-------------------------------------------%
+# |  Command to build .o files from .f files. |
+# %-------------------------------------------%
+#
+.f.o:
+	@$(ECHO) Making $@ from $<
+	@$(FC) -c $(FFLAGS) $<
+#
+# %-----------------------------------------%
+# | Various compilation programs and flags. |
+# | You need to make sure these are correct |
+# | for your system.                        |
+# %-----------------------------------------%
+#
+FC      = gfortran
+FFLAGS	= -O -cg89
+
+LDFLAGS = 
+CD      = cd
+
+ECHO    = echo
+
+LN      = ln
+LNFLAGS = -s
+
+MAKE    = make
+
+RM      = rm
+RMFLAGS = -f
+
+SHELL   = /bin/sh
+#
+#  %----------------------------------------------------------------%
+#  | The archiver and the flag(s) to use when building an archive   |
+#  | (library).  Also the ranlib routine.  If your system has no    |
+#  | ranlib, set RANLIB = touch.                                    |
+#  %----------------------------------------------------------------%
+#
+AR = ar 
+ARFLAGS = rv
+#RANLIB  = touch
+RANLIB   = ranlib
+#
+# %----------------------------------%
+# | This is the general help target. |
+# %----------------------------------%
+#
+help:
+	@$(ECHO) "usage: make ?"
diff -up ARPACK/EXAMPLES/BAND/makefile.ex ARPACK/EXAMPLES/BAND/makefile
--- ARPACK/EXAMPLES/BAND/makefile.ex	1996-09-24 16:33:20.000000000 +0200
+++ ARPACK/EXAMPLES/BAND/makefile	2008-04-15 10:57:58.000000000 +0200
@@ -16,7 +16,7 @@
 #\SCCS Information: @(#) 
 # FILE: makefile   SID: 2.2   DATE OF SID: 9/24/96   RELEASE: 2 
 #
-include ../../ARmake.inc
+include ../ARmake.inc
 
 # Issue "make band" to make all 32 band drivers.
 # Issue "make ssbdr" to make 6 single precision symmetric band drivers.
@@ -27,6 +27,25 @@ include ../../ARmake.inc
 # Issue "make znbdr" to make 4 double precision complex band drivers. 
 #
 
+TESTS = ssbdr1 ssbdr2 ssbdr3 ssbdr4 ssbdr5 ssbdr6 \
+        dsbdr1 dsbdr2 dsbdr3 dsbdr4 dsbdr5 dsbdr6 \
+	snbdr1 snbdr2 snbdr3 snbdr4 snbdr5 snbdr6 \
+	dnbdr1 dnbdr2 dnbdr3 dnbdr4 dnbdr5 dnbdr6 \
+	cnbdr1 cnbdr2 cnbdr3 cnbdr4 \
+	znbdr1 znbdr2 znbdr3 znbdr4 \
+
+all:	band
+	
+
+run:	
+	@( \
+	for f in ${TESTS}; \
+	do \
+	   echo "Running $$f"; \
+	   ./$$f; \
+	done )
+
+
 band: ssbdr dsbdr snbdr dnbdr cnbdr znbdr
 
 #
diff -up ARPACK/EXAMPLES/COMPLEX/makefile.ex ARPACK/EXAMPLES/COMPLEX/makefile
--- ARPACK/EXAMPLES/COMPLEX/makefile.ex	1996-09-24 16:35:16.000000000 +0200
+++ ARPACK/EXAMPLES/COMPLEX/makefile	2008-04-15 10:57:58.000000000 +0200
@@ -16,13 +16,26 @@
 #\SCCS Information: @(#) 
 # FILE: makefile   SID: 2.2   DATE OF SID: 9/24/96   RELEASE: 2 
 #
-include ../../ARmake.inc
+include ../ARmake.inc
+TESTS = cndrv1 cndrv2 cndrv3 cndrv4 \
+        zndrv1 zndrv2 zndrv3 zndrv4
 #
 # Issue "complex" to make all 8 complex drivers.
 # Issue "cndrv" to make 4 single precision complex drivers.
 # Issue "zndrv" to make 4 double precision complex drivers.
 #
 
+all:	complex 
+	
+run:	
+	@( \
+	for f in ${TESTS}; \
+	do \
+	   echo "Running $$f"; \
+	   ./$$f; \
+	done )
+	
+
 complex: cndrv zndrv 
 
 #-----------------------------------------------------------------------
diff -up ARPACK/EXAMPLES/NONSYM/makefile.ex ARPACK/EXAMPLES/NONSYM/makefile
--- ARPACK/EXAMPLES/NONSYM/makefile.ex	1996-09-24 16:36:27.000000000 +0200
+++ ARPACK/EXAMPLES/NONSYM/makefile	2008-04-15 10:57:58.000000000 +0200
@@ -16,12 +16,26 @@
 #\SCCS Information: @(#) 
 # FILE: makefile   SID: 2.2   DATE OF SID: 9/24/96   RELEASE: 2
 #
-include ../../ARmake.inc
+include ../ARmake.inc
+TESTS = sndrv1 sndrv2 sndrv3 sndrv4 sndrv5 sndrv6 \
+        dndrv1 dndrv2 dndrv3 dndrv4 dndrv5 dndrv6
+
 #
 # Issue "make nonsym" to make all 12 nonsymmetric drivers.
 # Issue "make sndrv" to make 6 single precision nonsymmetric drivers.
 # Issue "make dndrv" to make 6 double precision nonsymmetric drivers.
 #
+all:	nonsym 
+	
+run:	
+	@( \
+	for f in ${TESTS}; \
+	do \
+	   echo "Running $$f"; \
+	   ./$$f; \
+	done )
+	
+
 nonsym: sndrv dndrv 
 #
 #-----------------------------------------------------------------------
diff -up ARPACK/EXAMPLES/SIMPLE/makefile.ex ARPACK/EXAMPLES/SIMPLE/makefile
--- ARPACK/EXAMPLES/SIMPLE/makefile.ex	1996-09-24 16:47:00.000000000 +0200
+++ ARPACK/EXAMPLES/SIMPLE/makefile	2008-04-15 10:57:58.000000000 +0200
@@ -7,7 +7,19 @@
 #\SCCS Information: @(#) 
 # FILE: makefile   SID: 2.2   DATE OF SID: 9/24/96   RELEASE: 2
 #
-include ../../ARmake.inc
+include ../ARmake.inc
+TESTS = sssimp dssimp snsimp dnsimp cnsimp znsimp
+
+all:	simple
+	
+run:	
+	@( \
+	for f in ${TESTS}; \
+	do \
+	   echo "Running $$f"; \
+	   ./$$f; \
+	done )
+
 #
 # simple drivers
 #
diff -up ARPACK/EXAMPLES/SVD/makefile.ex ARPACK/EXAMPLES/SVD/makefile
--- ARPACK/EXAMPLES/SVD/makefile.ex	1996-09-24 16:47:53.000000000 +0200
+++ ARPACK/EXAMPLES/SVD/makefile	2008-04-15 10:57:58.000000000 +0200
@@ -7,7 +7,18 @@
 #\SCCS Information: @(#) 
 # FILE: makefile   SID: 2.2   DATE OF SID: 9/24/96   RELEASE: 2
 #
-include ../../ARmake.inc
+include ../ARmake.inc
+TESTS = ssvd dsvd
+
+all:	ssvd dsvd
+	
+run:	
+	@( \
+	for f in ${TESTS}; \
+	do \
+	   echo "Running $$f"; \
+	   ./$$f; \
+	done )
 
 ssvd: ssvd.o
 	$(FC) $(FFLAGS) ssvd.o $(ALIBS) -o ssvd
diff -up ARPACK/EXAMPLES/SYM/makefile.ex ARPACK/EXAMPLES/SYM/makefile
--- ARPACK/EXAMPLES/SYM/makefile.ex	1996-08-21 18:42:49.000000000 +0200
+++ ARPACK/EXAMPLES/SYM/makefile	2008-04-15 11:05:35.000000000 +0200
@@ -10,7 +10,21 @@
 #\SCCS Information: @(#) 
 # FILE: makefile   SID: 2.1   DATE OF SID: 11/19/95   RELEASE: 2
 #
-include ../../ARmake.inc
+include ../ARmake.inc
+TESTS = ssdrv1 ssdrv2 ssdrv3 ssdrv4 ssdrv5 ssdrv6 \
+        dsdrv1 dsdrv2 dsdrv3 dsdrv4 dsdrv5 dsdrv6
+
+
+all:	sym
+	
+run:	
+	@( \
+	for f in ${TESTS}; \
+	do \
+	   echo "Running $$f"; \
+	   ./$$f; \
+	done )
+
 #
 # Issue "make sym" to make all 12 symmetric drivers
 # Issue "make ssdrv" to make 6 single precision symmetric drivers

2.# Build examples
echo "Running tests"
cd EXAMPLES
examples="BAND COMPLEX NONSYM SIMPLE SVD SYM"
for dir in $examples; do
   cd $dir
   make -f makefile FC=gfortran FFLAGS="%{optflags}" LDFLAGS="-s" all
   echo "Running tests in $dir"
   make -f makefile run
   cd ..
done
cd ..
 
3.

Actual Results:
gfortran -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables ssbdr1.o ssband.o /home/trophime/rpmbuild/BUILD/ARPACK/static/libarpack.a -llapack -lblas  -o ssbdr1
/home/trophime/rpmbuild/BUILD/ARPACK/static/libarpack.a(second.o): In function `secnd2':
/home/trophime/rpmbuild/BUILD/ARPACK/static/../UTIL/second.f:29: undefined reference to `etime_'
collect2: ld returned 1 exit status


Expected Results:
No error messages

Additional info:
To work around this bug simply :
1) remove the arpack-second.patch.
2) remove the file UTIL/second.f from the source
3) remove "second.o" in Util/Makefile

Then the examples are compiled and linked without any errors.
However the examples do not run!! They all end up with "-9999" error code

Comment 1 Christophe Trophime 2008-04-17 14:56:27 UTC
Created attachment 302758 [details]
new proposed patch for second-bug

Comment 2 Christophe Trophime 2008-04-17 15:02:02 UTC
the previous suggested work-around do not work.
Applying the suggested patch solve the linking problems and enable the tests to
run smoothly. Bassically it consists in changing the declaration of ETIME in
UTIL/second.f (from EXTERNAL to INTRINSIC)


Comment 3 Bug Zapper 2008-05-14 09:28:26 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Dominik 'Rathann' Mierzejewski 2008-09-24 23:50:19 UTC
Created attachment 317638 [details]
undefined reference to etime_ fix

Actually the missing etime_ comes from the new gfortran, where it is an INTERNAL function instead of EXTERNAL. See http://gcc.gnu.org/ml/fortran/2007-03/msg00305.html for example. Attached is a patch to fix that along with a patch to current rawhide specfile.

Comment 5 Dominik 'Rathann' Mierzejewski 2008-09-24 23:50:59 UTC
Created attachment 317639 [details]
specfile patch for the above

Comment 6 Dominik 'Rathann' Mierzejewski 2008-12-05 10:17:11 UTC
This has now bitten me while updating freefem++, so I'll fix it myself over the weekend.

Comment 7 Dominik 'Rathann' Mierzejewski 2008-12-08 11:37:58 UTC
I haven't noticed that Axel seems to have fixed this (using my patch, apparently), but only for F-10. We need this fix propagated at least to F-9.

Comment 8 Fedora Update System 2008-12-08 16:58:57 UTC
arpack-2.1-10.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/arpack-2.1-10.fc9

Comment 9 Fedora Update System 2008-12-09 11:31:45 UTC
arpack-2.1-10.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update arpack'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-11011

Comment 10 Fedora Update System 2008-12-30 23:53:54 UTC
arpack-2.1-10.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Bug Zapper 2009-06-10 00:11:42 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Bug Zapper 2009-07-15 08:22:42 UTC
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.