Building

6 views
Skip to first unread message

Kyle Fletcher

unread,
Oct 19, 2011, 5:46:55 PM10/19/11
to phpsc2replay
To start I'm real new at using/building from source, but I would like
to start to learn and maybe commit at some point. I would like to
learn how this all works at least how you guys are writing the php
extension. So I have downloaded the source from hg clone
https://code.google.com/p/phpsc2replay/

I have read the README and installed the appropriate software.

cmake -i . (I run cmake -i . to change NEW_LIBMPQ=ON)
http://pastebin.com/qgYakLpt (Everything seams to go well)

make
http://pastebin.com/wV08aWU5 (Something goes wrong)

I can't not for the life of me get past this error. I'm not even sure
what it is complaining about.

Any help would be appreciated.

(Also the reason I'm doing this is because there are maps that I would
like to add to the sc2replayutils.php, but I *think* I need to get the
hashes of the new maps and I *think* this is how I get them)



Kyle Fletcher

unread,
Oct 19, 2011, 5:49:25 PM10/19/11
to phpsc2replay
oops the
cmake -i .
output is http://pastebin.com/JuJcG8TK that other output is from just
cmake .

On Oct 19, 4:46 pm, Kyle Fletcher <kfletche...@gmail.com> wrote:
> To start I'm real new at using/building from source, but I would like
> to start to learn and maybe commit at some point.  I would like to
> learn how this all works at least how you guys are writing the php
> extension.  So I have downloaded the source from hg clonehttps://code.google.com/p/phpsc2replay/
>
> I have read the README and installed the appropriate software.
>
> cmake -i .  (I run cmake -i . to change NEW_LIBMPQ=ON)http://pastebin.com/qgYakLpt (Everything seams to go well)
>
> makehttp://pastebin.com/wV08aWU5(Something goes wrong)

Kyle Fletcher

unread,
Oct 19, 2011, 10:58:13 PM10/19/11
to phpsc2replay
Well... I got it figured out. Just to document this building process
I'll type some stuff down because I could find nothing out there on
this.

To fix that problem I had to edit /src/mpqimpl.cpp line #55
::off_t size = 0, actualsize = 0; to
off_t size = 0, actualsiz = 0;

Then I I ran into another error.

[ 81%] Built target ReplayAnalyzer
[ 90%] Built target detailsparser
[100%] Building CXX object tools/CMakeFiles/unpack.dir/unpack.cpp.o
/home/vitamin/phpsc2replay/tools/unpack.cpp: In function
‘std::pair<bool, std::vector<char, std::allocator<char> > >
getFile(mpq_archive_s*, const std::string&)’:
/home/vitamin/phpsc2replay/tools/unpack.cpp:20: error: cannot convert
‘off_t*’ to ‘libmpq__off_t*’ for argument ‘3’ to ‘int32_t
libmpq__file_unpacked_size(mpq_archive_s*, uint32_t, libmpq__off_t*)’
make[2]: *** [tools/CMakeFiles/unpack.dir/unpack.cpp.o] Error 1
make[1]: *** [tools/CMakeFiles/unpack.dir/all] Error 2
make: *** [all] Error 2

To fix this I had to edit /tools/unpack.cpp line #19
off_t file_size; to
int64_t file_size;

I'm assuming that is because in libmpq/libmpq/mpq.h file_size is
defined as int64_t on line #63

After I got those 2 errors passed I was able to compile fine, but ran
into another error. When I tried to do ./unpack <filepath> I got a
error that said something along the lines of "error loading shared
libraries." To fix I did
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH (Then I was able to run)
./unpack <filepath>

Hopefully this helps anyone in the future that run into these errors.

On Oct 19, 4:49 pm, Kyle Fletcher <kfletche...@gmail.com> wrote:
> oops the
> cmake -i .
> output ishttp://pastebin.com/JuJcG8TKthat other output is from just
> cmake .
>
> On Oct 19, 4:46 pm, Kyle Fletcher <kfletche...@gmail.com> wrote:
>
> > To start I'm real new at using/building from source, but I would like
> > to start to learn and maybe commit at some point.  I would like to
> > learn how this all works at least how you guys are writing the php
> > extension.  So I have downloaded the source from hg clonehttps://code.google.com/p/phpsc2replay/
>
> > I have read the README and installed the appropriate software.
>
> > cmake -i .  (I run cmake -i . to change NEW_LIBMPQ=ON)http://pastebin.com/qgYakLpt (Everything seams to go well)
>
> > makehttp://pastebin.com/wV08aWU5(Somethinggoes wrong)
Reply all
Reply to author
Forward
0 new messages