mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2022-09-24, 13:08   #1
graysky
 
graysky's Avatar
 
Jul 2004

32·5 Posts
Default Error compiling version 30.8b15 on Arch Linux

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
Build log is here.
graysky is offline   Reply With Quote
Old 2022-09-24, 15:15   #2
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

23×3×5×67 Posts
Default

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
Prime95 is offline   Reply With Quote
Old 2022-09-24, 18:19   #3
graysky
 
graysky's Avatar
 
Jul 2004

2D16 Posts
Default

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
graysky is offline   Reply With Quote
Reply

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

All times are UTC. The time now is 09:50.


Thu Oct 6 09:50:27 UTC 2022 up 49 days, 7:19, 0 users, load averages: 1.54, 1.15, 1.19

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔