Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88093 - sci-mathematics/ecm (new package)
Summary: sci-mathematics/ecm (new package)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Default Assignee for New Packages
URL: http://ecm.gforge.inria.fr/
Whiteboard:
Keywords: EBUILD
: 230435 (view as bug list)
Depends on:
Blocks: 201321
  Show dependency tree
 
Reported: 2005-04-05 15:13 UTC by David Newman
Modified: 2020-03-27 03:08 UTC (History)
6 users (show)

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


Attachments
ecm-6.0.1.ebuild (ecm-6.0.1.ebuild,904 bytes, text/plain)
2005-04-05 15:15 UTC, David Newman
Details
ebuild proposal (ecm-6.2.1.ebuild,1.08 KB, text/plain)
2008-09-27 14:55 UTC, Olivier Huber
Details
patch against configure.in (configure.patch,1.03 KB, patch)
2008-09-27 14:56 UTC, Olivier Huber
Details | Diff
patch (execstack-redc.patch,334 bytes, patch)
2008-09-27 14:56 UTC, Olivier Huber
Details | Diff
patch for assembly files in the x86_64 directory (execstack.patch,6.22 KB, patch)
2008-09-27 14:57 UTC, Olivier Huber
Details | Diff
patch against Makefile.am (makefile.patch,510 bytes, patch)
2008-09-27 15:02 UTC, Olivier Huber
Details | Diff
new ebuild for ecm 6.2.3 (ecm-6.2.3.ebuild,1.22 KB, text/plain)
2009-11-22 09:15 UTC, Christopher Schwan
Details
patch for ebuild in tree (change.patch,1.93 KB, text/plain)
2012-12-29 13:42 UTC, Christopher Schwan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Newman 2005-04-05 15:13:50 UTC
Hi,

Attached is an ebuild for sci-mathematics/ecm.

ECM uses elliptic curve groups to find factors of large composite integers. It uses the GMP bignum library.

Dave
Comment 1 David Newman 2005-04-05 15:15:36 UTC
Created attachment 55404 [details]
ecm-6.0.1.ebuild
Comment 2 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-17 09:51:48 UTC
*** Bug 230435 has been marked as a duplicate of this bug. ***
Comment 3 Sébastien Fabbro (RETIRED) gentoo-dev 2008-07-17 09:52:57 UTC
François, could you take a look at this old one too?
Thanks.
Comment 4 François Bissey 2008-07-17 10:46:27 UTC
(In reply to comment #3)
> François, could you take a look at this old one too?
> Thanks.
> 

OK my latest version after your comment is much more compact and simpler.
Unless they have an alternate web-site I have newer address for the
site and fetch the package.
Comment 5 Olivier Huber 2008-09-27 14:55:14 UTC
Created attachment 166587 [details]
ebuild proposal

This is my ebuild proposal. It uses EAPI=2, because gcc has to be build w/ openmp if we want to enable the openmp USE flag.

I have patched some files because :
1. It fails w/ as-needed because it lacks -lgomp when openmp USE flag is enable.
2. When asm-redc is enable, some files contain executable stack. Since I can only enable asm-redc on one of my box, I have only patch assembly files in the x86-64 directory. If someone can report that there is an execstack with asm-redc enable on a modern ahtlon or pentium4 (32 bits), I will be happy to provide a patch.
3. There's a minor typo in configure.in

I have not an extended use of this package, but I can proxy-maintaint it if it is needed.
This package should pass its tests.
Comment 6 Olivier Huber 2008-09-27 14:56:16 UTC
Created attachment 166589 [details, diff]
patch against configure.in
Comment 7 Olivier Huber 2008-09-27 14:56:37 UTC
Created attachment 166591 [details, diff]
patch
Comment 8 Olivier Huber 2008-09-27 14:57:11 UTC
Created attachment 166593 [details, diff]
patch for assembly files in the x86_64 directory
Comment 9 Olivier Huber 2008-09-27 15:02:32 UTC
Created attachment 166594 [details, diff]
patch against Makefile.am
Comment 10 Olivier Huber 2008-09-27 15:03:59 UTC
I plan to send my patches to upstream. Can some people watching this bug tell me if they are ok ?
Thank you :-)
Comment 11 François Bissey 2008-09-27 18:58:46 UTC
I cannot really comment on the assembly patch myself but the rest
seems OK.
I wasn't planning to use EAPI2 for sage yet but I guess we will have to go
there. Looks neat actually. 
Is the typo in config.in the replacement of "assert" by "shellcmd"?
Comment 12 Olivier Huber 2008-09-27 21:17:21 UTC
> Is the typo in config.in the replacement of "assert" by "shellcmd"?

I suppose that in configure.in, we want "AC_ARG_ENABLE(shellcmd," before 
AS_HELP_STRING([--enable-shellcmd], [enable shell command execution [[default=no]]]),[],[enable_shellcmd=no])
instead of "AC_ARG_ENABLE(assert," because otherwise, the  --enable-shellcmd switch wasn't regognized : 

./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --prefix=/usr --enable-shared --enable-sse2 --enable-openmp --disable-asm-redc --disable-shellcmd --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu
configure: WARNING: Unrecognized options: --disable-shellcmd

I also know that the stock configure script works with --{enable,disable}-shellcmd. So this is cause by the autoreconf : 
if I unpack the package and run ./configure --disable-shellcmd, it works. But after that, if I run autoreconf and ./configure --disable-shellcmd, it doesn't work. Can you please try to reproduce this error and provide an emerge --info ?

My emerge --info :

Portage 2.2_rc11 (default/linux/amd64/2008.0/developer, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo x86_64)   
=================================================================                                                  
System uname: Linux-2.6.26-gentoo-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-glibc2.2.5                         
Timestamp of tree: Sat, 27 Sep 2008 12:45:01 +0000                                                                 
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]                               
ccache version 2.4 [enabled]                                                                                       
app-shells/bash:     3.2_p39                                                                                       
dev-java/java-config: 1.3.7, 2.1.6-r1                                                                              
dev-lang/python:     2.4.4-r4, 2.5.2-r8                                                                            
dev-python/pycrypto: 2.0.1-r6                                                                                      
dev-util/ccache:     2.4-r7                                                                                        
sys-apps/baselayout: 2.0.0                                                                                         
sys-apps/openrc:     0.2.5                                                                                         
sys-apps/sandbox:    1.2.18.1-r3                                                                                   
sys-devel/autoconf:  2.13, 2.62-r1                                                                                 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1                                   
sys-devel/binutils:  2.18-r3                                                                                       
sys-devel/gcc-config: 1.4.0-r4                                                                                     
sys-devel/libtool:   2.2.4                                                                                         
virtual/os-headers:  2.6.26                                                                                        
ACCEPT_KEYWORDS="amd64 ~amd64"                                                                                     
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -pipe -O2 -g"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/env /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /usr/shutdown /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -pipe -O2 -g"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --load-average 3.5"
FEATURES="ccache collision-protect cvs distlocks metadata-transfer multilib-strict parallel-fetch preserve-libs protect-owned sandbox sfperms sign splitdebug strict test unmerge-orphans userfetch usersandbox"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo "
LANG="fr_FR.utf-8"
LC_ALL="fr_FR.utf-8"
LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common"
LINGUAS="fr"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/proaudio/proaudio/trunk/overlays/proaudio /usr/local/overlays/kde /usr/local/overlays/nouveau-overlay /usr/local/overlays/science/overlay /usr/local/overlays/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3d 3dnow 3dnowext X X509 Xaw3d a52 aac aalib accessibility ace acl acpi ada adns aio akode alsa amarok amd64 amr amrnb amrwb animation annotate ao apache2 apm aqsis ares arts artswrappersuid asf asm-redc async atm audacious audiofile automount avahi avi background bash-completion bashlogger bench berkdb bidi bitmap-fonts bl blas blender-game bluetooth bonjour boost border branding browserplugin bs bzip2 ca0106 cairo caps cdda cddb cdio cdr cgkit chardet chipcard chroot cjk cli compress copacity corba cpio cpudetection cracklib crashhandler crypt cscope css ctype cups curl d daap dba dbus dedicated device-mapper dia directfb disk-partition divx djbfft djvu dlloader dmi dri dts dv dvb dvd dvdnav dvdr dvdread dvi dynamic emboss emovix enca encode enscript escreen esd evo exif expat exscalibar extensions extra-algorithms extrafilters fam fame fastbuild fbcon fbcondecor fbdev ffmpeg fftw filepicker firectfb firefox fits flac flash float font-server fontconfig foomaticdb force-cgi-redirect fortran fping fpx freetype2 ftp fuse gadu gcj gd gdbm geoip ggi gif gimp gimpprint glibc-omitfp glitz glut gmedia gmp gnokii gnuplot gnutls gpac gpg gpm graphics graphviz group gs gstreamer gtk gtk2 gtkhtml gts hal hardened hbci hdf5 howl howl-compat httpd hybrid icecast iconv icu id3 idea idn ifc ifp ilbc imagemagick imlib immqt inkjar inotify intl ip2200 iproute2 ipv6 irc isdnlog ithreads jack jack-tmpfs java javascript jbig jce jingle jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kerberos kpathsea ladsp ladspa lame lapack lash lcms ldap lesstif libaa libcaca libg++ libgcrypt libnotify libsamplerate live lm_sensors logitech-mouse logrotate loop-aes lucene lzo lzw lzw-tiff macmenu mad mailwrapper maps math matroska md5sum mdnsresponder-compat meanwhile memlimit midi mikmod miniwin mjpeg mktemp mmap mmx mmxext mng mod modplug mono motif mozbranding mozilla mozsha1 mozsvg mp2 mp3 mp4 mp4live mpeg mpeg2 mpi mplayer msn mtp mudflap mule multilib multislot multitarget musepack music musicbrainz mysql nas nat ncurses neXt neg nemesi net nethack netjack network network-cron nextaw nfs nls nntp nossp nouveau nptl nptlonly nsplugin nss nv nvidia objc objc++ objc-gc odbc ofx ogg openal openexr opengl openmp openntpd openssl ortp osd oss pam parse-clocks pascal passwdqc pcapnav pch pcre pdf pdflib perl perlsuid pertty pg-hier pg-intdatetime php physfs pic pkcs11 player plib plotutils png pnm portaudio posix postgres postscript povray ppds pppd profile pstrickspulseaudio put python qmail qq qt qt-copy qt3 qt3support qt4 quicktime quotes radio rar rc5 readline realmedia reflection resolvconf risky rpm rsync rtc rtsp ruby rubytests samba sasl scanner science sdl sdl-image sensord server session sftp sftplogging shellcmd shorten shout showdesktop simplexml skey slang slp sndfile snmp soap sockets soundtouch sox speex spell spl spoof-source sqlite sqlite3 srt sse sse2 ssl startup-notification state stream subtitles subversion suhosin svg swat sysfs taglib tcltk tcpd teletext test tetex tga theora threads tiff tivo tokenizer tools tordns trailfocus truetype truetype-fonts type1-fonts udev unicode unstablecups upnp usb utils uuencode v4l v4l2 vcd verse vhosts vidcap vim-syntax vim-with-x visualization vlm vorbis wallpaper wavpack webdav widget wifi wma wmf wmp wxwindows x264 xanim xattr xcb xchatdccserver xchattext xcomposite xetex xface xine xinerama xml xml2 xorg xosd xpm xprint xsl xulrunner xv xvid xvmc yafray yp yv12 zeroconf zip zlib" ALSA_CARDS="ca0106 intel8x0 intel8x0m bt87x" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbddeflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr" USERLAND="GNU" VIDEO_CARDS="vesa nvidia v4l fbdev nouveau"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 13 Christopher Schwan 2009-11-22 09:07:01 UTC
I adapted your ebuild and used it to write one for the latest version of ecm (6.2.3). On amd64 I have to add -fPIC in order to get sage compiled (for sage see bug #201321). All four patches apply successfully, but I dont know if they are still needed - at least the "shellcmd" is needed.

I also experience QA warnings if compiling with USE=asm-redc on x86:

 * QA Notice: The following files contain runtime text relocations
 *  Text relocations force the dynamic linker to perform extra    
 *  work at startup, waste system resources, and may pose a security
 *  risk.  On some architectures, the code may not even function    
 *  properly, if at all.                                            
 *  For more information, see http://hardened.gentoo.org/pic-fix-guide.xml
 *  Please include the following list of files in your report:            
 * TEXTREL usr/lib/libecm.so.0.0.0                                        


 * QA Notice: The following files contain writable and executable sections
 *  Files with such sections will not work properly (or at all!) on some  
 *  architectures/operating systems.  A bug should be filed at            
 *  http://bugs.gentoo.org/ to make sure the issue is fixed.              
 *  For more information, see http://hardened.gentoo.org/gnu-stack.xml    
 *  Please include the following list of files in your report:            
 *  Note: Bugs should be filed for the respective maintainers             
 *  of the package in question and not hardened@g.o.                      
 * !WX --- --- usr/lib/libecm.a:redc.o                                    
 * !WX --- --- usr/lib/libecm.a:mulredc1.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc2.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc3.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc4.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc5.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc6.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc7.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc8.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc9.o                                
 * !WX --- --- usr/lib/libecm.a:mulredc10.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc11.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc12.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc13.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc14.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc15.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc16.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc17.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc18.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc19.o                               
 * !WX --- --- usr/lib/libecm.a:mulredc20.o                               
 * RWX --- --- usr/lib/libecm.so.0.0.0                                    
Comment 14 Christopher Schwan 2009-11-22 09:15:13 UTC
Created attachment 210857 [details]
new ebuild for ecm 6.2.3
Comment 15 Sébastien Fabbro (RETIRED) gentoo-dev 2010-01-12 21:53:04 UTC
in sage-on-gentoo overlay
Comment 16 Christopher Schwan 2012-12-29 12:15:01 UTC
Patrick, I added you because you are the maintainer of gmp-ecm. We should merge our ebuilds by including the following fixes to yours:

- The executable stack problem (bug #443660). We fixed that by adding

pkg_setup(){
    if [[ ${CHOST} == *-linux* ]] ; then
        append-ldflags "-Wl,-z,noexecstack"
    fi
}

- Enabling shellcmd works in our version, what problem did you experience with it?
Comment 17 Christopher Schwan 2012-12-29 13:42:31 UTC
Created attachment 333676 [details]
patch for ebuild in tree

Includes the following changes:

- adds keywords for prefixed gentoo
- uses autotools-utils.eclass
- fixes bug #443660
Comment 18 François Bissey 2012-12-29 23:40:17 UTC
I should comment on the keywords. Currently things are broken on mac-os with 6.4 (assembly) I'll work on that at some point in the future.
Comment 19 Patrick Lauer gentoo-dev 2013-03-07 03:39:55 UTC
(In reply to comment #16)
> Patrick, I added you because you are the maintainer of gmp-ecm. We should
> merge our ebuilds by including the following fixes to yours:
> 
> - The executable stack problem (bug #443660). We fixed that by adding
> 
> pkg_setup(){
>     if [[ ${CHOST} == *-linux* ]] ; then
>         append-ldflags "-Wl,-z,noexecstack"
>     fi
> }

Doesn't work for me.

> - Enabling shellcmd works in our version, what problem did you experience
> with it?

Instant segfaults as far as I remember
Comment 20 François Bissey 2013-03-07 08:01:46 UTC
That's a blast from the past. Anyway upstream has released 6.4.4 and we should update things. I happen to now have a very good relationship with some upstream members so we may be able to get fixes in if needed.
Comment 21 Michael Orlitzky gentoo-dev 2020-03-27 03:08:46 UTC
This is in the tree and stable as sci-mathematics/gmp-ecm, and there aren't any (known) issues with the ebuild any more.