Unable to compile

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Magnus

Unable to compile

Post 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
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post by Dominus »

as discussed on irc I *think* this could be a problem with gcc 4.6.1
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post by Colourless »

The error suggests to me that Exult is attempting to use ptrdiff_t instead of using std::ptrdiff_t
Matthew02

Re: Unable to compile

Post 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?
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post by Colourless »

Try adding the following line into databuf.h after all the #includes

using std::ptrdiff_t;
Matthew02

Re: Unable to compile

Post 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!
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post by Colourless »

Scale hq3x is notoriously slow to compile. Jjust wait the really really long time it takes to compile.
Matthew02
Posts: 3
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post 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'
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post 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 ;)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Matthew02
Posts: 3
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post 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.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Unable to compile

Post 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).
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Locked