Hi there,
I want to ask you about POL compilation process.
Ive done checkout from pol repository (https://polserver.svn.sourceforge.net/s ... rver/trunk)
Im trying to compile it under gentoo with gcc 4.4.4, up to date glibc and everything else.
Why do I get such common errors like deprecated_headers or PTHREAD_THREAD_MAX constant doesnt exist? I know its sysconf now, but why its not fixed in sources?
Do I have to get some antique environment to compile pol? No one maintaince it?
Thanks for any answer.
PS. Why there is no link on pol website to source repository? AFAIR I got it from some mate on pol-server irc channel.
Compiling POL...
Moderator: POL Developer
Re: Compiling POL...
Simply remove the -Wall in the makefile, reason why noone fixed it simply lack of time, it compiles fine and we have bigger problems to solve then some random gcc changes in every version. Its somewhere on the todo...Rogdush wrote: Why do I get such common errors like deprecated_headers or PTHREAD_THREAD_MAX constant doesnt exist? I know its sysconf now, but why its not fixed in sources?
Do I have to get some antique environment to compile pol? No one maintaince it?
Re: Compiling POL...
Unfortunatelly its not that simple to just remove all compile warnings.
There are bigger problems than warnings, like removal of PTHREAD_THREAD_MAX constant or some change in md5 lib, where struct md5_ctx vanished.
Unfortunatelly you cant compile it under new gcc and libs.
Anyways, thanks for answer Turley. Will wait then or Ill make some changes myself and post patch when succeded.
There are bigger problems than warnings, like removal of PTHREAD_THREAD_MAX constant or some change in md5 lib, where struct md5_ctx vanished.
Unfortunatelly you cant compile it under new gcc and libs.
Anyways, thanks for answer Turley. Will wait then or Ill make some changes myself and post patch when succeded.
Re: Compiling POL...
Mmh last time I compiled under Linux there where only the warnings.. damn gcc. A patch would be nice
Re: Compiling POL...
You have to add to
clib/MD5.h
Then I stopped at:
I've installed libz*, libstdc* and stuff, buf nothings helped (ubuntu 10.04). Help? I've know nearly to nothing about c++ or linux
Edit:
Ohh, and I've comment PTHREAD_THREAD_MAX line in pol.cpp
clib/MD5.h
Code: Select all
# include <stdint.h>
typedef uint32_t md5_uint32;
struct md5_ctx
{
md5_uint32 A;
md5_uint32 B;
md5_uint32 C;
md5_uint32 D;
md5_uint32 total[2];
md5_uint32 buflen;
char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
};
extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW;
extern void __md5_process_bytes (const void *buffer, size_t len,
struct md5_ctx *ctx) __THROW;
extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
Code: Select all
/usr/bin/ld: cannot find -l-lz
/usr/bin/ld: cannot find -l-lstdc++
Edit:
Ohh, and I've comment PTHREAD_THREAD_MAX line in pol.cpp
Re: Compiling POL...
Hi again,
About PTHREAD_MAX - you can comment it, because its just some print of some console output, so its not too much vital - still its not the correct way to fix anything
You can get linking errors of libz or stdc caused by incorrect libdir or missing some paths in PATH env - simply it cant find your libs. Just locate libz.so and libstdc++.so where you have it and make sure its findable from pol compilation dir, also can try to make ldd on libz (but I think ubuntu has a good dependency system) to check if there is some other missing libraries.
Basically, even if we manage to compile it, it will need some testing - at least from md5 angle.
Good luck and lets turn on crazy coding machine
If you add declarations of old md5 module to header file, it will just cause unexpected behaviour of pol - if it will compile anyway. You cant just add declarations of functions without implementation (will get undefined reference at compilation). Well, you simply need to dig up what changed in md5 module - I havent found any vital information yet (its harder than I could expected), tho I havent put much time into it.jaszczur wrote:You have to add to
clib/MD5.h
Then I stopped at:Code: Select all
# include <stdint.h> typedef uint32_t md5_uint32; struct md5_ctx { md5_uint32 A; md5_uint32 B; md5_uint32 C; md5_uint32 D; md5_uint32 total[2]; md5_uint32 buflen; char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32)))); }; extern void __md5_init_ctx (struct md5_ctx *ctx) __THROW; extern void __md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) __THROW; extern void *__md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) __THROW;
I've installed libz*, libstdc* and stuff, buf nothings helped (ubuntu 10.04). Help? I've know nearly to nothing about c++ or linuxCode: Select all
/usr/bin/ld: cannot find -l-lz /usr/bin/ld: cannot find -l-lstdc++
Edit:
Ohh, and I've comment PTHREAD_THREAD_MAX line in pol.cpp
About PTHREAD_MAX - you can comment it, because its just some print of some console output, so its not too much vital - still its not the correct way to fix anything
You can get linking errors of libz or stdc caused by incorrect libdir or missing some paths in PATH env - simply it cant find your libs. Just locate libz.so and libstdc++.so where you have it and make sure its findable from pol compilation dir, also can try to make ldd on libz (but I think ubuntu has a good dependency system) to check if there is some other missing libraries.
Basically, even if we manage to compile it, it will need some testing - at least from md5 angle.
Good luck and lets turn on crazy coding machine
Re: Compiling POL...
Peeps, seriously, from where did you get md5_ctx struct ? I cant find any special entry about such implementation of md5 algorithm. Ive found only something in gnulib.
What do you need to have on gentoo for example to get this working? On other way, if you have to manually download some md5 implementation, please post some link to it.
What do you need to have on gentoo for example to get this working? On other way, if you have to manually download some md5 implementation, please post some link to it.
Re: Compiling POL...
Turley, is there any instruction how to compile pol ? Its obvious, you need special environment for it, and since you dont publish any builds anymore, you need to compile it yourself.
How can I do it without spending 2 days searching web for solutions?
Thanks in adv.
How can I do it without spending 2 days searching web for solutions?
Thanks in adv.
Re: Compiling POL...
I was able to compile POL fine in Microsoft Visual Studio 2005 Express Edition as well as under Ubuntu Linux with gcc 4.4 with no modifications to the source code.