Page 1 of 1

Unable to compile

Posted: Wed Jul 20, 2011 5:33 pm
by Magnus
I am attemping to compile Exult on Arch linux (64bit) (http://aur.archlinux.org/packages.php?ID=1162) and I continually get this error : http://pastebin.com/FbXwsPQS . Some help perhaps

Re: Unable to compile

Posted: Wed Jul 20, 2011 7:36 pm
by Dominus
as discussed on irc I *think* this could be a problem with gcc 4.6.1

Re: Unable to compile

Posted: Wed Jul 20, 2011 11:13 pm
by Colourless
The error suggests to me that Exult is attempting to use ptrdiff_t instead of using std::ptrdiff_t

Re: Unable to compile

Posted: Sun Jul 31, 2011 1:04 am
by Matthew02
I am having the same trouble as the OP. I downgraded to gcc 4.6.0 and got the same results. Any other suggestions? Are there any irc logs where I might find the discussion you referred to?

Re: Unable to compile

Posted: Sun Jul 31, 2011 4:45 am
by Colourless
Try adding the following line into databuf.h after all the #includes

using std::ptrdiff_t;

Re: Unable to compile

Posted: Mon Aug 01, 2011 1:39 am
by Matthew02
Thanks for the help Colourless. I added that line to databuf.h and also had to add it to U7obj.h. It got me a lot farther, but then I ran into a lock up. Make runs up to a certain point and then freezes. I let it run for an hour and then decided to get out with ctrl-c. Any idea what is going on here? I tried it a few times with gcc 4.6.0 and 4.6.1 as well as redoing ./configure each time.

My terminal output is at http://pastebin.com/d6fvsQCd. I had already run make before, so the output shown is a little more brief than normal. I guess some things compiled correctly. Any ideas? Thanks again!

Re: Unable to compile

Posted: Mon Aug 01, 2011 10:06 pm
by Colourless
Scale hq3x is notoriously slow to compile. Jjust wait the really really long time it takes to compile.

Re: Unable to compile

Posted: Wed Aug 03, 2011 11:14 pm
by Matthew02
Well, I tried it again and encountered a stop error when compiling scale_hq3x. It pointed to an problem with gcc. Then I edited the Arch Linux PKGBUILD to not re-download the source files -- to not overwrite the edited header files -- and ran makepkg and successfully compiled everything and built the package. Makepkg does the following...

sh ./configure --prefix=/usr --mandir=/usr/share/man \
--enable-opengl --enable-exult-studio \
--enable-shared --disable-static

make || return 1
make DESTDIR=$pkgdir icondir=/usr/share/pixmaps install

Just out of curiosity, does anything stick out there that would have made a difference? I really appreciate your help with this Colourless.



For anyone else reading this who is having the same trouble, here is what worked for me. I am running Arch Linux 64bit.

Download the PKGBUILD from the AUR

Run 'makepkg -s' which will download the Exult source from Sourceforge and extract it then try to compile it and fail

Edit the files databuf.h and U7bj.h in ./src/exult-1.4.9rc1/files/ and add the line 'using std::ptrdiff_t;' immediately after alll of the #include lines.

Edit the PKGBUILD file and comment out the following two lines by placing a # in front of them
source=(http://downloads.sourceforge.net/$pkgna ... ver.tar.gz)
md5sums=('c17a48cc0377aa67264aaaf441cb1bb2')

Run 'makepkg -s' again to successfully build the package.

Install the package using 'pacman -U ./exult-1.4.9rc1-1-x86_64.pkg.tar.xz'

Re: Unable to compile

Posted: Thu Aug 04, 2011 12:24 am
by Dominus
I'd use SVN btw. And I'dalso expect anyone with compile problems to try SVN first before reporting bugs. Not that it would have made a difference in this case, but when I comitt the fix to SVN, the next one with this problem will have the fix in SVN ;)

Re: Unable to compile

Posted: Sat Aug 06, 2011 2:12 am
by Matthew02
You make a compelling point Dominus! Now I need to figure out how to use SVN and I'll try to make a PKGBUILD to submit to the Arch User Repository. I'll probably be back here asking more questions, so hopefully you don't mind helping out some more.

Re: Unable to compile

Posted: Sat Aug 06, 2011 3:23 am
by Dominus
Why the need to make a pkgbuild? Just grab current source from our download page (snapshot section) and compile for your own leisure (though right now you still need to apply the fixes for gcc 4.6.1).