<p>Here's the tutorial I was using, just to get a bit of bearing on the issue.</p>

<p><a href="https://bitcointalk.org/index.php?topic=158105.0" rel="nofollow">https://bitcointalk.org/index.php?topic=158105.0</a></p>

<p>It instructed me to use the following repository for the midstate module/library.</p>

<p><a href="http://gitorious.org/midstate/midstate" rel="nofollow">http://gitorious.org/midstate/midstate</a></p>

<p>After setting everything up, and downloading everything, all seemed to work fairly well. The only issue was the midstate module - I just couldn't get it compiled.</p>

<p>Here's the Makefile:</p>

<pre><code>CC = gcc
CFLAGS = -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/local/include/python3.3m
LDFLAGS = -Wl,-O1 -Wl,--as-needed -lpython3.3m

all: test midstate.so

test: midstatemodule.c
    $(CC) $(CFLAGS)  midstatemodule.c -o test $(LDFLAGS)

midstate.so: midstatemodule.c
    $(CC) $(CFLAGS) -fPIC -shared midstatemodule.c -o midstate.so $(LDFLAGS)

.PHONY: clean

clean:
    rm -f midstate.so test
</code></pre>

<p>And here's the compilation error:</p>

<pre><code>gcc -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/local/include/python3.3m  midstatemodule.c -o test -Wl,-O1 -Wl,--as-needed -lpython3.3m
/usr/local/lib/libpython3.3m.a(longobject.o): In function `PyLong_FromString':
/home/jon/Downloads/Python-3.3.2/Objects/longobject.c:2157: undefined reference to `log'
/usr/local/lib/libpython3.3m.a(dynload_shlib.o): In function `_PyImport_GetDynLoadFunc':
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:97: undefined reference to `dlsym'
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:129: undefined reference to `dlopen'
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:149: undefined reference to `dlsym'
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:135: undefined reference to `dlerror'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_start_new_thread':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:218: undefined reference to `pthread_create'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:234: undefined reference to `pthread_detach'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:208: undefined reference to `pthread_attr_setstacksize'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_allocate_lock':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:287: undefined reference to `sem_init'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_free_lock':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:312: undefined reference to `sem_destroy'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_acquire_lock_timed':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:347: undefined reference to `sem_timedwait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:351: undefined reference to `sem_wait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:351: undefined reference to `sem_wait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:349: undefined reference to `sem_trywait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:349: undefined reference to `sem_trywait'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_release_lock':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:393: undefined reference to `sem_post'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_acquire_lock_timed':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:349: undefined reference to `sem_trywait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:351: undefined reference to `sem_wait'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_create_key':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:607: undefined reference to `pthread_key_create'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_set_key_value':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:627: undefined reference to `pthread_getspecific'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:630: undefined reference to `pthread_setspecific'
/usr/local/lib/libpython3.3m.a(thread.o): In function `_pythread_pthread_set_stacksize':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:585: undefined reference to `pthread_attr_setstacksize'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_delete_key':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:614: undefined reference to `pthread_key_delete'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_delete_key_value':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:620: undefined reference to `pthread_setspecific'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_get_key_value':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:637: undefined reference to `pthread_getspecific'
/usr/local/lib/libpython3.3m.a(signalmodule.o): In function `timeval_from_double':
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:126: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:126: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:127: undefined reference to `fmod'
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:127: undefined reference to `fmod'
/usr/local/lib/libpython3.3m.a(signalmodule.o): In function `signal_pthread_kill':
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:848: undefined reference to `pthread_kill'
/usr/local/lib/libpython3.3m.a(signalmodule.o): In function `signal_pthread_sigmask':
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:632: undefined reference to `pthread_sigmask'
/usr/local/lib/libpython3.3m.a(posixmodule.o): In function `posix_openpty':
/home/jon/Downloads/Python-3.3.2/./Modules/posixmodule.c:6088: undefined reference to `openpty'
/usr/local/lib/libpython3.3m.a(posixmodule.o): In function `posix_forkpty':
/home/jon/Downloads/Python-3.3.2/./Modules/posixmodule.c:6148: undefined reference to `forkpty'
/usr/local/lib/libpython3.3m.a(faulthandler.o): In function `faulthandler_thread':
/home/jon/Downloads/Python-3.3.2/./Modules/faulthandler.c:435: undefined reference to `pthread_sigmask'
/usr/local/lib/libpython3.3m.a(complexobject.o): In function `_Py_c_pow':
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:121: undefined reference to `hypot'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:122: undefined reference to `pow'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:123: undefined reference to `atan2'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:127: undefined reference to `sincos'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:126: undefined reference to `exp'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:127: undefined reference to `log'
/usr/local/lib/libpython3.3m.a(complexobject.o): In function `_Py_c_abs':
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:192: undefined reference to `hypot'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_is_integer':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:794: undefined reference to `floor'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_as_integer_ratio':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:1464: undefined reference to `floor'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_divmod':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:609: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:586: undefined reference to `fmod'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_rem':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:557: undefined reference to `fmod'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_round':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:988: undefined reference to `round'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:991: undefined reference to `round'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_pow':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:710: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:745: undefined reference to `pow'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:695: undefined reference to `fmod'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:721: undefined reference to `fmod'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:685: undefined reference to `fmod'
collect2: ld returned 1 exit status
make: *** [test] Error 1
</code></pre>

<p>I'm just not sure what to make of it. There isn't really much information about the midstate module. Haven't been able to find any threads about others having the same issue.</p>

<p>I even tried ignoring it and starting the eloipool server - it promptly gave me the following error, but seemed to run in the background.</p>

<pre><code>2013-09-17 18:17:31,083 jsonrpc_getwork WARNING Error importing 'midstate' module; work will not provide midstates
</code></pre>

<p>I tried using cgminer to test if it was working, but it wasn't able to establish a connection.</p>

<p>Any help would be greatly appreciated! And sorry for being a noob at this.</p>

CC BY-SA 3.0
2013-12-22T02:53:25.630Z
You should not be posting questions as "answers".  If you have a genuine question post it as a new question.
DeathAndTaxes
CC BY-SA 3.0
2013-12-26T22:25:40.337Z
This is a question, not an answer. And I still haven't gotten a solution to this. Did you even read the whole thing?
xil3
<mining-pools>
Problem setting up midstate module for eloipool
xil3
# Problem setting up midstate module for eloipool

(Asked by: username_0 on 2013-09-18)

Here's the tutorial I was using, just to get a bit of bearing on the issue.

<https://bitcointalk.org/index.php?topic=158105.0>

It instructed me to use the following repository for the midstate module/library.

<http://gitorious.org/midstate/midstate>

After setting everything up, and downloading everything, all seemed to work fairly well. The only issue was the midstate module - I just couldn't get it compiled.

Here's the Makefile:

```
CC = gcc
CFLAGS = -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/local/include/python3.3m
LDFLAGS = -Wl,-O1 -Wl,--as-needed -lpython3.3m

all: test midstate.so

test: midstatemodule.c
    $(CC) $(CFLAGS)  midstatemodule.c -o test $(LDFLAGS)

midstate.so: midstatemodule.c
    $(CC) $(CFLAGS) -fPIC -shared midstatemodule.c -o midstate.so $(LDFLAGS)

.PHONY: clean

clean:
    rm -f midstate.so test

```

And here's the compilation error:

```
gcc -march=native -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -I/usr/local/include/python3.3m  midstatemodule.c -o test -Wl,-O1 -Wl,--as-needed -lpython3.3m
/usr/local/lib/libpython3.3m.a(longobject.o): In function `PyLong_FromString':
/home/jon/Downloads/Python-3.3.2/Objects/longobject.c:2157: undefined reference to `log'
/usr/local/lib/libpython3.3m.a(dynload_shlib.o): In function `_PyImport_GetDynLoadFunc':
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:97: undefined reference to `dlsym'
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:129: undefined reference to `dlopen'
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:149: undefined reference to `dlsym'
/home/jon/Downloads/Python-3.3.2/./Python/dynload_shlib.c:135: undefined reference to `dlerror'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_start_new_thread':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:218: undefined reference to `pthread_create'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:234: undefined reference to `pthread_detach'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:208: undefined reference to `pthread_attr_setstacksize'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_allocate_lock':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:287: undefined reference to `sem_init'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_free_lock':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:312: undefined reference to `sem_destroy'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_acquire_lock_timed':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:347: undefined reference to `sem_timedwait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:351: undefined reference to `sem_wait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:351: undefined reference to `sem_wait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:349: undefined reference to `sem_trywait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:349: undefined reference to `sem_trywait'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_release_lock':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:393: undefined reference to `sem_post'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_acquire_lock_timed':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:349: undefined reference to `sem_trywait'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:351: undefined reference to `sem_wait'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_create_key':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:607: undefined reference to `pthread_key_create'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_set_key_value':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:627: undefined reference to `pthread_getspecific'
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:630: undefined reference to `pthread_setspecific'
/usr/local/lib/libpython3.3m.a(thread.o): In function `_pythread_pthread_set_stacksize':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:585: undefined reference to `pthread_attr_setstacksize'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_delete_key':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:614: undefined reference to `pthread_key_delete'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_delete_key_value':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:620: undefined reference to `pthread_setspecific'
/usr/local/lib/libpython3.3m.a(thread.o): In function `PyThread_get_key_value':
/home/jon/Downloads/Python-3.3.2/Python/thread_pthread.h:637: undefined reference to `pthread_getspecific'
/usr/local/lib/libpython3.3m.a(signalmodule.o): In function `timeval_from_double':
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:126: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:126: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:127: undefined reference to `fmod'
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:127: undefined reference to `fmod'
/usr/local/lib/libpython3.3m.a(signalmodule.o): In function `signal_pthread_kill':
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:848: undefined reference to `pthread_kill'
/usr/local/lib/libpython3.3m.a(signalmodule.o): In function `signal_pthread_sigmask':
/home/jon/Downloads/Python-3.3.2/./Modules/signalmodule.c:632: undefined reference to `pthread_sigmask'
/usr/local/lib/libpython3.3m.a(posixmodule.o): In function `posix_openpty':
/home/jon/Downloads/Python-3.3.2/./Modules/posixmodule.c:6088: undefined reference to `openpty'
/usr/local/lib/libpython3.3m.a(posixmodule.o): In function `posix_forkpty':
/home/jon/Downloads/Python-3.3.2/./Modules/posixmodule.c:6148: undefined reference to `forkpty'
/usr/local/lib/libpython3.3m.a(faulthandler.o): In function `faulthandler_thread':
/home/jon/Downloads/Python-3.3.2/./Modules/faulthandler.c:435: undefined reference to `pthread_sigmask'
/usr/local/lib/libpython3.3m.a(complexobject.o): In function `_Py_c_pow':
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:121: undefined reference to `hypot'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:122: undefined reference to `pow'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:123: undefined reference to `atan2'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:127: undefined reference to `sincos'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:126: undefined reference to `exp'
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:127: undefined reference to `log'
/usr/local/lib/libpython3.3m.a(complexobject.o): In function `_Py_c_abs':
/home/jon/Downloads/Python-3.3.2/Objects/complexobject.c:192: undefined reference to `hypot'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_is_integer':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:794: undefined reference to `floor'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_as_integer_ratio':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:1464: undefined reference to `floor'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_divmod':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:609: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:586: undefined reference to `fmod'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_rem':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:557: undefined reference to `fmod'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_round':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:988: undefined reference to `round'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:991: undefined reference to `round'
/usr/local/lib/libpython3.3m.a(floatobject.o): In function `float_pow':
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:710: undefined reference to `floor'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:745: undefined reference to `pow'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:695: undefined reference to `fmod'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:721: undefined reference to `fmod'
/home/jon/Downloads/Python-3.3.2/Objects/floatobject.c:685: undefined reference to `fmod'
collect2: ld returned 1 exit status
make: *** [test] Error 1

```

I'm just not sure what to make of it. There isn't really much information about the midstate module. Haven't been able to find any threads about others having the same issue.

I even tried ignoring it and starting the eloipool server - it promptly gave me the following error, but seemed to run in the background.

```
2013-09-17 18:17:31,083 jsonrpc_getwork WARNING Error importing 'midstate' module; work will not provide midstates

```

I tried using cgminer to test if it was working, but it wasn't able to establish a connection.

Any help would be greatly appreciated! And sorry for being a noob at this.

**Tags:** mining-pools

> **Comments:**
> **username_1**: You should not be posting questions as "answers".  If you have a genuine question post it as a new question.  
> **username_0**: This is a question, not an answer. And I still haven't gotten a solution to this. Did you even read the whole thing?  

---

## 0 answers

