![]() |
![]() |
#1 |
Einyen
Dec 2003
Denmark
343410 Posts |
![]()
I installed Ubuntu 64bit in VMware and have tried to compile mprime but I need some help.
First I corrected some issues with wrong path to curl.h and gwnum.a. I'm using the gwnum.a in gwnum/linux64 dir and the gwnum.ld in gwnum dir. I also installed g++-multilib because it was missing lstdc++. Now I get a lot of "undefined reference" but I don't understand the final error message: Code:
prime.o: In function `bench_busy_loop': prime.c:(.text+0x2e387): undefined reference to `CPU_FLAGS' prime.c:(.text+0x2e39a): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2e3d3): undefined reference to `one_hundred_thousand_clocks' prime.o: In function `primeTime': prime.c:(.text+0x2e53e): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2e5cf): undefined reference to `gwinit2' prime.c:(.text+0x2e6a8): undefined reference to `gwfft_description' prime.c:(.text+0x2e713): undefined reference to `gwstartnextfft' prime.c:(.text+0x2e728): undefined reference to `gwsquare' prime.c:(.text+0x2e78b): undefined reference to `gwsquare' prime.c:(.text+0x2eb1b): undefined reference to `CPU_HYPERTHREADS' prime.o: In function `tortureTest': prime.c:(.text+0x2edc1): undefined reference to `aligned_malloc' prime.c:(.text+0x2ee0e): undefined reference to `gwmap_to_fftlen' prime.c:(.text+0x2ee49): undefined reference to `gwmap_fftlen_to_max_exponent' prime.c:(.text+0x2ee66): undefined reference to `gwmap_to_fftlen' prime.c:(.text+0x2f0a6): undefined reference to `aligned_free' prime.o: In function `primeContinue': prime.c:(.text+0x2f419): undefined reference to `gwevent_init' prime.c:(.text+0x2f421): undefined reference to `gwevent_reset' prime.c:(.text+0x2f435): undefined reference to `gwevent_wait' prime.c:(.text+0x2f444): undefined reference to `gwevent_destroy' prime.o: In function `generate_affinity_scramble_thread': prime.c:(.text+0x2f775): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2f88e): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2f95e): undefined reference to `one_hundred_thousand_clocks' prime.c:(.text+0x2f9ef): undefined reference to `gwthread_create' prime.c:(.text+0x2fa18): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2fade): undefined reference to `one_hundred_thousand_clocks' prime.c:(.text+0x2fb51): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2fba4): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2fd7d): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2fe5e): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x2feea): undefined reference to `CPU_HYPERTHREADS' prime.o: In function `affinity_busy_loop': prime.c:(.text+0x30013): undefined reference to `one_hundred_thousand_clocks' prime.o: In function `getProgramOptions': prime.c:(.text+0x309d7): undefined reference to `CPU_HYPERTHREADS' prime.o: In function `communicateWithServer': prime.c:(.text+0x30bb6): undefined reference to `gwmutex_lock' prime.c:(.text+0x30c0b): undefined reference to `gwmutex_unlock' prime.c:(.text+0x30d39): undefined reference to `gwmutex_unlock' prime.c:(.text+0x30e21): undefined reference to `gwmutex_unlock' prime.c:(.text+0x30f03): undefined reference to `gwmutex_lock' prime.c:(.text+0x30fc2): undefined reference to `CPU_BRAND' prime.c:(.text+0x30fcd): undefined reference to `CPU_FLAGS' prime.c:(.text+0x3102f): undefined reference to `CPU_L1_CACHE_SIZE' prime.c:(.text+0x3103c): undefined reference to `CPU_L2_CACHE_SIZE' prime.c:(.text+0x31049): undefined reference to `CPU_L3_CACHE_SIZE' prime.c:(.text+0x31064): undefined reference to `CPU_HYPERTHREADS' prime.c:(.text+0x31078): undefined reference to `CPU_SPEED' prime.c:(.text+0x312de): undefined reference to `gwmutex_lock' prime.c:(.text+0x3133c): undefined reference to `gwmutex_unlock' prime.c:(.text+0x31353): undefined reference to `gwmutex_lock' prime.c:(.text+0x313c3): undefined reference to `gwmutex_unlock' prime.c:(.text+0x31705): undefined reference to `gwmutex_lock' prime.c:(.text+0x317b1): undefined reference to `gwmutex_unlock' prime.c:(.text+0x31858): undefined reference to `CPU_FLAGS' prime.c:(.text+0x31879): undefined reference to `CPU_FLAGS' prime.c:(.text+0x3189a): undefined reference to `CPU_FLAGS' prime.c:(.text+0x318bb): undefined reference to `CPU_FLAGS' prime.c:(.text+0x31937): undefined reference to `CPU_FLAGS' prime.o: In function `read_pause_info': prime.c:(.text+0x326f6): undefined reference to `gwmutex_lock' prime.c:(.text+0x328b2): undefined reference to `gwmutex_unlock' prime.c:(.text+0x32930): undefined reference to `gwmutex_init' prime.o: In function `readIniFiles': prime.c:(.text+0x32acc): undefined reference to `CPU_FLAGS' prime.c:(.text+0x3306d): undefined reference to `CPU_FLAGS' prime.c:(.text+0x33171): undefined reference to `isHighResTimerAvailable' prime.o: In function `nameAndReadIniFiles': prime.c:(.text+0x33333): undefined reference to `gwmutex_init' prime.c:(.text+0x3333d): undefined reference to `gwmutex_init' prime.c:(.text+0x33347): undefined reference to `gwmutex_init' prime.c:(.text+0x33351): undefined reference to `gwmutex_init' prime.c:(.text+0x3335b): undefined reference to `gwmutex_init' prime.c:(.text+0x3357a): undefined reference to `CPU_ARCHITECTURE' prime.c:(.text+0x3363e): undefined reference to `CPU_L2_CACHE_SIZE' prime.c:(.text+0x336ad): undefined reference to `CPU_L3_CACHE_SIZE' prime.o: In function `Launcher': prime.c:(.text+0x33a94): undefined reference to `gwthread_create_waitable' prime.c:(.text+0x33b1a): undefined reference to `gwthread_wait_for_exit' prime.o: In function `rangeStatusMessage': prime.c:(.text+0x33fa5): undefined reference to `gw_as_string' prime.o: In function `timed_events_scheduler': prime.c:(.text+0x343dd): undefined reference to `gwmutex_lock' prime.c:(.text+0x3442e): undefined reference to `gwevent_reset' prime.c:(.text+0x34438): undefined reference to `gwmutex_unlock' prime.c:(.text+0x3447c): undefined reference to `gwmutex_unlock' prime.c:(.text+0x344b2): undefined reference to `gwmutex_lock' prime.c:(.text+0x344c5): undefined reference to `gwmutex_unlock' prime.c:(.text+0x345dc): undefined reference to `gwthread_create' prime.c:(.text+0x3463b): undefined reference to `gwevent_wait' prime.o: In function `restart_one_waiting_worker': prime.c:(.text+0x54f): undefined reference to `gwevent_signal' prime.o: In function `lucasDone': prime.c:(.text+0x1565): undefined reference to `gwdone' prime.o: In function `lucas_fixup': prime.c:(.text+0x1c68): undefined reference to `gwsetaddinatpowerofb' prime.o: In function `careful_iteration': prime.c:(.text+0x1e39): undefined reference to `gwfree' prime.o: In function `decrementWorkUnitUseCount': prime.c:(.text+0x39f7): undefined reference to `gwmutex_unlock' prime.o: In function `do_manual_comm_now': prime.c:(.text+0x5652): undefined reference to `gwmutex_unlock' prime.c:(.text+0x567b): undefined reference to `gwmutex_unlock' prime.o: In function `pingServer': prime.c:(.text+0x56ac): undefined reference to `gwmutex_unlock' prime.c:(.text+0x56cb): undefined reference to `gwmutex_unlock' prime.o:prime.c:(.text+0x5c89): more undefined references to `gwmutex_unlock' follow prime.o: In function `ecm_partial_cleanup': prime.c:(.text+0x63ec): undefined reference to `gwfreeall' prime.o: In function `ell_begin_fft': prime.c:(.text+0x643b): undefined reference to `gwfft' prime.o: In function `mQ_term': prime.c:(.text+0x66e9): undefined reference to `gwfree' prime.o: In function `OutputStrNoTimeStamp': prime.c:(.text+0x9e1b): undefined reference to `gwmutex_unlock' prime.o: In function `IniFileReread': prime.c:(.text+0xe5d2): undefined reference to `gwmutex_unlock' prime.o: In function `IniSectionWriteString': prime.c:(.text+0xe915): undefined reference to `gwmutex_unlock' prime.o: In function `iniAddFileMerge': prime.c:(.text+0xefdd): undefined reference to `gwmutex_unlock' prime.o: In function `LoadPrimenet': prime.c:(.text+0xf61a): undefined reference to `curl_global_init' prime.o: In function `compare': prime.c:(.text+0x1309c): undefined reference to `pushg' prime.o: In function `stop_high_memory_workers': prime.c:(.text+0x19f77): undefined reference to `gwmutex_unlock' prime.o: In function `main': prime.c:(.text.startup+0x95): undefined reference to `StopCheckRoutine' prime.c:(.text.startup+0xa0): undefined reference to `OutputBothRoutine' prime.c:(.text.startup+0x1f2): undefined reference to `CPU_HYPERTHREADS' menu.o: In function `max_num_workers': menu.c:(.text+0xdc2): undefined reference to `CPU_HYPERTHREADS' menu.o: In function `test_worker_threads': menu.c:(.text+0xec1): undefined reference to `CPU_HYPERTHREADS' menu.c:(.text+0xefb): undefined reference to `CPU_HYPERTHREADS' menu.c:(.text+0xfa1): undefined reference to `CPU_HYPERTHREADS' menu.o:menu.c:(.text+0x108e): more undefined references to `CPU_HYPERTHREADS' follow menu.o: In function `advanced_test': menu.c:(.text+0x15ec): undefined reference to `CPU_FLAGS' menu.o: In function `advanced_time': menu.c:(.text+0x16e6): undefined reference to `CPU_FLAGS' menu.o: In function `torture': menu.c:(.text+0x2438): undefined reference to `CPU_HYPERTHREADS' menu.c:(.text+0x247b): undefined reference to `CPU_HYPERTHREADS' menu.c:(.text+0x2510): undefined reference to `CPU_FLAGS' menu.c:(.text+0x2543): undefined reference to `CPU_FLAGS' collect2: ld returned 1 exit status make: *** [mprime] Error 1 ath@ubuntu:~/mprime/linux64$ |
![]() |
![]() |
![]() |
#2 |
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
3×29×83 Posts |
![]()
That means the code is making function calls, but the linker (ld) can't find any code that's designated as being those functions. (Or it could it can't find some global variables or something.)
However, I don't know enough to tell you where to get what's missing. In my own attempts to compile it previously, I ran into different problems, such as not having the CURL library and other things. I didn't get these ld errors. |
![]() |
![]() |
![]() |
#3 |
Einyen
Dec 2003
Denmark
2×17×101 Posts |
![]()
Yeah I also had missing curl.h but I downloaded it and corrected the link to the curl.h file.
|
![]() |
![]() |
![]() |
#4 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
32·1,117 Posts |
![]()
Some (or most) of your missing symbols refer to gwnum.a
There are precompiled libs included. You gotta copy an appropriate one to the dir where linking happens. cd .. find . -name gwnum.a |
![]() |
![]() |
![]() |
#5 |
P90 years forever!
Aug 2002
Yeehaw, FL
2·4,079 Posts |
![]()
The gwnum library you copies only has the assembly code object files. You need to compile the C code.
Go to the gwnum directory and type 'make -f make64' to create the "real" gwnum.a. |
![]() |
![]() |
![]() |
#6 |
Einyen
Dec 2003
Denmark
2·17·101 Posts |
![]()
Thanks.
My problem now is curl. I have tried downloading it and compiling it, and also downloaded it from Ubuntu Software Center but I still get: Code:
/DISCARD/ *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) OUTPUT(mprime elf64-x86-64) prime.o: In function `pnHttpServerCURL': prime.c:(.text+0x17547): undefined reference to `curl_easy_init' prime.c:(.text+0x1756c): undefined reference to `curl_easy_setopt' prime.c:(.text+0x1763b): undefined reference to `curl_easy_setopt' prime.c:(.text+0x17688): undefined reference to `curl_easy_setopt' prime.c:(.text+0x1769a): undefined reference to `curl_easy_setopt' prime.c:(.text+0x176b8): undefined reference to `curl_easy_setopt' prime.o:prime.c:(.text+0x176c9): more undefined references to `curl_easy_setopt' follow prime.o: In function `pnHttpServerCURL': prime.c:(.text+0x1774c): undefined reference to `curl_easy_perform' prime.c:(.text+0x17798): undefined reference to `curl_easy_cleanup' prime.c:(.text+0x177d4): undefined reference to `curl_easy_cleanup' prime.c:(.text+0x178ab): undefined reference to `curl_easy_setopt' prime.c:(.text+0x178bf): undefined reference to `curl_easy_setopt' prime.c:(.text+0x1790c): undefined reference to `curl_easy_setopt' prime.c:(.text+0x17922): undefined reference to `curl_easy_setopt' prime.o: In function `LoadPrimenet': prime.c:(.text+0xf61a): undefined reference to `curl_global_init' collect2: ld returned 1 exit status make: *** [mprime] Error 1 ath@ubuntu:~/mprime/linux64$ |
![]() |
![]() |
![]() |
#7 |
Sep 2009
11×89 Posts |
![]()
What version of Ubuntu and curl are you using ?
And it's usually harder to assemble the pieces you need for compiling a program (its "build dependencies") on Windows than on *nix ![]() |
![]() |
![]() |
![]() |
#8 |
Dec 2014
37 Posts |
![]()
I have the same problem but now I have made it!!!
It cannot connect to Primenet but I think (not tested yet) you can use Submission Spider instead. I am using Debian Jessie. I think it will also work for Ubuntu since it is Debian-based. First, you have to have g++ installed. Then, follow George's instruction to create gwnum.a After that, check if you have libcurl.so in /usr/lib/ if not, following instructions on this page to install curl, or you could install a package but I can't find one. Next, go to <your_source_directory>/linux64/makefile On the line Code:
LIBS = ../gwnum/gwnum.a ../gwnum/gwnum.ld -lm -lpthread -Wl,-Bstatic -lcurl -Wl,-Bdynamic -lrt -lstdc++ -ldl Code:
-Wl,-Bstatic -lcurl Code:
-Wl,-Bdynamic -lcurl Finally, 'make' will do everything. ![]() Last fiddled with by alexvong1995 on 2015-02-13 at 08:44 Reason: add url |
![]() |
![]() |
![]() |
#9 |
Dec 2014
37 Posts |
![]()
I have done some P-1 double-checks. I think you cannot submit them with Submission Spider. So forget what I have said.
Anyway, I have written a quick and dirty python script just enough to report P-1 tests with no factor found. I don't know the network stuff well enough to use the PrimeNet API so I am only auto-filling form for manual testing. You will need username and password for it to work. Also, you need to install mechanize library for python2. I write it just because today is Friday. |
![]() |
![]() |
![]() |
#10 | |
Dec 2014
37 Posts |
![]()
Fix the code to use a table check to get the fft size based on http://www.mersenne.org/report_benchmarks/
The main use of the script is to disguise the results as results from cudapm1 to silent the Quote:
Last fiddled with by alexvong1995 on 2015-02-15 at 13:11 |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling GMP-ECM | ATH | GMP-ECM | 69 | 2017-01-04 12:03 |
compiling mprime on linux | graysky | Software | 6 | 2011-03-14 07:00 |
Compiling mprime source code under Ubuntu | sol_kanar | Software | 3 | 2009-03-26 09:15 |
Compiling 24.14 | CBoland | Software | 6 | 2007-08-01 00:11 |
Problem with mprime (Fixed with mprime -d) | antiroach | Software | 2 | 2004-07-19 04:07 |