aMule Forum

English => Compilation problems => Topic started by: tdttester on February 02, 2008, 10:57:27 AM

Title: Problems compiling aMule 20080202 on Mac
Post by: tdttester on February 02, 2008, 10:57:27 AM
I'm getting this:

if g++ -DHAVE_CONFIG_H -I. -I. -I../../..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__   -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmulecommon_a-FileFunctions.o -MD -MP -MF ".deps/libmulecommon_a-FileFunctions.Tpo" -c -o libmulecommon_a-FileFunctions.o `test -f 'FileFunctions.cpp' || echo './'`FileFunctions.cpp; \
   then mv -f ".deps/libmulecommon_a-FileFunctions.Tpo" ".deps/libmulecommon_a-FileFunctions.Po"; else rm -f ".deps/libmulecommon_a-FileFunctions.Tpo"; exit 1; fi
FileFunctions.cpp: In function ‘bool UnpackZipFile(const wxString&, const wxChar**)’:
FileFunctions.cpp:142: error: ‘auto_ptr’ is not a member of ‘std’
FileFunctions.cpp:142: error: expected primary-expression before ‘>’ token
FileFunctions.cpp:142: error: ‘entry’ was not declared in this scope
FileFunctions.cpp: In function ‘bool UnpackGZipFile(const wxString&)’:
FileFunctions.cpp:196: error: ‘wxSysErrorMsg’ was not declared in this scope
make[4]: *** [libmulecommon_a-FileFunctions.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

What can I do to fix this issue?

Thanks.

Title: Re: Problems compiling aMule 20080202 on Mac
Post by: Xaignar on February 02, 2008, 11:46:39 AM
Try adding the line
Code: [Select]
#include <memory> near the top of the file src/libs/common/FileFunctions.cpp.
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: tdttester on February 02, 2008, 03:24:17 PM
Thank you very much, but it's still failing...

Making all in common
if g++ -DHAVE_CONFIG_H -I. -I. -I../../..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__   -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmulecommon_a-Format.o -MD -MP -MF ".deps/libmulecommon_a-Format.Tpo" -c -o libmulecommon_a-Format.o `test -f 'Format.cpp' || echo './'`Format.cpp; \
   then mv -f ".deps/libmulecommon_a-Format.Tpo" ".deps/libmulecommon_a-Format.Po"; else rm -f ".deps/libmulecommon_a-Format.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__   -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmulecommon_a-MD5Sum.o -MD -MP -MF ".deps/libmulecommon_a-MD5Sum.Tpo" -c -o libmulecommon_a-MD5Sum.o `test -f 'MD5Sum.cpp' || echo './'`MD5Sum.cpp; \
   then mv -f ".deps/libmulecommon_a-MD5Sum.Tpo" ".deps/libmulecommon_a-MD5Sum.Po"; else rm -f ".deps/libmulecommon_a-MD5Sum.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__   -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmulecommon_a-MuleDebug.o -MD -MP -MF ".deps/libmulecommon_a-MuleDebug.Tpo" -c -o libmulecommon_a-MuleDebug.o `test -f 'MuleDebug.cpp' || echo './'`MuleDebug.cpp; \
   then mv -f ".deps/libmulecommon_a-MuleDebug.Tpo" ".deps/libmulecommon_a-MuleDebug.Po"; else rm -f ".deps/libmulecommon_a-MuleDebug.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__   -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmulecommon_a-StringFunctions.o -MD -MP -MF ".deps/libmulecommon_a-StringFunctions.Tpo" -c -o libmulecommon_a-StringFunctions.o `test -f 'StringFunctions.cpp' || echo './'`StringFunctions.cpp; \
   then mv -f ".deps/libmulecommon_a-StringFunctions.Tpo" ".deps/libmulecommon_a-StringFunctions.Po"; else rm -f ".deps/libmulecommon_a-StringFunctions.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I../../..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__   -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmulecommon_a-FileFunctions.o -MD -MP -MF ".deps/libmulecommon_a-FileFunctions.Tpo" -c -o libmulecommon_a-FileFunctions.o `test -f 'FileFunctions.cpp' || echo './'`FileFunctions.cpp; \
   then mv -f ".deps/libmulecommon_a-FileFunctions.Tpo" ".deps/libmulecommon_a-FileFunctions.Po"; else rm -f ".deps/libmulecommon_a-FileFunctions.Tpo"; exit 1; fi
FileFunctions.cpp: In function ‘bool UnpackGZipFile(const wxString&)’:
FileFunctions.cpp:197: error: ‘wxSysErrorMsg’ was not declared in this scope
make[4]: *** [libmulecommon_a-FileFunctions.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Any ideas to fix this?

Thank you.


Title: Re: Problems compiling aMule 20080202 on Mac
Post by: Xaignar on February 02, 2008, 03:58:19 PM
Try adding
Code: [Select]
#include <wx/log.h>
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: tdttester on February 02, 2008, 04:51:47 PM
Yes! It has compiled at this point, but I get this now:

if g++ -DHAVE_CONFIG_H -I. -I. -I..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I./libs -I./include -DENABLE_UPNP=1 -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmuleappgui_a-CommentDialog.o -MD -MP -MF ".deps/libmuleappgui_a-CommentDialog.Tpo" -c -o libmuleappgui_a-CommentDialog.o `test -f 'CommentDialog.cpp' || echo './'`CommentDialog.cpp; \
   then mv -f ".deps/libmuleappgui_a-CommentDialog.Tpo" ".deps/libmuleappgui_a-CommentDialog.Po"; else rm -f ".deps/libmuleappgui_a-CommentDialog.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I./libs -I./include -DENABLE_UPNP=1 -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmuleappgui_a-CommentDialogLst.o -MD -MP -MF ".deps/libmuleappgui_a-CommentDialogLst.Tpo" -c -o libmuleappgui_a-CommentDialogLst.o `test -f 'CommentDialogLst.cpp' || echo './'`CommentDialogLst.cpp; \
   then mv -f ".deps/libmuleappgui_a-CommentDialogLst.Tpo" ".deps/libmuleappgui_a-CommentDialogLst.Po"; else rm -f ".deps/libmuleappgui_a-CommentDialogLst.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -isystem /Users/josep/amule/wxMac-2.8.7/build/lib/wx/include/mac-unicode-release-static-2.8 -isystem /Users/josep/amule/wxMac-2.8.7/include -isystem /Users/josep/amule/wxMac-2.8.7/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -I./libs -I./include -DENABLE_UPNP=1 -isystem /usr/include -D__CRYPTO_INSTALLED__ -D__WEAK_CRYPTO__  -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS -MT libmuleappgui_a-DirectoryTreeCtrl.o -MD -MP -MF ".deps/libmuleappgui_a-DirectoryTreeCtrl.Tpo" -c -o libmuleappgui_a-DirectoryTreeCtrl.o `test -f 'DirectoryTreeCtrl.cpp' || echo './'`DirectoryTreeCtrl.cpp; \
   then mv -f ".deps/libmuleappgui_a-DirectoryTreeCtrl.Tpo" ".deps/libmuleappgui_a-DirectoryTreeCtrl.Po"; else rm -f ".deps/libmuleappgui_a-DirectoryTreeCtrl.Tpo"; exit 1; fi
DirectoryTreeCtrl.cpp: In member function ‘bool CDirectoryTreeCtrl::IsShared(const CPath&)’:
DirectoryTreeCtrl.cpp:319: error: ‘find’ is not a member of ‘std’
make[3]: *** [libmuleappgui_a-DirectoryTreeCtrl.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Title: Re: Problems compiling aMule 20080202 on Mac
Post by: Xaignar on February 02, 2008, 06:44:56 PM
And the fun goes on. :)
Try adding
Code: [Select]
#include <algorithm> to that file.
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: tdttester on February 02, 2008, 10:17:21 PM
Great!

It compiled succesfully! :-)

Are u going to submit these changes to the SVN? Or I must do these changes manually every SVN compilation?

Thank you very much!


Title: Re: Problems compiling aMule 20080202 on Mac
Post by: Xaignar on February 03, 2008, 12:06:29 AM
Glad to hear it. The fixes have been comitted to SVN, so no further work should be needed on your side (unless we break something else ;)).
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: phoenix on February 03, 2008, 04:22:57 AM
Anyone wishing to donate a Mac for an aMule developer that deams with one? :D

I promise I will compile aMule on Mac every day  8)
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: wuischke on February 03, 2008, 08:44:13 AM
I'll compile twice a day! :D (Just kidding, I don't dream of Macs, but isn't there anyone who wants aMule running on the PS3? ;) )

I've tried to setup a cross-compiler for OS X 10.5 a couple of days ago, but now that I'm on 64bit it is even more of a PITA and I haven't had success yet. If there's nobody who can compile on a Mac, I'll try it again in a couple of days. Or I'll just do it the next time I get home, there I've still a working cross-compiler for 10.4.
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: MalaPraxis on February 03, 2008, 11:44:10 AM
I can compile on a Mac! I have Leopard, even :)
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: phoenix on February 03, 2008, 11:45:13 AM
I'll compile twice a day! :D
Twice a day ladies and gentlemen! Three anyone? Do I hear three? :D
Title: Re: Problems compiling aMule 20080202 on Mac
Post by: wuischke on February 03, 2008, 12:07:10 PM
I can compile on a Mac! I have Leopard, even :)
Very well. Would you be so kind to create a Mac package for other users to use?

Creating a package is not so difficult if you know how to compile. If you need help compiling aMule, please feel free to ask.

After you've compiled, there's even a script to create the package for you. Take a look at the folder amule-cvs/src/utils/scripts in the source tarball. There's the mac_packager script which will do all of the work for you.

P.S. There's some homework for someone who knows how to compile on a Mac: Please update the wiki page (http://www.amule.org/wiki/index.php/HowTo_compile_on_Mac) to help others who want to compile on Mac OS X.