aMule Forum
English => Multiplatform => Mac OSX => Topic started by: arnardo on December 17, 2010, 08:09:24 PM
-
Hi all,
I'm struggling to compile amulegui on my Mac using the latest svn tarball (aMule-SVN-r10400)
this is how I configured wxMac build
$arch_flags="-arch i386"
./configure --disable-sound CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags"
and this is the configure script output
Configured wxWidgets 2.8.11 for `i686-apple-darwin10.5.0'
Which GUI toolkit should wxWidgets use? mac
Should wxWidgets be compiled into single library? no
Should wxWidgets be compiled in debug mode? no
Should wxWidgets be linked as a shared library? no
Should wxWidgets be compiled in Unicode mode? yes
What level of wxWidgets compatibility should be enabled?
wxWidgets 2.4 no
wxWidgets 2.6 yes
Which libraries should wxWidgets use?
jpeg builtin
png builtin
regex builtin
tiff builtin
zlib sys
odbc no
expat sys
libmspack no
sdl no
make is succesful for wxMac.
Then I configure aMule like:
./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --enable-amule-gui --with-wx-config=/usr/local/bin/wx-config
and I get this output:
Configure script has finished system check.
Configured aMule SVN (rev. 10400) for 'x86_64-apple-darwin10.5.0'.
aMule enabled options:
**** aMule Core ****
Prefix where aMule should be installed? /usr/local
Should aMule be compiled with i18n support? yes
Should aMule be compiled in debug mode? yes
Should aMule be compiled with profiling? no
Should aMule be compiled with optimizations? no
Should aMule be compiled with UPnP support? yes
Should aMule be compiled with IP2country support? no
Should aMule monolithic application be built? yes
Should aMule daemon version be built? no
Should aMule remote gui be built? yes
Crypto++ library/headers style? installed
**** aMule TextClient ****
Should aMule Command Line Client be built? no
**** aMule WebServer ****
Should aMule WebServer be built? no
**** aMule ED2K Links Handler ****
Should aMule ED2K Links Handler be built? yes
**** aMuleLinkCreator ****
Should aMuleLinkCreator GUI version (alc) be built? no
Should aMuleLinkCreator for console (alcc) be built? no
**** aMule Statistics ****
Should C aMule Statistics (CAS) be built? no
Should aMule GUI Statistics (wxCas) be built? no
Should xas XChat2 plugin be installed? no
Should plasmaMule plasma-applet be build? no
**** General Libraries and Tools ****
Should ccache support be enabled? no
Libraries aMule will use to build:
wxWidgets 2.8.11 (mac,static)
crypto++ 5.6.1 (installed, in /opt/local)
libupnp 1.6.6
libintl included
zlib 1.2.3
*** Warnings during configuration ***
* bfd.h not found or unusable, please install binutils development package if
you are a developer or want to help testing aMule
anyway when running make I get:
g++ -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -arch i386 -bind_at_load -lpthread -arch i386 -o amule amule-CaptchaDialog.o amule-CaptchaGenerator.o amule-amule.o amule-BaseClient.o amule-CanceledFileList.o amule-ClientList.o amule-ClientCreditsList.o amule-ClientTCPSocket.o amule-ClientUDPSocket.o amule-CorruptionBlackBox.o amule-DownloadClient.o amule-DownloadQueue.o amule-ECSpecialCoreTags.o amule-EMSocket.o amule-EncryptedStreamSocket.o amule-EncryptedDatagramSocket.o amule-ExternalConn.o amule-FriendList.o amule-IPFilter.o amule-KnownFileList.o amule-ListenSocket.o amule-MuleUDPSocket.o amule-PartFileConvert.o amule-SearchFile.o amule-SearchList.o amule-ServerConnect.o amule-ServerList.o amule-ServerSocket.o amule-ServerUDPSocket.o amule-SharedFileList.o amule-ThreadTasks.o amule-UploadBandwidthThrottler.o amule-UploadClient.o amule-UploadQueue.o amule-Indexed.o amule-Kademlia.o amule-Prefs.o amule-Search.o amule-UDPFirewallTester.o amule-KademliaUDPListener.o amule-PacketTracking.o amule-Contact.o amule-RoutingZone.o amule-amule-gui.o amule-amuleDlg.o amule-AddFriend.o amule-CatDialog.o amule-ChatSelector.o amule-ChatWnd.o amule-CommentDialog.o amule-CommentDialogLst.o amule-GenericClientListCtrl.o amule-ClientDetailDialog.o amule-DirectoryTreeCtrl.o amule-FileDetailDialog.o amule-KadDlg.o amule-OScopeCtrl.o amule-PartFileConvertDlg.o amule-PrefsUnifiedDlg.o amule-SearchDlg.o amule-ServerWnd.o amule-SharedFilesWnd.o amule-StatisticsDlg.o amule-SearchListCtrl.o amule-DownloadListCtrl.o amule-SourceListCtrl.o amule-SharedFilePeersListCtrl.o amule-FriendListCtrl.o amule-ServerListCtrl.o amule-SharedFilesCtrl.o amule-MuleTrayIcon.o amule-TransferWnd.o amule-amuleAppCommon.o amule-DataToText.o amule-ECSpecialMuleTags.o amule-Friend.o amule-KnownFile.o amule-GetTickCount.o amule-GuiEvents.o amule-HTTPDownload.o amule-Logger.o amule-PartFile.o amule-Preferences.o amule-Proxy.o amule-Server.o amule-Statistics.o amule-StatTree.o amule-SHAHashSet.o amule-UserEvents.o -L. -lmuleappcommon -Llibs/common -Llibs/ec/cpp -lmulecommon -lec -lz -L/opt/local/lib -lcryptopp -L. -lmuleappcore -L/opt/local/lib -lupnp -lthreadutil -lixml -L. -lmuleappgui -L/usr/local/lib -arch i386 -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL /usr/local/lib/libwx_macu_adv-2.8.a /usr/local/lib/libwx_macu_core-2.8.a /usr/local/lib/libwx_base_carbonu_net-2.8.a /usr/local/lib/libwx_base_carbonu-2.8.a -framework WebKit -lwxregexu-2.8 -lwxtiff-2.8 -lwxjpeg-2.8 -lwxpng-2.8 -lz -lpthread -liconv
Undefined symbols:
"_iconv_open", referenced from:
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
"_iconv", referenced from:
wxMBConv_iconv::GetMBNulLen() const in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
(maybe you meant: wxMBConv_iconv::wxMBConv_iconv(wchar_t const*), wxMBConv_iconv::wxMBConv_iconv(wchar_t const*), wxMBConv_iconv::ms_wcCharsetName , wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) const, wxMBConv_iconv::Clone() const , wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) const, wxMBConv_iconv::ms_wcNeedsSwap , typeinfo name for wxMBConv_iconv, vtable for wxMBConv_iconv, wxMBConv_iconv::GetMBNulLen() const , wxMBConv_iconv::~wxMBConv_iconv(), wxMBConv_iconv::~wxMBConv_iconv(), wxMBConv_iconv::~wxMBConv_iconv(), new_wxMBConv_iconv(wchar_t const*), typeinfo for wxMBConv_iconv)
"_iconv_close", referenced from:
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [amule] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
It seems the linker can't find libiconv, though the library is installed
$ls /opt/local/lib/libiconv*
/opt/local/lib/libiconv.2.dylib /opt/local/lib/libiconv.a /opt/local/lib/libiconv.dylib /opt/local/lib/libiconv.la
I must be missing something quite obvious, but it's the first time for me compiling code on OS X
any idea?
-
That is:
Configured aMule SVN (rev. 10400) for 'x86_64-apple-darwin10.5.0'.
-
quite cryptic uh ;D
I tried
./configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --enable-amule-gui --with-wx-config=/usr/local/bin/wx-config --with-libiconv-prefix=/opt/local--disable-debug --enable-optimize -build i386
configure: WARNING:
bfd.h not found or unusable, please install binutils development
package if you are a developer or want to help testing aMule
config.status: creating po/POTFILES
config.status: creating po/Makefile
Configure script has finished system check.
Configured aMule SVN (rev. 10400) for 'i386-pc-none'.
aMule enabled options:
**** aMule Core ****
Prefix where aMule should be installed? /usr/local
Should aMule be compiled with i18n support? yes
Should aMule be compiled in debug mode? yes
Should aMule be compiled with profiling? no
Should aMule be compiled with optimizations? yes
Should aMule be compiled with UPnP support? yes
Should aMule be compiled with IP2country support? no
Should aMule monolithic application be built? yes
Should aMule daemon version be built? no
Should aMule remote gui be built? yes
Crypto++ library/headers style? installed
**** aMule TextClient ****
Should aMule Command Line Client be built? no
**** aMule WebServer ****
Should aMule WebServer be built? no
**** aMule ED2K Links Handler ****
Should aMule ED2K Links Handler be built? yes
**** aMuleLinkCreator ****
Should aMuleLinkCreator GUI version (alc) be built? no
Should aMuleLinkCreator for console (alcc) be built? no
**** aMule Statistics ****
Should C aMule Statistics (CAS) be built? no
Should aMule GUI Statistics (wxCas) be built? no
Should xas XChat2 plugin be installed? no
Should plasmaMule plasma-applet be build? no
**** General Libraries and Tools ****
Should ccache support be enabled? no
Libraries aMule will use to build:
wxWidgets 2.8.11 (mac,static)
crypto++ 5.6.1 (installed, in /opt/local)
libupnp 1.6.6
libintl included
zlib 1.2.3
*** Warnings during configuration ***
* bfd.h not found or unusable, please install binutils development package if
you are a developer or want to help testing aMule
anyway when running make I get:
g++ -g -W -Wall -Wshadow -Wundef -ggdb -fno-inline -fmessage-length=0 -O2 -arch i386 -arch i386 -o ed2k ed2k-ED2KLinkParser.o ed2k-MagnetURI.o ed2k-MuleCollection.o
mv -f .deps/amulegui-Server.Tpo .deps/amulegui-Server.Po
mv -f .deps/amulegui-PartFile.Tpo .deps/amulegui-PartFile.Po
mv -f .deps/amulegui-Statistics.Tpo .deps/amulegui-Statistics.Po
Undefined symbols:
"_FSFindFolder", referenced from:
GetLinksFilePath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in ed2k-ED2KLinkParser.o
"_CFURLGetFileSystemRepresentation", referenced from:
GetLinksFilePath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in ed2k-ED2KLinkParser.o
"_CFRelease", referenced from:
GetLinksFilePath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in ed2k-ED2KLinkParser.o
"_CFURLCreateFromFSRef", referenced from:
GetLinksFilePath(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in ed2k-ED2KLinkParser.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [ed2k] Error 1
make[3]: *** Waiting for unfinished jobs....
ranlib libmuleappcommon.a
mv -f .deps/amulegui-UserEvents.Tpo .deps/amulegui-UserEvents.Po
mv -f .deps/amulegui-Preferences.Tpo .deps/amulegui-Preferences.Po
mv -f .deps/amulegui-SHAHashSet.Tpo .deps/amulegui-SHAHashSet.Po
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
-
quite cryptic uh ;D
Sorry, I thought you knew what you were doing...
I quoted a line of you output which means you were building against x86_64 arch: this is not allowed since Carbon libraries used by wxMac are 32-bit.
I tried
What is $arch_flags variabe declared by?
It is supposed to be -arch i386...
Which wxMac are you linking at?
-
I'm confused wheter I should build aMule for i386 ot x86_64
the last error was probably due to a "dirty" compilation...
still having problems with iconv
I succesfully compiled wxMac-2.8.11 using arch_flags="-arch i386"
Also configuring aMule I'm using the same value:
../configure CC="gcc-4.2 $arch_flags" CXX="g++-4.2 $arch_flags" CFLAGS="$arch_flags -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5" CXXFLAGS="$arch_flags -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5" CPPFLAGS="$arch_flags -I/opt/local/include" LDFLAGS="$arch_flags -L/opt/local/lib" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --with-wx-config=/usr/local/bin/wx-config --with-gdlib-config=/opt/local/bin/gdlib-config --with-libiconv-prefix=/opt/local --enable-amule-gui
that returns
Configure script has finished system check.
Configured aMule SVN (rev. 10400) for 'i386-apple-darwin10.5.0'.
aMule enabled options:
**** aMule Core ****
Prefix where aMule should be installed? /usr/local
Should aMule be compiled with i18n support? yes
Should aMule be compiled in debug mode? yes
Should aMule be compiled with profiling? no
Should aMule be compiled with optimizations? no
Should aMule be compiled with UPnP support? yes
Should aMule be compiled with IP2country support? no
Should aMule monolithic application be built? yes
Should aMule daemon version be built? no
Should aMule remote gui be built? yes
Crypto++ library/headers style? installed
**** aMule TextClient ****
Should aMule Command Line Client be built? no
**** aMule WebServer ****
Should aMule WebServer be built? no
**** aMule ED2K Links Handler ****
Should aMule ED2K Links Handler be built? yes
**** aMuleLinkCreator ****
Should aMuleLinkCreator GUI version (alc) be built? no
Should aMuleLinkCreator for console (alcc) be built? no
**** aMule Statistics ****
Should C aMule Statistics (CAS) be built? no
Should aMule GUI Statistics (wxCas) be built? no
Should xas XChat2 plugin be installed? no
Should plasmaMule plasma-applet be build? no
**** General Libraries and Tools ****
Should ccache support be enabled? no
Libraries aMule will use to build:
wxWidgets 2.8.11 (mac,static)
crypto++ 5.6.1 (installed, in /opt/local)
libupnp 1.6.6
libintl system
zlib 1.2.5
which yelds this errors:
Undefined symbols:
"_fdopen$UNIX2003", referenced from:
wxCreateTempImpl(wxString const&, wxFile*, wxFFile*, bool*)in libwx_base_carbonu-2.8.a(baselib_filename.o)
wxCreateTempImpl(wxString const&, wxFile*, wxFFile*, bool*)in libwx_base_carbonu-2.8.a(baselib_filename.o)
"_popen$UNIX2003", referenced from:
wxIsPlatform64Bit() in libwx_base_carbonu-2.8.a(baselib_utilsunx.o)
"_fopen$UNIX2003", referenced from:
wxFopen(wchar_t const*, wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_wxchar.o)
"_iconv_open", referenced from:
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
"std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)", referenced from:
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::Integer const&)in libcryptopp.a(integer.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::Integer const&)in libcryptopp.a(integer.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::Integer const&)in libcryptopp.a(integer.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::Integer const&)in libcryptopp.a(integer.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::PolynomialMod2 const&)in libcryptopp.a(gf2n.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::PolynomialMod2 const&)in libcryptopp.a(gf2n.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::PolynomialMod2 const&)in libcryptopp.a(gf2n.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::PolynomialMod2 const&)in libcryptopp.a(gf2n.o)
CryptoPP::operator<<(std::basic_ostream<char, std::char_traits<char> >&, CryptoPP::PolynomialMod2 const&)in libcryptopp.a(gf2n.o)
"_iconv", referenced from:
wxMBConv_iconv::GetMBNulLen() const in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) constin libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::wxMBConv_iconv(wchar_t const*)in libwx_base_carbonu-2.8.a(baselib_strconv.o)
(maybe you meant: wxMBConv_iconv::wxMBConv_iconv(wchar_t const*), wxMBConv_iconv::wxMBConv_iconv(wchar_t const*), wxMBConv_iconv::ms_wcCharsetName , wxMBConv_iconv::MB2WC(wchar_t*, char const*, unsigned long) const, wxMBConv_iconv::Clone() const , wxMBConv_iconv::WC2MB(char*, wchar_t const*, unsigned long) const, wxMBConv_iconv::ms_wcNeedsSwap , typeinfo name for wxMBConv_iconv, vtable for wxMBConv_iconv, wxMBConv_iconv::GetMBNulLen() const , wxMBConv_iconv::~wxMBConv_iconv(), wxMBConv_iconv::~wxMBConv_iconv(), wxMBConv_iconv::~wxMBConv_iconv(), new_wxMBConv_iconv(wchar_t const*), typeinfo for wxMBConv_iconv)
"_iconv_close", referenced from:
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
wxMBConv_iconv::~wxMBConv_iconv()in libwx_base_carbonu-2.8.a(baselib_strconv.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [amule] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f .deps/amulegui-SHAHashSet.Tpo .deps/amulegui-SHAHashSet.Po
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
-
I guess you should start from scratch with both wxMac and aMule.
Take a look to the wiki: http://wiki.amule.org/index.php/HowTo_compile_on_Mac
I've spent some hours to update it.
-
ufff,
more errors than before...
I'm giving up with amule :(
-
Wait a couple days, you'll be able to compile with just one command.
-
Wait a couple days, you'll be able to compile with just one command.
waiting for your magical one command compile
-
Happy holidays! I'm currently stranded in a family house instead of mine, but I'll get it to you ASAP. I may be able to ssh home and get it before monday. If not, monday it is.
-
Working on it. Will post it at some point today or tomorrow, as I am clearing the output now (it was a very rough script for my use only).
Hi mom!