![]() |
|
|
#1 |
|
Jul 2004
1011012 Posts |
I am getting errors when building on Arch Linux as shown below. Any thoughts as to what I can do to circumvent?
I modified linux64/makefile like this: Code:
-CFLAGS = -I.. -I../gwnum -I/usr/local/include -std=gnu99 -DX86_64 -Wno-unused-result -O2 -DPORT=8 +CFLAGS = -I.. -I../gwnum -march=x86-64 -DX86_64 -O2 -Wno-unused-result -march=x86-64 -DPORT=8 -CPPFLAGS = -I.. -I../gwnum -I../../boost_1_76_0 -DX86_64 -std=c++11 -O2 -DPORT=8 +CPPFLAGS = -I.. -I../gwnum -march=x86-64 -O2 -Wno-unused-result -march=x86-64 -DPORT=8 -LFLAGS = -Wl,-M -Wl,-L/usr/local/lib +LFLAGS = -Wl,-M -LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld ../gwnum/polymult.a -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp +LIBS= ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread $(shell pkg-config --libs libcurl) -lstdc++ $(shell pkg-config --static --libs hwloc) -lgmp |
|
|
|
|
|
#2 |
|
P90 years forever!
Aug 2002
Yeehaw, FL
17·487 Posts |
Include ../gwnum/polymult.a in LIBS.
Edit: Nevermind, I see you did that. All the undefined references are from the polymult.a library Last fiddled with by Prime95 on 2022-09-24 at 15:17 |
|
|
|
|
|
#3 |
|
Jul 2004
32·5 Posts |
No, you were correct. Adding that to the LIBS allows the build to finish. Thanks!
For reference, here is how I modified linux64/makefile to build on Arch Linux: Code:
diff --git a/linux64/makefile b/linux64/makefile
index 420801f..a319fc1 100644
--- a/linux64/makefile
+++ b/linux64/makefile
@@ -18,15 +18,17 @@
# LFLAGS = -Wl,-M
# LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic $(shell pkg-config --static --libs libhwloc) -Wl,-Bstatic $(shell pkg-config --static --libs libcurl) -lstdc++ -Wl,-Bdynamic -ldl
+ALFLAGS = -I.. -I../gwnum -march=x86-64 -DX86_64 -O2 -Wno-unused-result -march=x86-64 -DPORT=8
+
CC = gcc
-CFLAGS = -I.. -I../gwnum -I/usr/local/include -std=gnu99 -DX86_64 -Wno-unused-result -O2 -DPORT=8
+CFLAGS = ${ALFLAGS}
CPP = g++
-CPPFLAGS = -I.. -I../gwnum -I../../boost_1_76_0 -DX86_64 -std=c++11 -O2 -DPORT=8
+CPPFLAGS = ${ALFLAGS} -std=c++11
-LFLAGS = -Wl,-M -Wl,-L/usr/local/lib
+LFLAGS = -Wl,-M
#LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld ../gwnum/polymult.a -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -lz -lxml2 -ldl -lgmp
-LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld ../gwnum/polymult.a -lm -lpthread -Wl,-Bstatic -lhwloc -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl -lgmp
+LIBS= ../gwnum/gwnum.a ../gwnum/gwnum.ld ../gwnum/polymult.a -lm -lpthread $(shell pkg-config --libs libcurl) -lstdc++ $(shell pkg-config --static --libs hwloc) -lgmp
FACTOROBJ = factor64.o
LINUXOBJS = prime.o menu.o cJSON.o ecm.o exponentiate.o pair.o pm1prob.o
--
2.37.3
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error compiling 29.7b1 on Arch Linux | graysky | Software | 4 | 2019-04-13 10:16 |
| Error compiling version 29.1 on Arch Linux | graysky | Software | 5 | 2017-03-22 18:20 |
| compiling a static Linux gmp-ecm version | yoyo | GMP-ECM | 9 | 2016-12-25 22:46 |
| compiling mprime on linux | graysky | Software | 6 | 2011-03-14 07:00 |
| Compiling new version of GMP-ECM | M0CZY | GMP-ECM | 3 | 2006-05-27 09:54 |