[Bug 558061] Review Request: levmar - Levenberg-Marquardt nonlinear least squares optimization

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

 



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=558061

--- Comment #5 from Jussi Lehtola <jussi.lehtola@xxxxxx> 2010-01-24 05:01:31 EST ---
levmar.x86_64: W: shared-lib-calls-exit /usr/lib64/liblevmar.so.2.2
exit@xxxxxxxxxxx
levmar-debuginfo.x86_64: E: debuginfo-without-sources
levmar-devel.x86_64: W: no-documentation
4 packages and 0 specfiles checked; 1 errors, 2 warnings.

The first warning is just a sign of unrefined coding (quite normal in
scientific packages). The third one is OK.

The second one, however, needs to be fixed. The build is not using the Fedora
optimization flags:

gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall  -c lm.c -o
sobj/lm.o
gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall  -c Axb.c -o
sobj/Axb.o
gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall  -c misc.c -o
sobj/misc.o
gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall  -c lmlec.c -o
sobj/lmlec.o
gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall  -c lmbc.c -o
sobj/lmbc.o
gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall  -c lmblec.c -o
sobj/lmblec.o
gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall  -c lmbleic.c -o
sobj/lmbleic.o
gcc -fPIC -ULINSOLVERS_RETAIN_MEMORY  -O3 -funroll-loops -Wall    -c -o
lmdemo.o lmdemo.c
gcc -shared -Wl,-soname,liblevmar.so.2 -o sobj/liblevmar.so.2.2 sobj/lm.o
sobj/Axb.o sobj/misc.o sobj/lmlec.o sobj/lmbc.o sobj/lmblec.o sobj/lmbleic.o
#-llapack -lblas -lf2c
ln -s liblevmar.so.2.2 sobj/liblevmar.so
gcc  lmdemo.o -o lmdemo -Lsobj -llevmar -llapack -lblas -lf2c  -lm -u MAIN__

Just run
 make CFLAGS="%{optflags} -funroll-loops -fPIC" -f Makefile.so %{?_smp_mflags}
to use the correct optimization flags.

**

You don't need f2c, it's not used anywhere (LAPACK is compiled with gfortran in
Fedora). Drop the requirement from the spec file and drop the linking command
from the Makefile.

**

I'd move the definitions of major and minor to the top of the spec file, and
add a comment e.g.

 # SOlib major and minor version
 %global major 2
 %global minor 2

**

Use %{version} on the Source-line:
Source0: http://www.ics.forth.gr/~lourakis/levmar/levmar-%{version}.tgz

**

Your patch is missing its comment from the spec file:
 # Patch to fix compilation of the shared library and compile the demo program
 Patch0: levmar-makefile.patch

Patches aren't normally compressed in Fedora, as they will be stored in CVS
which is only reasonable for text files. Don't compress patch0.

**

More than half of the patch is junk:
diff -uNr levmar-2.5.orig/Makefile.so~ levmar-2.5/Makefile.so~

I suggest you create patches with gendiff
 $ cd levmar-2.5
 $ cp -a Makefile{,.orig}
 (edit Makefile to suit your needs)
 $ cd ..
 $ gendiff levmar-2.5 .orig > levmar-2.5-makefile.patch

which doesn't give you such complications.

**

I'm not sure what -P 0 does in the %patch, as it's not documented on the patch
man page. I believe you can drop it.

You may want to add "-b .makefile" to the patch line, though, so that patch
creates backups before applying the patch. If you need to refine your patches
later on, then you just edit the patched file and create a new patch with
gendiff.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
package-review mailing list
package-review@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/package-review

[Index of Archives]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]