Results 1 to 8 of 8

Thread: Compiling ZPAQ on Mac OSX 10.7.2 (Lion) gcc4.2.1 - problems!

  1. #1
    Member
    Join Date
    Dec 2011
    Location
    austria
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Compiling ZPAQ on Mac OSX 10.7.2 (Lion) gcc4.2.1 - problems!

    i am trying to compile ZPAQ on mac osx 10.7.2
    gcc version 4.2.1 (Based on Apple Inc. build 565 (LLVM build 2336.1.00)

    is there maybe a full how to somewhere out there?
    i am getting the error

    windows.h: No such file or directory(among other errors)


    here are the steps i have taken

    1. got libzpaq
    2. got zpaq
    3. copied both in the same directory.
    4. got divsufort (2.0.0) and copied divsufsort.c in the same directory.
    5. ran ./configure in the divsufort directory and copied the generated divsufort.h also in the directory.


    g++ zpaq.cpp libzpaq.cpp divsufsort.c -O3 -fopenmp -s -DNDEBUG -o zpaq

    here is the full error output:
    http://pastie.org/3036026

    anyone has an idea or pointer on how i can get zpaq compiled?

    thanks a lot in advance!

  2. #2
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,134
    Thanks
    179
    Thanked 921 Times in 469 Posts
    Code:
    wget http://mattmahoney.net/dc/libzpaq400.zip
    wget http://mattmahoney.net/dc/zpaq402.zip
    wget http://mattmahoney.net/dc/divsufsort200.zip
    unzip libzpaq400.zip
    unzip zpaq402.zip
    unzip divsufsort200.zip
    g++ -O3 -lpthread -s -DNDEBUG zpaq.cpp libzpaq.cpp divsufsort.c -o zpaq
    Maybe add -Dunix to that if that's not enough - it worked for me on linux though.

  3. #3
    Member
    Join Date
    Dec 2011
    Location
    austria
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy thanks, but..

    thanks a lot for the answer - unfortunately this still does not compile on Mac OSX.

    1) g++ -O3 -lpthread -s -DNDEBUG zpaq.cpp libzpaq.cpp divsufsort.c -o zpaq
    produces this error message: http://pastie.org/3038357

    2) g++ -O3 -lpthread -s -DNDEBUG -Dunix zpaq.cpp libzpaq.cpp divsufsort.c -o zpaq
    produce a shorter error message.

    libzpaq.cpp: In function ?void libzpaq::allocx(libzpaq::U8*&, int&, int)?:
    libzpaq.cpp:74: error: ?MAP_ANONYMOUS? was not declared in this scope

    all in all, nothing works. any other ideas?

    thanks a lot in advance!

  4. #4
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,134
    Thanks
    179
    Thanked 921 Times in 469 Posts
    http://developer.apple.com/library/m...n2/mmap.2.html

    Edit/redefine that constant to MAP_ANON?

  5. #5
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    Guess I need to fix that in libzpaq. MAP_ANON is deprecated, which is why I used MAP_ANONYMOUS.
    http://linux.die.net/man/2/mmap

    I should also mention that JIT only works on x86-32 and x86-64. I have only tested in 32 bit Windows and 64 bit Linux. If it crashes, try compiling with -DNOJIT. It will be slower, but should work.

  6. #6
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    I posted libzpaq v4.01 changing MAP_ANONYMOUS to MAP_ANON.

  7. #7
    Member
    Join Date
    Dec 2011
    Location
    austria
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Matt, thanks for the information. With -DNOJIT it actually does compile. Is there any way to fix JIT on osx?

    thanks and regards,
    z3cko

  8. #8
    Expert
    Matt Mahoney's Avatar
    Join Date
    May 2008
    Location
    Melbourne, Florida, USA
    Posts
    3,255
    Thanks
    306
    Thanked 778 Times in 485 Posts
    What errors do you get when compiling with -Dunix and without -DNOJIT ?

Similar Threads

  1. How do you extract file on MAC?
    By HIHP in forum Data Compression
    Replies: 1
    Last Post: 30th November 2011, 00:56
  2. PAQ8PX for Mac OS X?
    By Shoal in forum Data Compression
    Replies: 11
    Last Post: 8th July 2011, 17:35
  3. Fixed email sending problems!
    By encode in forum The Off-Topic Lounge
    Replies: 2
    Last Post: 5th May 2008, 15:42
  4. Strange gcc4.3 results with paq8o8
    By Hahobas in forum Forum Archive
    Replies: 8
    Last Post: 22nd March 2008, 19:44
  5. can someone help me compiling paq by myself?
    By noshutdown in forum Forum Archive
    Replies: 4
    Last Post: 4th December 2007, 10:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •