Package Details: ggnfs-lasieve4e-x86_64-svn 441-5

Git Clone URL: https://aur.archlinux.org/ggnfs-svn.git (read-only, click to copy)
Package Base: ggnfs-svn
Description: lasieve4e is a lattice siever for GGNFS by Jens Franke and T. Kleinjung.
Upstream URL: http://sourceforge.net/projects/ggnfs/
Licenses: GPL2
Conflicts: ggnfs-lasieve4e
Provides: ggnfs-lasieve4e
Submitter: khampf
Maintainer: gilcu3
Last Packager: gilcu3
Votes: 3
Popularity: 0.000000
First Submitted: 2016-01-12 22:31 (UTC)
Last Updated: 2024-05-31 15:48 (UTC)

Latest Comments

ccorn commented on 2024-05-07 14:20 (UTC) (edited on 2024-05-07 14:21 (UTC) by ccorn)

Instead of texlive-core, you now need texlive-{basic,binextra,latex} in the makedepends. (texlive-binextra is needed for latexmk.)

ccorn commented on 2020-12-07 13:22 (UTC)

I have accumulated several changes to the PKGBUILD on my private branch:

  • Add libgmp-static to makedepends, as linking is done with -static.
  • Adaptations for GCC 10. This includes use of -fcommon and changing the declarations of some duplicated inline functions to static.
  • Provide our build flags, but let GGNFS override them. This avoids ExecStack/RELRO/PIE warnings, except for the lasieve executables, which may be due to the assembly parts.
  • Build the PDF documentation. This needs texlive-core in makedepends.
  • Install doc, tests, and contrib stuff.
  • Minor cleanups.

Here is the diff:

--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,10 +10,10 @@ pkgname=('ggnfs-lasieve4e-x86_64-svn' 'ggnfs-svn')
 pkgver=441
 pkgrel=1
 pkgdesc="GGNFS is an open source implementation of General Number Field Sieve algorithm for factoring integers."
-arch=('i686' 'x86_64')
+arch=('x86_64')
 url="http://sourceforge.net/projects/ggnfs/"
 license=('GPL2')
-makedepends=('subversion')
+makedepends=('subversion' 'libgmp-static' 'texlive-core')
 source=("ggnfs-code::svn://svn.code.sf.net/p/ggnfs/code/trunk"
    "makefile-lasieve4_64.patch"
    "lasieve4_64-athlon64-i7.patch")
@@ -33,8 +33,21 @@ pkgver() {

 prepare() {
   cd "${srcdir}/${_svnmod}"
-  patch -p1 < "$srcdir/makefile-lasieve4_64.patch"
-  patch -p1 < "$srcdir/lasieve4_64-athlon64-i7.patch"
+  patch -p1 -i "$srcdir/makefile-lasieve4_64.patch"
+  patch -p1 -i "$srcdir/lasieve4_64-athlon64-i7.patch"
+  # Provide our build flags, but let GGNFS-provided build flags override ours.
+  # Still gives ExecStack/RELRO/PIE warnings about the lasieve executables,
+  # although the flags are provided now, except for the assembly parts.
+  CFLAGS+=" -fcommon"
+  sed -i.orig -E \
+    -e "s#-lgmp #/usr/lib/libgmp.a #" \
+    -e "s#-lgmp\$#/usr/lib/libgmp.a#" \
+    -e "s#^ *CFLAGS *= *#&$CFLAGS #" \
+    -e "s#^ *LIBFLAGS *= *#&$LDFLAGS #" \
+    -e 's/^ *GMP_BUG *=/#&/' \
+    $(find src -name Makefile)
+  sed -i.orig -e 's/^inline /static /' \
+    src/fbgen.c src/experimental/lasieve4_64/fbgen.c
   cd "${srcdir}/${_svnmod}/src/experimental/lasieve4_64"
   if [ "$_lasieveL1bits" != "15" ]; then
     echo "Patching asm code for ${_lasieveL1bits}-bit L1 data cache ..."
@@ -45,50 +58,41 @@ prepare() {
 }

 build() {
-  msg "Starting ggnfs-lasieve4e-${CARCH}-svn build..."
   cd "${srcdir}/${_svnmod}/src/experimental/lasieve4_64"
   make
-  msg "Starting ggnfs-svn build..."
   cd "${srcdir}/${_svnmod}"
   make "$_ggnfstarget"
+  cd doc/ggnfs-doc
+  latexmk -pdf ggnfs-doc
+  latexmk -c
 }

 package_ggnfs-lasieve4e-x86_64-svn() {
   pkgdesc="lasieve4e is a lattice siever for GGNFS by Jens Franke and T. Kleinjung."
-  arch=('x86_64')
   provides=('ggnfs-lasieve4e')
   conflicts=('ggnfs-lasieve4e')

   cd "${srcdir}/${_svnmod}"
-#  install -D -m755 src/experimental/lasieve4_64/gnfs-lasieve4I1?e "${pkgdir}/usr/bin"
-  install -d -m755 "${pkgdir}/usr/bin"
-  install -D -m755 bin/gnfs-lasieve4I1?e "${pkgdir}/usr/bin"
+  install -D -m755 -t "${pkgdir}/usr/bin" bin/gnfs-lasieve4I1?e
 }

 package_ggnfs-svn() {
-  arch=('i686' 'x86_64')   # select ggnfs target other than nocona
   provides=('ggnfs')
   conflicts=('ggnfs')
   depends=('ggnfs-lasieve4e')
-  optdepends=('gnuplot')
+  optdepends=('gnuplot: For autogplot.sh'
+              'bash: For autogplot.sh and tests'
+              'make: For tests and contrib stuff'
+              'perl: For factoring scripts')

   cd "${srcdir}/${_svnmod}"
-  install -d -m755 "${pkgdir}/usr/bin"
-  install -D -m755 bin/autogplot.sh "${pkgdir}/usr/bin"
-  install -D -m755 bin/makefb "${pkgdir}/usr/bin"
-  install -D -m755 bin/matbuild "${pkgdir}/usr/bin"
-  install -D -m755 bin/matprune "${pkgdir}/usr/bin"
-  install -D -m755 bin/matsolve "${pkgdir}/usr/bin"
-  install -D -m755 bin/pol51m0b "${pkgdir}/usr/bin"
-  install -D -m755 bin/pol51m0n "${pkgdir}/usr/bin"
-  install -D -m755 bin/pol51opt "${pkgdir}/usr/bin"
-  install -D -m755 bin/polyselect "${pkgdir}/usr/bin"
-  install -D -m755 bin/procrels "${pkgdir}/usr/bin"
-  install -D -m755 bin/sieve "${pkgdir}/usr/bin"
-  install -D -m755 bin/sqrt "${pkgdir}/usr/bin"
+  install -D -m755 -t "${pkgdir}/usr/bin" bin/[^dg]*
+  install -d -m755 "${pkgdir}/usr/share/doc"
+  cp -RT doc "${pkgdir}/usr/share/doc/${pkgname}"
   install -d -m755 "${pkgdir}/usr/share/${pkgname}"
-  install -D -m644 bin/def-nm-params.txt "${pkgdir}/usr/share/${pkgname}"
-  install -D -m644 bin/def-par.txt "${pkgdir}/usr/share/${pkgname}"
+  cp -R bin/def-* contrib tests "${pkgdir}/usr/share/${pkgname}"
+  ln -sfT "../doc/${pkgname}" "${pkgdir}/usr/share/${pkgname}/doc"
+  install -D -m644 -t "${pkgdir}/usr/share/licenses/$pkgname" LICENSE
 }

 # vim:set ts=2 sw=2 et:

ccorn commented on 2020-09-20 12:47 (UTC)

I had to add libgmp-static and gcc9 to makedepends and add CC=gcc-9 to both make invocations to get the package built.

Current gcc 10.2.0 produces linker errors. I first tried -fcommon, but that did not resolve all issues, so I resorted to GCC 9 for building. That is a quick hack; with some more (yet unknown) options it should be possible to get the code built with GCC 10.

vs220 commented on 2018-04-08 09:05 (UTC) (edited on 2018-04-08 09:06 (UTC) by vs220)

olegkyka downgrade gmp -> gmp-5.1.2-1

olegkyka commented on 2018-04-03 13:42 (UTC)

/usr/bin/ld: cannot find -lgmp collect2: ошибка: выполнение ld завершилось с кодом возврата 1 make: *** [Makefile:58: ../../../bin/gnfs-lasieve4I11e] Ошибка 1 ==> ОШИБКА: Произошел сбой в build().