aMule Forum
English => Multiplatform => Mac OSX => Topic started by: Sarge on April 13, 2004, 07:49:47 PM
-
Hi!
Somehow I don't get it. Currently I did following:
-install libcryptopp 5.1
-install wxBase 2.4.2
-install wxMac (with os x 10.3 patch) 2.4.2
I repeatedly get the same "template with c linkage" error:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/sw/lib/wx/include/mac-2.4 -I/sw/include -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/include -I/Applications/temp/libcrypto-cvs/c5/ -D__CRYPTO_MDK_SUSE_FC__ -Wall -g -ggdb -fno-inline -D__DEBUG__ -g -MT amule-BaseClient.o -MD -MP -MF ".deps/amule-BaseClient.Tpo" \
-c -o amule-BaseClient.o `test -f 'BaseClient.cpp' || echo './'`BaseClient.cpp; \
then mv -f ".deps/amule-BaseClient.Tpo" ".deps/amule-BaseClient.Po"; \
else rm -f ".deps/amule-BaseClient.Tpo"; exit 1; \
fi
In file included from otherfunctions.h:128,
from BaseClient.cpp:37:
endianfix.h:35:10: warning: #warning BIG ENDIAN BOX
In file included from /usr/include/cryptopp/pubkey.h:35,
from /usr/include/cryptopp/pkcspad.h:5,
from /usr/include/cryptopp/rsa.h:9,
from ClientCredits.h:32,
from BaseClient.cpp:48:
/usr/include/cryptopp/integer.h: In function `CryptoPP::Integer
CryptoPP::operator/(const CryptoPP::Integer&, unsigned int)':
/usr/include/cryptopp/integer.h:426: error: declaration of C function `
CryptoPP::Integer CryptoPP::operator/(const CryptoPP::Integer&, unsigned
int)' conflicts with
/usr/include/cryptopp/integer.h:422: error: previous declaration `
CryptoPP::Integer CryptoPP::operator/(const CryptoPP::Integer&, const
CryptoPP::Integer&)' here
/usr/include/cryptopp/integer.h: In function `word CryptoPP::operator%(const
CryptoPP::Integer&, unsigned int)':
/usr/include/cryptopp/integer.h:428: error: declaration of C function `word
CryptoPP::operator%(const CryptoPP::Integer&, unsigned int)' conflicts with
/usr/include/cryptopp/integer.h:424: error: previous declaration `
CryptoPP::Integer CryptoPP::operator%(const CryptoPP::Integer&, const
CryptoPP::Integer&)' here
/usr/include/cryptopp/integer.h: At global scope:
/usr/include/cryptopp/integer.h:434: error: template specialization with C
linkage
In file included from /usr/include/cryptopp/eprecomp.h:5,
from /usr/include/cryptopp/pubkey.h:37,
from /usr/include/cryptopp/pkcspad.h:5,
from /usr/include/cryptopp/rsa.h:9,
from ClientCredits.h:32,
from BaseClient.cpp:48:
/usr/include/cryptopp/algebra.h:20: error: template with C linkage
/usr/include/cryptopp/algebra.h:44: error: template with C linkage
/usr/include/cryptopp/algebra.h:120: error: template with C linkage
/usr/include/cryptopp/algebra.h:131: error: template with C linkage
/usr/include/cryptopp/algebra.h:133: error: template with C linkage
/usr/include/cryptopp/algebra.h:138: error: template with C linkage
/usr/include/cryptopp/algebra.h:155: error: template with C linkage
/usr/include/cryptopp/algebra.h:215: error: template with C linkage
ends after gazillions of lines with
In file included from ClientCredits.h:32,
from BaseClient.cpp:48:
/usr/include/cryptopp/rsa.h: At global scope:
/usr/include/cryptopp/rsa.h:113: error: template with C linkage
/usr/include/cryptopp/rsa.h:120: error: template with C linkage
BaseClient.cpp: In destructor `CUpDownClient::~CUpDownClient()':
BaseClient.cpp:288: error: `inflateEnd' undeclared (first use this function)
BaseClient.cpp:288: error: (Each undeclared identifier is reported only once
for each function it appears in.)
BaseClient.cpp:289: warning: invalid use of undefined type `struct z_stream_s'
otherstructs.h:26: warning: forward declaration of `struct z_stream_s'
BaseClient.cpp:1578:10: warning: #warning ADDME - Import needed
/Applications/temp/libcrypto-cvs/c5/algparam.h: In member function `
CryptoPP::ConstByteArrayParameter::ConstByteArrayParameter(const T&, bool)
[with T = std::basic_string,
std::allocator >]':
/Applications/temp/libcrypto-cvs/c5/filters.h:700: instantiated from here
/Applications/temp/libcrypto-cvs/c5/algparam.h:26: warning: unused variable `
CryptoPP::CompileAssert cryptopp_assert_26'
make[2]: *** [amule-BaseClient.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
As you see above, I'm currently even using the most recent libcryptopp-headers from cvs (the library itself won't compile, so I'm using that one from the 5.1 release), but it's just a no-go.
aMule was configured without any options, but --disable-amulecmd --disable-gsocket --disable-gtk ... doesn't help either.
Would be great if someone could post the necessary steps. Somehow I'm wondering, how's that possible that everyone that is successful compiling it, doesn't say how it's done.
Cheers, Sarge
PS: when using the headers from the 5.1 release, I get about the same error.
-
Hi Sarge!
Last week I gave one_2_one an tutorial to compile aMule on Mac.
It was a good test try to compile aMule on an other Mac. And I hope my solution will also bring you to a successfully compiled aMule on Mac.
What is to do:
Download wxMac-2.4.2.tar.gz and make the diff in dc.cpp
./configure && make
make install
What output you get:
/usr/local/bin/wx-config --basename
(I think wx_mac is a good return value)
/usr/local/bin/wx-config --version
2.4.2
(This is also a good return value)
I don´t deleted my wxMac folder with all the sources in which I compilied wxMac. I´ll be afraid to delete them.
Then download:
crypto-5.1.tar.bz2
Extract this file into your user directory like: /Users/yourname/
cd into directory and configure && make
I don`t know if I executed 'make install' after compilation
I don´t delete this installation directory.
Now download aMule rc2 and execute configure with this parameters:
./configure --disable-systray --disable-gsocket --disable-gtk --with-wx-prefix=/usr/local --with-wx-config=/usr/local/bin/wx-config --with-crypto-prefix=/Users/your_username
Replace your_username with anything what sounds better.
I linked crypto into my user directory where is located the crypto folder. I don´t know if this is the answer for your problem.
This is the overview who returns configure:
Configure script has finished system check.
Configured aMule 2.0.0rc1 for 'powerpc-apple-darwin7.3.0'.
Should aMule be compiled in debug mode? yes
Should aMule be compiled with release grp code? no
Should aMule be compiled without debug reporting? yes
Should aMule be compiled with profiling? no
Should aMule be compiled with optimizations? no
Should aMule be compiled with systray? no
Should aMule be compiled with safe systray? no
Should aMule be compiled with pure GTK code? no
Should aMule be compiled without bar drawing? no
Should aMule be linked against patched gsocket? yes
Should amulecmd (TextClient) be linked against wxbase? no
Should ccache support be enabled? no
Should amulecmd be built? yes
Crypto++ library/headers style? mdk_suse_fc
Which libraries should aMule use?
wxWidgets 2.4.2
GTK 1.2.10
Now run:
make
and hope that this try do not end with an error.
Hey one_2_one. When I forgot something or explained something wrong, please correct me.
hoschy07.
-
Hey hoschy07
Since there are so much Mac users playing around with aMule now that it's mutliplatform, and since it seems there are some problems in guideing them into successfully compiling it, we thought it'd be great to have a HowTo on compiling aMule under MacOSX.
Kry said he would, but he's too busy with aMule development and real-life, so it'd be great to have your HowTo someday, when it is finished and error-free ;-) It'd be posted at aMule Help forum as a sticky "Important".
Of course, it would be good to have it before aMule's v2 final release (Or ASAP) ;-)
A whole Mac community is waiting for you :-P
Thanx a LOT. We're looking forward for your HowTo ;-)
Regards!
-
hi folks!
Thanks for your replies.
Seems aMule is conflicting with the openSSL installation here. At the moment I'm looking into that one.
Cheers, Sarge
PS: @Hoschy: maybe you should revise your steps! You've got gtk+ installed, but disable it in the config? Besides: doing a "make install" with the libcrypto++-sources is not possible, since there is no Makefile that could provide that command.
-
To hoschy07 and Sarge:
One2one has "published" the MacOSX aMule compiling HowTo (take it a look at http://www.amule-project.net/amule/thread.php?threadid=1716&sid= ) so it'd be good if you had a look at it and comment it, correct it and, working as a group, have it done as good as it gets ;-)
one_2_one is most of the time in aMule's IRC channel (#amule at irc.freenode.net) so you can talk with him there.
Thanks a lot to all three!
Regards.
-
Yep, libcrypto.0.9.2 and libcryptopp are no good. Especially the headers conflict with eachother. Do not install the libcryptopp into /usr/....(you could do this only manually since there's no Makefile that would provide you with "make install").
However, now it quits with:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -D__SYSTRAY_DISABLED__ -I/sw/lib/wx/include/mac-2.4 -I/sw/include -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/sw/include/gtk-1.2 -I/sw/include/glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include -D__NOGTK__ -I/usr/include -I/Applications/temp/crypto51lib/ -D__CRYPTO_MDK_SUSE_FC__ -Wall -g -ggdb -fno-inline -D__DEBUG__ -g -MT amule-BaseClient.o -MD -MP -MF ".deps/amule-BaseClient.Tpo" \
-c -o amule-BaseClient.o `test -f 'BaseClient.cpp' || echo './'`BaseClient.cpp; \
then mv -f ".deps/amule-BaseClient.Tpo" ".deps/amule-BaseClient.Po"; \
else rm -f ".deps/amule-BaseClient.Tpo"; exit 1; \
fi
In file included from /Applications/temp/crypto51lib/adler32.h:4,
from /Applications/temp/crypto51lib/zlib.h:4,
from BaseClient.cpp:33:
/Applications/temp/crypto51lib/cryptlib.h:1358:9: warning: "/*" within comment
In file included from otherfunctions.h:128,
from BaseClient.cpp:37:
endianfix.h:35:10: warning: #warning BIG ENDIAN BOX
In file included from /Applications/temp/crypto51lib/cryptopp/pkcspad.h:4,
from /Applications/temp/crypto51lib/cryptopp/rsa.h:9,
from ClientCredits.h:32,
from BaseClient.cpp:48:
/Applications/temp/crypto51lib/cryptopp/cryptlib.h:1358:9: warning: "/*" within comment
BaseClient.cpp: In destructor `CUpDownClient::~CUpDownClient()':
BaseClient.cpp:288: error: `inflateEnd' undeclared (first use this function)
BaseClient.cpp:288: error: (Each undeclared identifier is reported only once
for each function it appears in.)
BaseClient.cpp:289: warning: invalid use of undefined type `struct z_stream_s'
otherstructs.h:26: warning: forward declaration of `struct z_stream_s'
BaseClient.cpp:1578:10: warning: #warning ADDME - Import needed
make[2]: *** [amule-BaseClient.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Ideas?
Cheers, Sarge
-
you cannot add the folder that has crypto directly.
you need to rename it to cryptopp and then --with-crypto-prefix to the PARENT folder of cryptopp.
This is because th people at cryptopp for some strange reason loved to have a zlib.h