You are not logged in.
I've been maintaining the mprime package in the AUR (binary based) for a while now and would very much like to compile it from source myself. Problem seems to lie with either me or the source. I can't get it to build.
Source: ftp://mersenne.org/gimps/source265.zip
For me it errors out on the make step.
$ pwd
/dev/shm/linux64
$ cd linux64
$ make
[ ! -e ../security.h ] && touch ../security.h || true
[ ! -e ../security.c ] && touch ../security.c || true
[ ! -e ../secure5.c ] && touch ../secure5.c || true
gcc -I.. -I../gwnum -DX86_64 -O2 -Wno-unused-result -c prime.c
gcc -I.. -I../gwnum -DX86_64 -O2 -Wno-unused-result -c menu.c
gcc -Wl,-M -o mprime prime.o menu.o factor64.o ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -lrt -lssl -lcrypto -ldl -lz -lstdc++ -Wl,-Bdynamic -ldl
gcc: ../gwnum/gwnum.a: No such file or directory
make: *** [mprime] Error 1
Tried moving that file to the specified dir but no joy.
$ cp ../gwnum/linux64/gwnum.a ../gwnum/
$ make
<<cut>>
menu.o: In function `torture':
menu.c:(.text+0x2318): undefined reference to `CPU_HYPERTHREADS'
menu.c:(.text+0x235c): undefined reference to `CPU_HYPERTHREADS'
menu.c:(.text+0x23f2): undefined reference to `CPU_FLAGS'
menu.c:(.text+0x2423): undefined reference to `CPU_FLAGS'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlopen.o): In function `dlopen':
(.text+0x5): undefined reference to `__dlopen'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlclose.o): In function `dlclose':
(.text+0x1): undefined reference to `__dlclose'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlsym.o): In function `dlsym':
(.text+0x5): undefined reference to `__dlsym'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dlerror.o): In function `dlerror':
(.text+0x1): undefined reference to `__dlerror'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.2/../../../../lib/libdl.a(dladdr.o): In function `dladdr':
(.text+0x1): undefined reference to `__dladdr'
collect2: ld returned 1 exit status
make: *** [mprime] Error 1
Thoughts and suggestions are welcomed!
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
It looks like the library path in the makefile is wrong, by changing it to ../gwnum/linux64 it does go further, but i get the same errors you get after copying.
(usually with these kind of errors changing the path is better then just copying a file)
the undefined references to hyperthreads and cpuflags make me wonder if prime is build on intel processors.
(i have an AMD opteron system)
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Sorry for necroposting, but I got mprime to build with system libraries. The undefined references were caused by a wrong ordering of linker flags in the Makefile. After some patching, the binary is built correctly but it cannot connect to PrimeNet, apparently for security reasons. Only the precompiled binary can.
My PKGBUILD : http://pastebin.com/PEFUUxHq
Offline
@TryA - nice! You wanna upload it to the AUR?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I don't know. Since you still need the precompiled binary to connect to a server, the only interesting thing left is the stress test. I am not interested in maintaining this PKGBUILD, you can take it and do whatever you want. However, some proposals:
- you may have two packages: for example, mprime with the sources and mprime-bin with the precompiled binary
- you should include a little startup script in order to run in a default working directory ($HOME/.mprime for example)
- your binary package shouldn't require curl or libcurl3, the official binary is statically linked to curl.
Offline