aMule Forum

English => Multiplatform => Mac OSX => Topic started by: bj575bd on April 29, 2005, 10:07:48 PM

Title: WxMac 2.6.0 doesen't compile on Tiger
Post by: bj575bd on April 29, 2005, 10:07:48 PM
Hi all,
WxMac 2.6.0 doesen't comile on tiger, here follows the errors:

../src/html/htmlctrl/webkit/webkit.mm:69: error: 'wxStringWithNSString' declared as an 'inline' variable
../src/html/htmlctrl/webkit/webkit.mm:69: error: 'NSString' was not declared in this scope
../src/html/htmlctrl/webkit/webkit.mm:69: error: 'nsstring' was not declared in this scope
../src/html/htmlctrl/webkit/webkit.mm:70: error: expected %<,%> or %<;%> before '{' token
../src/html/htmlctrl/webkit/webkit.mm:78: error: expected initializer before '*' token
../src/html/htmlctrl/webkit/webkit.mm:87: error: cannot find interface declaration for `NSObject', superclass of `MyFrameLoadMonitor'

../src/html/htmlctrl/webkit/webkit.mm:181: error: 'NSURLRequest' was not declared in this scope
../src/html/htmlctrl/webkit/webkit.mm:181: error: 'NSURL' was not declared in this scope
../src/html/htmlctrl/webkit/webkit.mm:181: error: 'wxNSStringWithWxString' was not declared in this scope

../src/html/htmlctrl/webkit/webkit.mm:235: confused by earlier errors, bailing out
make: *** [coredll_webkit.o] Error 1
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: ken on April 29, 2005, 10:15:29 PM
Hi.  Thanks for the report.  This problem is known to the wxMac deveopers and they will investigate it when they get Tiger.  Unfortunately, we're the wrong people to report this to.  :P

However, if I recall, you can configure wxMac with the --disable-webkit flag to workaround this problem in the meantime.
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: bj575bd on April 29, 2005, 10:53:27 PM
Thank You Again Ken !
Now with your workaround it's working !
Title: Amule compilation problem on tiger
Post by: bj575bd on April 29, 2005, 11:45:26 PM
Hi,
another compilation problem now with amule itself:

if g++ -DHAVE_CONFIG_H -I. -I. -I..     -D__SYSTRAY_DISABLED__ -DUSE_WX_TRAY -I/usr/local/lib/wx/include/mac-ansi-release-2.6 -I/usr/local/include/wx-2.6 -D__WXMAC__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DNO_GCC_PRAGMA      -DUSE_EMBEDDED_CRYPTO -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0   -MT amule-CryptoPP.o -MD -MP -MF ".deps/amule-CryptoPP.Tpo" \
  -c -o amule-CryptoPP.o `test -f 'CryptoPP.cpp' || echo './'`CryptoPP.cpp; \
then mv -f ".deps/amule-CryptoPP.Tpo" ".deps/amule-CryptoPP.Po"; \
else rm -f ".deps/amule-CryptoPP.Tpo"; exit 1; \
fi
CryptoPP.cpp: In member function `virtual void CryptoPP::InvertibleRSAFunction::GenerateRandom(CryptoPP::RandomNumberGenerator&, const CryptoPP::NameValuePairs&)':
CryptoPP.cpp:7905: error: cannot allocate an object of abstract type 'CryptoPP::NameValuePairs'
CryptoPP.h:606: note:   because the following virtual functions are pure within 'CryptoPP::NameValuePairs':
CryptoPP.h:687: note:  virtual bool CryptoPP::NameValuePairs::GetVoidValue(const char*, const std::type_info&, void*) const
make[3]: *** [amule-CryptoPP.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

To try to solve this issue i downloaded a new version of crypto++ (5.2.1) from: http://www.eskimo.com/~weidai/cryptlib.html#download
i have unzipped in my home and i have run ./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --with-crypto-prefix=/Users//cryptopp521/
but same error.
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: GonoszTopi on April 30, 2005, 04:35:17 PM
You have to also add --disable-embedded-crypto to the configure options
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: bj575bd on April 30, 2005, 09:59:55 PM
-- if i use this:

./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --with-crypto-prefix=/Users//cryptopp521/ --disable-embedded_crypto

-- the result is:

configure: error:
          WARNING: crypto++ >= 5.1 is not found.
          Please check that cryptopp-headers are in your default include path,
          check out LD_LIBRARY_PATH or equivalent variable.
          Or this might also be that your cryptopp is instaled on other path.
          Please try again with --with-crypto-prefix=/my_crypto_prefix
          (replace /my_crypto_prefix with a valid path to your crypto directory).
          The crypto include folder must be named cryptopp.
          Sorry about the mess but it's the only way because libcrypto has no make install.
          To download the lastest version check http://www.cryptopp.com for sources.

-- with this:

./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --disable-embedded_crypto

-- the result is:

configure: error:
          WARNING: crypto++ >= 5.1 is not found.
          Please check that cryptopp-headers are in your default include path,
          check out LD_LIBRARY_PATH or equivalent variable.
          Or this might also be that your cryptopp is instaled on other path.
          Please try again with --with-crypto-prefix=/my_crypto_prefix
          (replace /my_crypto_prefix with a valid path to your crypto directory).
          The crypto include folder must be named cryptopp.
          Sorry about the mess but it's the only way because libcrypto has no make install.
          To download the lastest version check http://www.cryptopp.com for sources.

-- with this:

./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --with-crypto-prefix=/Users//cryptopp521/

-- the result is:

CryptoPP.cpp: In member function `virtual void CryptoPP::InvertibleRSAFunction::GenerateRandom(CryptoPP::RandomNumberGenerator&, const CryptoPP::NameValuePairs&)':
CryptoPP.cpp:7905: error: cannot allocate an object of abstract type 'CryptoPP::NameValuePairs'
CryptoPP.h:606: note:   because the following virtual functions are pure within 'CryptoPP::NameValuePairs':
CryptoPP.h:687: note:  virtual bool CryptoPP::NameValuePairs::GetVoidValue(const char*, const std::type_info&, void*) const
make[3]: *** [amule-CryptoPP.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

-- So i tried sudo cp -R /Users//cryptopp521/ /usr/include/cryptopp and then:

./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --disable-embedded_crypto

-- the result is:

/usr/include/cryptopp/iterhash.h:113:   instantiated from `void CryptoPP::IteratedHashBase2::TruncatedFinal(unsigned char*, unsigned int) [with T = CryptoPP::word32, B = CryptoPP::BigEndian, BASE = CryptoPP::HashTransformation]'
ClientCredits.cpp:712:   instantiated from here
/usr/include/cryptopp/secblock.h:251: warning: comparison of unsigned expression >= 0 is always true
make[3]: *** [amule-ClientCredits.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: GonoszTopi on May 01, 2005, 11:10:24 AM
Quote
The crypto include folder must be named cryptopp.
You have to rename your cryptopp521 folder to cryptopp, then
./configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --with-crypto-prefix=/Users/ --disable-embedded_crypto

Quote
Sorry about the mess but it's the only way because libcrypto has no make install.
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: bj575bd on May 01, 2005, 11:54:20 AM
Hi,
as you suggested i copied /Users//cryptopp521 in /Users//cryptopp
an then:

/configure --disable-systray --disable-gtk --with-wx-config=/usr/local/bin/wx-config --with-crypto-prefix=/Users/ --disable-embedded_crypto

-- The result is:

 -lz -lcryptopp    
/usr/bin/ld: can't locate file for: -lcryptopp
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
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: GonoszTopi on May 01, 2005, 03:56:35 PM
Well, did you do a 'make' in the cryptopp folder?
If you did, then please post the link command with all flags, maybe we can find the problem.
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: bj575bd on May 01, 2005, 04:28:05 PM
Hi,
when i type make in the cryptopp directory, the result is:

make
c++ -g -pipe -D__pic__ -c 3way.cpp
c++ -g -pipe -D__pic__ -c adler32.cpp
c++ -g -pipe -D__pic__ -c algebra.cpp
c++ -g -pipe -D__pic__ -c algparam.cpp
c++ -g -pipe -D__pic__ -c arc4.cpp
c++ -g -pipe -D__pic__ -c asn.cpp
c++ -g -pipe -D__pic__ -c base32.cpp
c++ -g -pipe -D__pic__ -c base64.cpp
c++ -g -pipe -D__pic__ -c basecode.cpp
c++ -g -pipe -D__pic__ -c bfinit.cpp
c++ -g -pipe -D__pic__ -c blowfish.cpp
c++ -g -pipe -D__pic__ -c blumshub.cpp
c++ -g -pipe -D__pic__ -c camellia.cpp
c++ -g -pipe -D__pic__ -c cast.cpp
c++ -g -pipe -D__pic__ -c casts.cpp
c++ -g -pipe -D__pic__ -c cbcmac.cpp
c++ -g -pipe -D__pic__ -c channels.cpp
c++ -g -pipe -D__pic__ -c crc.cpp
c++ -g -pipe -D__pic__ -c cryptlib.cpp
c++ -g -pipe -D__pic__ -c default.cpp
c++ -g -pipe -D__pic__ -c des.cpp
c++ -g -pipe -D__pic__ -c dessp.cpp
c++ -g -pipe -D__pic__ -c dh.cpp
c++ -g -pipe -D__pic__ -c dh2.cpp
c++ -g -pipe -D__pic__ -c dll.cpp
c++ -g -pipe -D__pic__ -c dsa.cpp
c++ -g -pipe -D__pic__ -c ec2n.cpp
c++ -g -pipe -D__pic__ -c eccrypto.cpp
c++ -g -pipe -D__pic__ -c ecp.cpp
c++ -g -pipe -D__pic__ -c elgamal.cpp
c++ -g -pipe -D__pic__ -c eprecomp.cpp
c++ -g -pipe -D__pic__ -c esign.cpp
esign.cpp: In member function `virtual void CryptoPP::InvertibleESIGNFunction::GenerateRandom(CryptoPP::RandomNumberGenerator&, const CryptoPP::NameValuePairs&)':
esign.cpp:97: error: cannot allocate an object of abstract type 'CryptoPP::NameValuePairs'
cryptlib.h:222: note:   because the following virtual functions are pure within 'CryptoPP::NameValuePairs':
cryptlib.h:303: note:  virtual bool CryptoPP::NameValuePairs::GetVoidValue(const char*, const std::type_info&, void*) const
make: *** [esign.o] Error 1
Title: cryptopp doesen't compile with gcc 4.0
Post by: bj575bd on May 01, 2005, 04:50:15 PM
Hi,
to compile cryptopp i switched the version of gcc to 3.3, tiger uses for default the 4.0 and
cryptopp with the 4.0 doesen't compile.

Now let's see if this solve the amule compilation problem......
Title: RE: cryptopp doesen't compile with gcc 4.0
Post by: bj575bd on May 01, 2005, 04:57:19 PM
No Luck,
amule still doesen't compile the error is:

g++  -I/Users/samuele -D__CRYPTO_SOURCE__ -W -Wall -g -ggdb -fno-inline -D__DEBUG__ -fmessage-length=0    -bind_at_load -L/Users/samuele/cryptopp  -lpthread -o amule  amule-AddFriend.o amule-AddFileThread.o amule-AICHSyncThread.o amule-amule.o amule-amule-gui.o amule-amuleDlg.o amule-BarShader.o amule-BaseClient.o amule-ChatSelector.o amule-ChatWnd.o amule-CatDialog.o amule-CFile.o amule-ClientCredits.o amule-ClientDetailDialog.o amule-ClientList.o amule-ClientListCtrl.o amule-ClientUDPSocket.o amule-ColorFrameCtrl.o amule-CommentDialog.o amule-CommentDialogLst.o amule-DataToText.o amule-DeadSourceList.o amule-DirectoryTreeCtrl.o amule-DownloadClient.o amule-DownloadListCtrl.o amule-DownloadQueue.o amule-ECSocket.o amule-ECPacket.o amule-ECSpecialTags.o amule-ED2KLink.o amule-EditServerListDlg.o amule-EMSocket.o amule-ExternalConn.o amule-FileDetailDialog.o amule-FileDetailListCtrl.o amule-filefn.o amule-Format.o amule-Friend.o amule-FriendList.o amule-FriendListCtrl.o amule-HTTPDownload.o amule-IPFilter.o amule-KnownFile.o amule-KadDlg.o amule-KnownFileList.o amule-ListenSocket.o amule-listctrl.o amule-Logger.o amule-MemFile.o amule-MD5Sum.o amule-MuleGifCtrl.o amule-MuleListCtrl.o amule-MuleNotebook.o amule-MuleTextCtrl.o amule-muuli_wdr.o amule-NetworkFunctions.o amule-OScopeCtrl.o amule-OtherFunctions.o amule-Packet.o amule-PartFile.o amule-Preferences.o amule-PrefsUnifiedDlg.o amule-Proxy.o amule-SafeFile.o amule-SearchDlg.o amule-SearchList.o amule-SearchListCtrl.o amule-Server.o amule-ServerConnect.o amule-ServerList.o amule-ServerListCtrl.o amule-ServerSocket.o amule-ServerUDPSocket.o amule-ServerWnd.o amule-SharedFileList.o amule-SharedFilesCtrl.o amule-SharedFilesWnd.o amule-SHA.o amule-SHAHashSet.o amule-Statistics.o amule-StatisticsDlg.o amule-StateMachine.o amule-StringFunctions.o amule-TransferWnd.o amule-UploadClient.o amule-UploadQueue.o amule-ByteIO.o amule-DataIO.o amule-FileIO.o amule-IOException.o amule-UInt128.o      -L/usr/local/lib   -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System  -lwx_mac_xrc-2.6 -lwx_mac_qa-2.6 -lwx_mac_html-2.6 -lwx_mac_adv-2.6 -lwx_mac_core-2.6 -lwx_base_carbon_xml-2.6 -lwx_base_carbon_net-2.6 -lwx_base_carbon-2.6  -lz -lcryptopp    
/usr/bin/ld: Undefined symbols:
std::__default_alloc_template::deallocate(void*, unsigned long)
std::__default_alloc_template::allocate(unsigned long)
std::basic_istream >::seekg(long, std::_Ios_Seekdir)
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
Title: RE: cryptopp doesen't compile with gcc 4.0
Post by: bj575bd on May 01, 2005, 05:07:16 PM
Hi,
finally i get amule compiled on MacOsx Tiger only by switching the gcc version  to 3.3 ('sudo gcc_select 3.3'), with the version 4.0 it doesn't compile.

Thank you all for the support!!!!.
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: GonoszTopi on May 01, 2005, 07:48:17 PM
You are welcome. Now at least we know that there are problems with gcc-4 & cryptopp :P
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: soulfire on May 04, 2005, 07:39:59 AM
i really would like to compile amule with gcc 4.0 so i tried a workaround to the above problems. i switched to gcc 3.3 and i compiled libcrypto 5.2.1. then i switched back to 4.0 and i compiled wxmac cvs and started compiling amule, specyfing the prefix for crypto previously compiled.
now i get this error

/usr/bin/ld: Undefined symbols:
std::__default_alloc_template::deallocate(void*, unsigned long)
std::__default_alloc_template::allocate(unsigned long)
std::basic_istream >::seekg(long, std::_Ios_Seekdir)
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

i think it's something related to ld command, but i don't know what this is. is there a way to solve ?
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: bj575bd on May 04, 2005, 02:14:39 PM
Hi,
i wasn't able to compile amule with gcc 4.0, i switched to 3.3 then i compiled wxmac 2.6.0 and the amule with the embended crypto.

When i tried to compile the crypto 5.2.1 with gcc 3.3 and then amule with no crypto with gcc 4.0 i received the same error as yours; so i was bored and i decided to compile all with gcc 3.3
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: GonoszTopi on May 04, 2005, 02:16:53 PM
Quote
i think it's something related to ld command, but i don't know what this is. is there a way to solve ?
The only soultion is to use the same compiler for all.
Title: Re: WxMac 2.6.0 doesen't compile on Tiger
Post by: thedude0001 on May 05, 2005, 08:24:19 AM
As I just stumbled across this:
There's a patch for wx 2.6 compilation on Tiger on the wxwidgets homepage: http://wxwidgets.org/patch.htm#patches260

With this you should be able to compile everything with gcc4.0.
Title: RE: Amule compilation problem on Tigger
Post by: m2kio on May 09, 2005, 08:29:13 PM
Quote
Originally posted by bj575bd
CryptoPP.cpp: In member function `virtual void CryptoPP::InvertibleRSAFunction::GenerateRandom(CryptoPP::RandomNumberGenerator&, const CryptoPP::NameValuePairs&)':
CryptoPP.cpp:7905: error: cannot allocate an object of abstract type 'CryptoPP::NameValuePairs'
CryptoPP.h:606: note:   because the following virtual functions are pure within 'CryptoPP::NameValuePairs':
CryptoPP.h:687: note:  virtual bool CryptoPP::NameValuePairs::GetVoidValue(const char*, const std::type_info&, void*) const

this problem is still present in cvs-2005-05-09, so OSX10.4 Maccies still cannot use Tigger's default gcc 4.0. please fix!
How can it be bad that something is 'pure'? reverted world...

Quote
Originally posted by bj575bd
finally i get amule compiled on MacOsx Tiger only by switching the gcc version to 3.3 ('sudo gcc_select 3.3'), with the version 4.0 it doesn't compile.

thanks for that hint!  :) saved me to figure it out for myself. where is this documented?

... m2kio !
Title: RE: Amule compilation problem on Tigger
Post by: ken on May 09, 2005, 10:34:42 PM
Quote
Originally posted by m2kio
Quote
Originally posted by bj575bd
CryptoPP.cpp: In member function `virtual void CryptoPP::InvertibleRSAFunction::GenerateRandom(CryptoPP::RandomNumberGenerator&, const CryptoPP::NameValuePairs&)':
CryptoPP.cpp:7905: error: cannot allocate an object of abstract type 'CryptoPP::NameValuePairs'
CryptoPP.h:606: note:   because the following virtual functions are pure within 'CryptoPP::NameValuePairs':
CryptoPP.h:687: note:  virtual bool CryptoPP::NameValuePairs::GetVoidValue(const char*, const std::type_info&, void*) const

this problem is still present in cvs-2005-05-09, so OSX10.4 Maccies still cannot use Tigger's default gcc 4.0. please fix!
Unfortunately, we can't fix this.  The problem is that Apple's version of gcc4 is buggy.  The code is correct as is.  This compiler error shouldn't be happening.  When aMule is compiled with gcc4 on other platforms, it doesn't happen.

We might try to alter the code to work around Apple's buggy compiler, but the code isn't original to aMule.  It is a copy (with permission) of some files from a separate project, the Crypto++ library.  If we alter it, we start to diverge from the original.  That's not the end of the world, but it is undesirable.

Quote
How can it be bad that something is 'pure'? reverted world...
I know you're joking, but I'll explain anway.  (I am a smartass after all.  Hi, Kry! :D)  A pure virtual function is one which has no implementation.  It's a placeholder for functionality to be added later.  The compiler is complaining that such functionality wasn't provided, so there's just a hole in the program.  The compiler is wrong -- functionality was provided and the hole has been filled.

Quote
Quote
Originally posted by bj575bd
finally i get amule compiled on MacOsx Tiger only by switching the gcc version to 3.3 ('sudo gcc_select 3.3'), with the version 4.0 it doesn't compile.

thanks for that hint!  :) saved me to figure it out for myself. where is this documented?
In the developer tools release notes.  Also, there's a man page for gcc_select.  Panther also has gcc_select to let developers on Panther compile for Jaguar.