aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2] 3 4

Author Topic: Mac Compile Error  (Read 19302 times)

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Mac Compile Error
« Reply #15 on: July 10, 2007, 05:35:59 AM »

What version of flex do you have? (flex -V)
Your version probably doesn't support the header-file option.

I only have Linux (I might give Darwin in a vm a try.), but I could successfully build a binary following above steps. I need a deeper look at the code to see which ifdefs might cause the error on Mac.
I would also appreciate if someone could try to build with an external libcrypto++.
Logged

Romby69

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: Mac Compile Error
« Reply #16 on: July 10, 2007, 07:48:52 AM »

Sorry for my english, i'm italian.

I have compiled with external libcrypto++, downloaded from official site.
I have Flex version 2.5.4 installed
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Mac Compile Error
« Reply #17 on: July 10, 2007, 01:41:48 PM »

Hi Romby,

Do you get a working binary in the end when compiling against external libcryptop++? This would help me a lot in identifying the problem.

Flex 2.5.4(a) is from 1997!, please upgrade to version 2.5.33 in order to get rid of this error.
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Mac Compile Error
« Reply #18 on: July 10, 2007, 05:24:45 PM »

wuischke:

Compilation with external crypto seems to be fixed, I compiled on solaris CVS from July 08/07. It crashed about half an hour after starting it, but that should be another issue.

Regards.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Mac Compile Error
« Reply #19 on: July 10, 2007, 06:31:25 PM »

I've been cross-compiling from Linux and whilst I have to upgrade gcc (which I won't do today; it complains about ::malloc and ::realloc) I want someone to test the validity of my binaries.

It's compiled using the 10.4 SDK and i686 architecture, so it should run on Core (2) Duo with Tiger. Would be nice if someone could check if I have a valid build environment now. (i.e. if the binaries run)
Logged

dfunked

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: Mac Compile Error
« Reply #20 on: July 11, 2007, 05:29:08 PM »

I'd be willing to test out your binaries.

I'm trying to compile aMule.. and after having problems with my flex version and all that, I've now got the error in the first post.. I've tried using MacPorts to update my libcrypto++ to 5.1, but it also fails on the build of that so I'm currently trying my luck at compiling 5.5.1 myself (the 5.1 GCC patch from http://www.cryptopp.com/#platforms didn't work).

Will update on my efforts..

Update: libcrypto++ 5.5.1 is successfully installed, but I'm still getting aMule compilation error as shown in the first post. I'm not 100% sure if I have successfully installed libcrypto, but it has installed libcryptopp.a into /usr/lib/ and there's a cryptopp folder in /usr/include/ with lots of header files. There's also a cryptest.exe in /usr/bin/.

I imagine that's all correct? cryptest.exe works fine (did an RSA key generation that seemed fine).
« Last Edit: July 11, 2007, 06:24:37 PM by dfunked »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Mac Compile Error
« Reply #21 on: July 11, 2007, 06:38:34 PM »

When you compile against an external libcrypto, you have to add the flag "- --disable-embedded-crypto" to your configure command. At the end of the configure command it will show you the used version of crypto++, it should say 5.5.1 there, not embedded anymore. Also do a "make distclean" before compiling, please.

Unfortunately more than only upgrading gcc is necessary to get rid of my malloc and realloc errors, so I won't be able to test anything myself until I found a way to fix this. :(
Logged

dfunked

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: Mac Compile Error
« Reply #22 on: July 11, 2007, 06:43:21 PM »

Thanks for that. Just tried the configure command then but I got the following:

Code: [Select]
checking for crypto++ version >= 5.1... no
and then later on just before completing,

Code: [Select]
**** General Libraries and Tools ****
  Should ccache support be enabled?                          no
  Libraries aMule will use to build:
                                       wxWidgets             2.8.4
                                       crypto++              /*!        \mainpage <a href="http://www.cryptopp.com">Crypto++</a><sup><small>&reg;</small></sup> Library 5.5 Reference Manual
                                       zlib                  1.2.3

Safe to assume that it hasn't installed properly then?

Inspecting what MacPorts would have done if it worked (http://libcryptopp.darwinports.com/) I can see that it's pretty much the same to what I have.

Update: I inspected the configure script and came upon a new compile flag (--with-crypto-prefix). I tried my new configure command as:

Code: [Select]
./configure --disable-systray --disable-gtk --with-wx-config=../wxMac-2.8.4/wx-config --disable-embedded-crypto --with-crypto-prefix=/usr/include
Still same output as above though (libcrypto++ >= 5.1 not found).
« Last Edit: July 11, 2007, 07:09:37 PM by dfunked »
Logged

dfunked

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: Mac Compile Error
« Reply #23 on: July 11, 2007, 07:35:47 PM »

Had a feeling something was wrong in the configure script and how it was checking for external libcrypto++.

Offending line: 7852

Code: [Select]
crypto_version=`grep "Reference Manual" $crypto_prefix/include/cryptopp/cryptlib.h | sed -e's#.*\s\(\([0-9]\+\.\?\)\+\)\s.*#\1#g'`
Inspecting cryptlib.h, it's clear the sed substitution was incorrect. To get this going I just replaced the line with:

Code: [Select]
crypto_version=`grep "Reference Manual" $crypto_prefix/include/cryptopp/cryptlib.h | grep -Eo '[0-9\.]+ '`
My regex substitution memory isn't so great right now, but that does indeed return "5.5".

Needless to say, there's a whole bunch of "error: template with C linkage" errors. This page (http://www.gidforums.com/t-9853.html) claims it's a "dangling extern C" somewhere. There's some dependency mismatch somewhere here.. not really in the mood to sort this one out and might try libcrypto++ 5.1 instead.
« Last Edit: July 11, 2007, 07:44:32 PM by dfunked »
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Mac Compile Error
« Reply #24 on: July 18, 2007, 11:24:15 AM »

I think I managed to produce a working Mac binary (I've compiled for i686 only)

If someone with an Intel Mac could test this, it would be very appreciated.

I'm cross-compiling and had to use an external libcrypto in order to link successfully, I'll try to fix the embedded crypto asap.

http://www.youshare.com/view.php?file=amule.zip
« Last Edit: July 18, 2007, 11:31:30 AM by wuischke »
Logged

dfunked

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4
Re: Mac Compile Error
« Reply #25 on: July 18, 2007, 04:45:01 PM »

I can't get the "this is the first time you have run ..." message to accept my click/keystroke, so I can't go any further. Is there a flag to disable this?

MacBook Pro, 2.16GHz, 2GB RAM, OS 10.4.10.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Mac Compile Error
« Reply #26 on: July 18, 2007, 04:48:39 PM »

Thats because wuischke doens't know about application bundles. You ahve to wait till someone creates a bundle for it.

Wuischke: get it from the SVN, or ask me on irc if I'm around. there is a mac_packager script in svn that will help you lots.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Mac Compile Error
« Reply #27 on: July 19, 2007, 04:09:44 PM »

OK, I tried to package it the Mac way. I stripped the binaries as well, should there be a problem with the binaries, use the ones from above and put them inside aMule.app/Contents/MacOS.

(see later posts for links, download is broken)

If everything works so far, please see if it crashes on accessing the statistics page. This version is not intended to produce backtraces, but it will at least show what's still going wrong with aMule on Mac.
« Last Edit: July 26, 2007, 02:54:03 PM by wuischke »
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Mac Compile Error
« Reply #28 on: July 22, 2007, 08:29:38 PM »

Linking's fixed on svn.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Mac Compile Error
« Reply #29 on: July 22, 2007, 09:36:49 PM »

I don't know if cross-compiling has any say, but I get now another error:
Quote
i686-apple-darwin8-g++ -DENABLE_UPNP=1 -I/home/macosx/wxMac-2.8.4/build/lib/wx/include/i686-apple-darwin8-mac-unicode-release-static-2.8 -I/home/macosx/wxMac-2.8.4/include -I/home/macosx/wxMac-2.8.4/contrib/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__     -I./libs -Ilibs -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -O2  -DUSE_WX_EXTENSIONS  -bind_at_load  -lpthread -o amule amule-RC4Encrypt.o amule-amule.o amule-BaseClient.o amule-ClientList.o amule-ClientCreditsList.o amule-ClientTCPSocket.o amule-ClientUDPSocket.o amule-DownloadClient.o amule-DownloadQueue.o amule-ECSpecialCoreTags.o amule-EMSocket.o amule-EncryptedStreamSocket.o amule-EncryptedDatagramSocket.o amule-ExternalConn.o amule-Friend.o amule-FriendList.o amule-HTTPDownload.o amule-IPFilter.o amule-KnownFileList.o amule-ListenSocket.o amule-MuleUDPSocket.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-Kademlia.o amule-Search.o amule-Indexed.o amule-KademliaUDPListener.o amule-Prefs.o amule-RoutingZone.o amule-Contact.o amule-UPnP.o amule-UPnPCompatibility.o amule-amule-gui.o amule-amuleDlg.o amule-AddFriend.o amule-CatDialog.o amule-ChatSelector.o amule-ClientDetailDialog.o amule-FileDetailDialog.o amule-KadDlg.o amule-OScopeCtrl.o amule-PartFileConvert.o amule-PrefsUnifiedDlg.o amule-SearchDlg.o amule-ServerWnd.o amule-SharedFilesWnd.o amule-StatisticsDlg.o amule-SearchListCtrl.o amule-DownloadListCtrl.o amule-ClientListCtrl.o amule-FriendListCtrl.o amule-ServerListCtrl.o amule-SharedFilesCtrl.o amule-MuleTrayIcon.o amule-TransferWnd.o  amule-ClientCredits.o amule-ECSpecialMuleTags.o amule-KnownFile.o amule-GetTickCount.o amule-GuiEvents.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-TerminationProcess.o amule-UserEvents.o amule-OtherFunctions.o amule-NetworkFunctions.o -L. -lmuleappcommon -Llibs/common -Llibs/ec/cpp -lmulecommon -lec     -L. -lmuleappcore -L. -lmuleappgui  -L/home/macosx/wxMac-2.8.4/build/lib   -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System  /home/macosx/wxMac-2.8.4/build/lib/libwx_macu_adv-2.8-i686-apple-darwin8.a /home/macosx/wxMac-2.8.4/build/lib/libwx_macu_core-2.8-i686-apple-darwin8.a /home/macosx/wxMac-2.8.4/build/lib/libwx_base_carbonu_net-2.8-i686-apple-darwin8.a /home/macosx/wxMac-2.8.4/build/lib/libwx_base_carbonu-2.8-i686-apple-darwin8.a -framework WebKit -lwxregexu-2.8-i686-apple-darwin8 -lwxexpat-2.8-i686-apple-darwin8 -lwxtiff-2.8-i686-apple-darwin8 -lwxjpeg-2.8-i686-apple-darwin8 -lwxpng-2.8-i686-apple-darwin8 -lz -lpthread -liconv   -lz
/opt/mac/bin/i686-apple-darwin8-ld: Undefined symbols:
CSocketClientProxy::ms_classInfo
typeinfo for CSocketClientProxy
vtable for CSocketClientProxy
CDatagramSocketProxy::GetClassInfo() const
typeinfo for CDatagramSocketProxy
CSocketServerProxy::GetClassInfo() const
typeinfo for CSocketServerProxy
vtable for CSocketServerProxy
vtable for CProxyData
typeinfo for CProxySocket
vtable for CProxySocket
vtable for CHttpStateMachine
vtable for CProxyEventHandler
vtable for CProxyStateMachine
vtable for CSocks4StateMachine
vtable for CSocks5StateMachine
vtable for CDatagramSocketProxy
collect2: ld returned 1 exit status
Logged
Pages: 1 [2] 3 4