Cant compile under linux rev303

Here you can post threads specific to the current release of the core (099)

Moderator: POL Developer

Post Reply
RusseL
Forum Regular
Posts: 350
Joined: Fri Feb 20, 2009 8:30 pm

Cant compile under linux rev303

Post by RusseL » Thu Feb 17, 2011 7:11 am

Code: Select all

gcc-4.4 -x c++ -gstabs+ -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -Werror  -I. -c -I. -o pol/module/uomod3.o pol/module/uomod3.cpp
gcc-4.4 -x c++ -gstabs+ -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -Werror  -I. -c -I. -o pol/module/uomod4.o pol/module/uomod4.cpp
gcc-4.4 -x c++ -gstabs+ -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -Werror  -I. -c -I. -o pol/uoexhelp.o pol/uoexhelp.cpp
gcc-4.4 -x c++ -gstabs+ -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -Werror  -I. -c -I. -o pol/uolisten.o pol/uolisten.cpp
gcc-4.4 -x c++ -gstabs+ -DINC_PASSERT=1 -DTIXML_USE_STL -Wall -Werror  -I. -c -I. -o pol/uoscrobj.o pol/uoscrobj.cpp
cc1plus: warnings being treated as errors
pol/uoscrobj.cpp: In member function ‘virtual BObjectImp* Character::get_script_member_id(int) const’:
pol/uoscrobj.cpp:1483: error: control reaches end of non-void function
make: *** [pol/uoscrobj.o] error 1
huh? oO

User avatar
AsYlum
Adept Poster
Posts: 89
Joined: Sun Feb 05, 2006 5:24 am
Location: Poland

Re: Cant compile under linux rev303

Post by AsYlum » Fri Feb 25, 2011 5:29 pm

The one above seems to be fixed in rev306. But here is another one:
bscript/../clib/rstack.h: In member function ‘virtual void RDeque<T>::destroy(void*)’:
bscript/../clib/rstack.h:145: error: there are no arguments to ‘tm_isalloced’ that depend on a template parameter, so a declaration of ‘tm_isalloced’ must be available
bscript/../clib/rstack.h:145: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make: *** [bscript/parser.o] Error 1
Ubuntu 10.10 and -fpermissive flag didn't help. Maybe someone with more knowledge can write quick how-to build sources for linux? ;)
<uninitialized object>

Turley
POL Developer
Posts: 645
Joined: Sun Feb 05, 2006 4:45 am

Re: Cant compile under linux rev303

Post by Turley » Sat Feb 26, 2011 7:42 am

simply remove the -Werror flag from the makefile, newer gcc added way to much new warnings.... :(

User avatar
AsYlum
Adept Poster
Posts: 89
Joined: Sun Feb 05, 2006 5:24 am
Location: Poland

Re: Cant compile under linux rev303

Post by AsYlum » Sat Feb 26, 2011 9:08 am

Ok. So i have removed -Wall -Werr flags, added flag -DNDEBUG but still compilation fails.
cc -x c++ -gstabs+ -DINC_PASSERT=1 -DTIXML_USE_STL -DNDEBUG -I. -c -I. -o clib/MD5.o clib/MD5.cpp
clib/MD5.cpp: In function ‘bool MD5_Encrypt(const std::string&, std::string&)’:
clib/MD5.cpp:112: error: aggregate ‘md5_ctx ctx’ has incomplete type and cannot be defined
clib/MD5.cpp:115: error: ‘__md5_init_ctx’ was not declared in this scope
clib/MD5.cpp:116: error: ‘__md5_process_bytes’ was not declared in this scope
clib/MD5.cpp:117: error: ‘__md5_finish_ctx’ was not declared in this scope
make: *** [clib/MD5.o] Error 1
<uninitialized object>

Turley
POL Developer
Posts: 645
Joined: Sun Feb 05, 2006 4:45 am

Re: Cant compile under linux rev303

Post by Turley » Sat Feb 26, 2011 2:57 pm

you need HAVE_OPENSSL definied if you have openssl installed or define the libary path of openssl
and better check one of the mk-* files in svn root for more stuff, they are old and outdated, but i think the most stuff is correct

User avatar
AsYlum
Adept Poster
Posts: 89
Joined: Sun Feb 05, 2006 5:24 am
Location: Poland

Re: Cant compile under linux rev303

Post by AsYlum » Sun Feb 27, 2011 3:44 pm

First of all my ubuntu instllation needed libssl-dev installed ;)

I've createdy my own mk-* file based on the one from svn. Now everything compiles just fine ;) Thank you.
<uninitialized object>

RusseL
Forum Regular
Posts: 350
Joined: Fri Feb 20, 2009 8:30 pm

Re: Cant compile under linux rev303

Post by RusseL » Mon Feb 28, 2011 5:47 pm

another one. rev306
i'm trying to compile without -Wall -Werr flags
libssl-dev installed

Code: Select all

/home/rl/polsvn/polserver/trunk/pol-core/pol/schedule.h:(.text._Z16TRACEBUF_ADDELEMPKcj[TRACEBUF_ADDELEM(char const*, unsigned int)]+0x2f): undefined reference to `tracebuffer_insertpoint'
pol/schedule.o: In function `add_task(ScheduledTask*)':
/home/rl/polsvn/polserver/trunk/pol-core/pol/schedule.cpp:47: undefined reference to `tracebuffer_insertpoint'
collect2: ld returned 1 exit status

Turley
POL Developer
Posts: 645
Joined: Sun Feb 05, 2006 4:45 am

Re: Cant compile under linux rev303

Post by Turley » Tue Mar 01, 2011 12:12 am

Have you removed all .o and .d files before you compiled? Seems like a mixup of sources with NDEBUG and without.

RusseL
Forum Regular
Posts: 350
Joined: Fri Feb 20, 2009 8:30 pm

Re: Cant compile under linux rev303

Post by RusseL » Tue Mar 01, 2011 4:22 am

Turley wrote:Have you removed all .o and .d files before you compiled? Seems like a mixup of sources with NDEBUG and without.
:D Now everything works great! Thank you!

Post Reply