mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2015-05-08, 08:05   #1
alexvong1995
 
Dec 2014

37 Posts
Default Seeking help on packaging mprime for Debian

First, I have been a Debian user since New Year. I always want to package some software but was too busy to do so. I think it is the right time now.

Previously, I needed able to build and install libcurl from source to compile mprime because mprime won't compile with the Debian libcurl package (gcc throws errors about undefined references). Then I need to change the Makefile by a bit, linking against the freshly built dynamic library instead of static library to get mprime compiled.

However, I noticed that mprime was not able to connect primenet. I guess it is because some security code relating issues. Perhaps?
So I decide to compile mprime without primenet support since it makes no sense to link against something not working.

I am able to done it just now! To compile mprime without libcurl. Here is my patch.diff generated by git.

HOW TO COMPILE:
1. extract p95v285.source.zip to p95v285.source/
2. goto p95v285.source/gwnum/ and type
Code:
$ make -f make64
3. Download and decompress noprimenet.diff.bz2 and put it inside p95v285.source/
4. goto p95v285.source/ and type
Code:
$ patch -p1 < noprimenet.diff
5. goto p95v285.source/linux64/ and type
Code:
$ make -f makenoprimenet
Let me know if it works!
(I just find out mersenneforum does not support xz yet)
Attached Files
File Type: bz2 noprimenet.diff.bz2 (9.8 KB, 67 views)

Last fiddled with by alexvong1995 on 2015-05-08 at 08:17
alexvong1995 is offline   Reply With Quote
Old 2015-05-08, 14:43   #2
Xyzzy
 
Xyzzy's Avatar
 
"Mike"
Aug 2002

2×5×11×71 Posts
Default

We looked into it a long time ago.

http://www.mersenneforum.org/showthread.php?t=7181
Xyzzy is offline   Reply With Quote
Old 2015-05-09, 00:16   #3
alexvong1995
 
Dec 2014

37 Posts
Default

Thanks! Do you mean the restrictive award agreement violates DFSG? Does mprime fit in contrib or non-free? Nevermind, I will also be glad to package Mlucas and Glucas. I was able to compile Mlucas according to instruction and Glucas by
Code:
$ ./configure && make
Progress report: I have set USE_PRIMENET always equal to 0 to deactivate the use of primenet. Also, I have modified the Makefiles and now we can build mprime with customized optimization flags. See below on how to compile.

HOW TO COMPILE:
1. extract p95v285.source.zip to p95v285.source/
2. Download and decompress noprimenet2.diff.bz2 and put it inside p95v285.source/
3. goto p95v285.source/ and type
Code:
$ patch -p1 < noprimenet2.diff
4. goto p95v285.source/gwnum/ and type
Code:
$ make -f make64 'COFLAGS = -march=native -O3 -pipe' 'CXXOFLAGS = $(COFLAGS)'
5. goto p95v285.source/linux64/ and type
Code:
$ make -f makenoprimenet 'COFLAGS = -march=native -O3 -pipe -flto' 'CXXOFLAGS = $(COFLAGS)'
I don't think the optimization flags will change things because the performance critical part is already written in assembly but it is good to know the optimization doesn't break things (I have tried the non-standard compliant -Ofast which do break things). Now the USE_PRIMENET flag is always 0 so you don't have to worry about accidentally activating it.

Let me know if it builds and runs!
I will not be connected to the Internet for about 2-3 days so I will not be replying until I come back from the rural area.
Attached Files
File Type: bz2 noprimenet2.diff.bz2 (10.1 KB, 67 views)
alexvong1995 is offline   Reply With Quote
Old 2015-05-13, 12:49   #4
alexvong1995
 
Dec 2014

37 Posts
Default autotools for Mlucas

Currently, Mlucas uses no makefile because it is relatively simple to build. But since I want to package it for Debian, we need some sort of build system. So I decided to use autotools (autoconf and automake) to build Mlucas.
The tough part is to learn the basics, but thanks to the tutorials (Autotools Mythbuster and video tutorial), I kind of understand them now. The GNU manuals for autoconf and automake are useful but you need to learn the basics first.

HOW TO BUILD:
OK. So actually I have made 3 files, configure.ac, Makefile.am and m4/sources_list.m4
(configure.ac is actually made by using the template created by autoscan after it scans the source code)
Other files are created by running autoreconf -i

1. Fetch the code from git,
Code:
$ git clone https://gitorious.org/mlucas/mlucas.git
2. To build Mlucas type
Code:
$ cd mlucas && mkdir build && cd build && ../configure && make
3. To show the help menu,
Code:
$ ./mlucas -h 2>&1 | less
4. Currently, make, make clean, make distclean and make dist are tested and worked

FEATURE: (to be added later)

TODO: (to be added later)

Last fiddled with by alexvong1995 on 2015-05-13 at 13:36
alexvong1995 is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto start mprime automically for (Debian) Linux joblack Software 26 2018-11-05 11:18
Packaging Mlucas for Debian ewmayer Linux 7 2015-05-28 06:14
Debian package of mprime Matt Linux 1 2007-02-22 22:36
Four heat seeking missiles mfgoode Puzzles 51 2007-01-10 10:02
Are you seeking higher education? R.D. Silverman Lounge 35 2007-01-03 22:59

All times are UTC. The time now is 17:47.

Sun Nov 29 17:47:24 UTC 2020 up 80 days, 14:58, 4 users, load averages: 1.66, 1.94, 1.86

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.