EOSERV Forum > EOSERV > multiple definition of `pthread_
Page: << 1 >>
multiple definition of `pthread_
Author Message
Post #203688 multiple definition of `pthread_

Searched for this already on the forums, and wasn't able to find a fix.

I've added -lpthread to the linker settings in both build options and compiler settings but no joy.

I'm not using MariaDB.


||=== Build: MYSQL+SQLITE in eoserv (compiler: GNU GCC Compiler) ===|

ld.exe||cannot find -lmariadb|

C:\Program Files (x86)\CodeBlocks\MinGW32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\libpthread.a(libwinpthread_la-thread.o):thread.c|| multiple definition of `pthread_create'|

..\lib\libpthreadGC2.a(dkfts00036.o)|| first defined here|

C:\Program Files (x86)\CodeBlocks\MinGW32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\libpthread.a(libwinpthread_la-thread.o):thread.c|| multiple definition of `pthread_detach'|

..\lib\libpthreadGC2.a(dkfts00038.o)|| first defined here|

C:\Program Files (x86)\CodeBlocks\MinGW32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\libpthread.a(libwinpthread_la-mutex.o):mutex.c|| multiple definition of `pthread_mutex_unlock'|

..\lib\libpthreadGC2.a(dkfts00054.o)|| first defined here|

C:\Program Files (x86)\CodeBlocks\MinGW32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\libpthread.a(libwinpthread_la-mutex.o):mutex.c|| multiple definition of `pthread_mutex_init'|

..\lib\libpthreadGC2.a(dkfts00050.o)|| first defined here|

C:\Program Files (x86)\CodeBlocks\MinGW32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\libpthread.a(libwinpthread_la-mutex.o):mutex.c|| multiple definition of `pthread_mutex_lock'|

..\lib\libpthreadGC2.a(dkfts00051.o)|| first defined here|

C:\Program Files (x86)\CodeBlocks\MinGW32\bin\..\lib\gcc\mingw32\5.1.0\..\..\..\libpthread.a(libwinpthread_la-mutex.o):mutex.c|| multiple definition of `pthread_mutex_destroy'|

..\lib\libpthreadGC2.a(dkfts00049.o)|| first defined here|

||error: ld returned 1 exit status|

||=== Build failed: 14 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|


6 years, 27 weeks ago
Post #203690 Re: multiple definition of `pthread_

If you're using Mysql, I'm pretty sure you need to use the MariaDB connector.
You also have to link the Mariadb lib/include folders.

Follow Sausages guide if using Sqlite: https://eoserv.net/wiki/EOSERV_From_Scratch_-_Windows
Follow this guide if using Mysql on Windows: https://eoguide.boards.net/thread/53/eoserv-building-windows

---
EO Resources/Guides: â—„ eobud.boards.net â–º
6 years, 27 weeks ago
Post #203691 Re: multiple definition of `pthread_

I've tried following the guides down to the letter. Installed MariaDB connector, did everything the guide told me too and still got the same problems.

6 years, 27 weeks ago
Post #203692 Re: multiple definition of `pthread_

multiple definition of anything usually means some library is linked more than once. see if you put pthread somewhere twice. try in either build or compiler not both?

---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
6 years, 27 weeks ago
Post #203693 Re: multiple definition of `pthread_

When codeblocks is open right click eoserv select build options go to linker settings and put this -lpthread

in other linker options.

@shayne We have allready encountered this issue in the past :D

https://eoserv.net/forum/topic/23595

https://eoserv.net/forum/topic/23064

6 years, 27 weeks ago
Post #203695 Re: multiple definition of `pthread_

I did this....

I'll try it again.

6 years, 27 weeks ago
Post #203698 Re: multiple definition of `pthread_
Xlithan posted: (19th Oct 2017, 01:44 am)

I did this....

I'll try it again.


Any luck?
6 years, 27 weeks ago
Post #203705 Re: multiple definition of `pthread_

Trying but having problems with MySQL now saying it can't connect. I had a server up yesterday but it was a compiled server, not open source

6 years, 27 weeks ago
Post #203709 Re: multiple definition of `pthread_
insomniac I was mostly referring to the 'ld.exe||cannot find -lmariadb' issue, but I did forget about the multiple definition of pthread/solution. That's my memory.. :'(

Xlithan You never stated if your pthread issue was resolved, so I'm assuming it's good now?
Are you unable to start the Mysql service? Have you tried uninstalling and reinstalling Mysql if so?
---
EO Resources/Guides: â—„ eobud.boards.net â–º
6 years, 27 weeks ago
Post #203711 Re: multiple definition of `pthread_

If your EOSERV compiled post your error.log!

6 years, 27 weeks ago
Post #203712 Re: multiple definition of `pthread_

I've just got done removing MingW, and uninstalling all instances of MySQL so that I can start over. I'll go through it again.

6 years, 27 weeks ago
Post #203713 Re: multiple definition of `pthread_
Xlithan posted: (21st Oct 2017, 05:35 am)

I've just got done removing MingW, and uninstalling all instances of MySQL so that I can start over. I'll go through it again.


keep us posted....
6 years, 26 weeks ago
Post #203736 Re: multiple definition of `pthread_

If you continue having issues I wouldn't mind helping you over teamviewer. Make sure you disable allowing people to disable your keyboard/mouse input, and make it give you a new password after every session in teamviewer if you install it. Also disable the background service it adds after installing. Though I can help you with all that as well if you trust me.

---
I not hacker

“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its
whole life believing that it is stupid.” - Albert Einstein : Really Great Quote Ramy!
6 years, 26 weeks ago
Post #203986 Re: multiple definition of `pthread_

I am just going to go ahead and bump the fuck out of this post. Sorry about just getting around to answering this as I had other priorities IRL that came before compiling current revisions. You can fix the multiple definition of pthread error in Code::Blocks by going to Project>Build Options then select "eoserv" and click the Linker Settings tab. Edit pthreadGC2 to simply pthread.

You will need gcc version 4.8 or higher for this build. Tested with 5.1.

6 years, 16 weeks ago
Page: << 1 >>

EOSERV Forum > EOSERV > multiple definition of `pthread_